1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017, 2018, 2019 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages java)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix hg-download)
34 #:use-module (guix git-download)
35 #:use-module (guix svn-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system ant)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system trivial)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages certs)
46 #:use-module (gnu packages cpio)
47 #:use-module (gnu packages cups)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages elf)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages gawk)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages ghostscript) ;lcms
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages groovy)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages icu4c)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages java-compression)
63 #:use-module (gnu packages libffi)
64 #:use-module (gnu packages linux) ;alsa
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages nss)
67 #:use-module (gnu packages onc-rpc)
68 #:use-module (gnu packages web)
69 #:use-module (gnu packages wget)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages popt)
73 #:use-module (gnu packages kerberos)
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages xorg)
76 #:use-module (gnu packages texinfo)
77 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
78 #:use-module (srfi srfi-11)
79 #:use-module (ice-9 match))
83 ;;; Java bootstrap toolchain.
86 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
87 ;; use it to build a simple version of GNU Classpath, the Java standard
88 ;; library. We chose version 0.93 because it is the last version that can be
89 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
90 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
91 ;; the last version of JamVM that works with a version of GNU classpath that
92 ;; does not require ECJ. These three packages make up the bootstrap JDK.
94 ;; This is sufficient to build an older version of Ant, which is needed to
95 ;; build an older version of ECJ, an incremental Java compiler, both of which
96 ;; are written in Java.
98 ;; ECJ is needed to build the latest release (0.99) and the development
99 ;; version of GNU Classpath. The development version of GNU Classpath has
100 ;; much more support for Java 1.6 than the latest release, but we need to
101 ;; build 0.99 first to get a working version of javah. ECJ, the development
102 ;; version of GNU Classpath, and the latest version of JamVM make up the
103 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
104 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
113 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
114 version "/jikes-" version ".tar.bz2"))
117 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
118 (build-system gnu-build-system)
119 (home-page "http://jikes.sourceforge.net/")
120 (synopsis "Compiler for the Java language")
121 (description "Jikes is a compiler that translates Java source files as
122 defined in The Java Language Specification into the bytecoded instruction set
123 and binary format defined in The Java Virtual Machine Specification.")
124 (license license:ibmpl1.0)))
126 ;; This is the last version of GNU Classpath that can be built without ECJ.
127 (define classpath-bootstrap
133 (uri (string-append "mirror://gnu/classpath/classpath-"
137 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
138 (patches (search-patches "classpath-aarch64-support.patch"))))
139 (build-system gnu-build-system)
142 (list (string-append "JAVAC="
143 (assoc-ref %build-inputs "jikes")
148 "--disable-gconf-peer"
154 (modify-phases %standard-phases
155 ;; XXX: This introduces a memory leak as we remove a call to free up
156 ;; memory for the file name string. This was necessary because of a
157 ;; runtime error that would have prevented us from building
158 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
159 ;; for the gnarly details.
160 (add-after 'unpack 'remove-call-to-free
162 (substitute* "native/jni/java-io/java_io_VMFile.c"
163 (("result = cpio_isFileExists.*" m)
164 (string-append m "\n//")))
166 (add-after 'install 'install-data
167 (lambda _ (invoke "make" "install-data"))))))
172 ("pkg-config" ,pkg-config)))
173 (home-page "https://www.gnu.org/software/classpath/")
174 (synopsis "Essential libraries for Java")
175 (description "GNU Classpath is a project to create core class libraries
176 for use with runtimes, compilers and tools for the Java programming
178 ;; GPLv2 or later, with special linking exception.
179 (license license:gpl2+)))
181 ;; This is the last version of JamVM that works with a version of GNU
182 ;; classpath that does not require ECJ.
183 (define jamvm-1-bootstrap
189 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
190 "JamVM%20" version "/jamvm-"
192 (patches (search-patches "jamvm-arm.patch"))
195 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
196 (build-system gnu-build-system)
199 (list (string-append "--with-classpath-install-dir="
200 (assoc-ref %build-inputs "classpath"))
201 "--disable-int-caching"
202 "--enable-runtime-reloc-checks"
205 `(("classpath" ,classpath-bootstrap)
209 ;; When built with a recent GCC and glibc the configure step of icedtea-6
210 ;; fails with an invalid instruction error.
213 ("libc" ,glibc-2.28)))
214 (home-page "http://jamvm.sourceforge.net/")
215 (synopsis "Small Java Virtual Machine")
216 (description "JamVM is a Java Virtual Machine conforming to the JVM
217 specification edition 2 (blue book). It is extremely small. However, unlike
218 other small VMs it supports the full spec, including object finalisation and
220 (license license:gpl2+)))
222 (define ant-bootstrap
224 (name "ant-bootstrap")
225 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
226 ;; are not supported. The 1.8.x series is the last to use only features
227 ;; supported by Jikes.
231 (uri (string-append "http://archive.apache.org/dist/"
232 "ant/source/apache-ant-"
233 version "-src.tar.bz2"))
236 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
237 (build-system gnu-build-system)
239 `(#:imported-modules ((guix build syscalls)
240 ,@%gnu-build-system-modules)
241 #:modules ((srfi srfi-1)
242 (guix build gnu-build-system)
244 (guix build syscalls))
245 #:tests? #f ; no "check" target
247 (modify-phases %standard-phases
251 (lambda* (#:key inputs #:allow-other-keys)
252 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
254 (string-append (assoc-ref inputs "jamvm")
257 (string-append (assoc-ref inputs "jikes")
260 (string-append (assoc-ref inputs "jamvm")
263 ;; Ant complains if this file doesn't exist.
264 (setenv "HOME" "/tmp")
265 (with-output-to-file "/tmp/.ant.properties"
266 (lambda _ (display "")))
268 ;; Use jikes instead of javac for <javac ...> tags in build.xml
269 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
271 ;; jikes produces lots of warnings, but they are not very
272 ;; interesting, so we silence them.
273 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
275 ;; Without these JamVM options the build may freeze.
276 (substitute* "bootstrap.sh"
277 (("^\"\\$\\{JAVACMD\\}\" " m)
278 ,@(if (string-prefix? "armhf" (or (%current-system)
279 (%current-target-system)))
280 `((string-append m "-Xnocompact "))
281 `((string-append m "-Xnocompact -Xnoinlining ")))))
283 ;; Disable tests because we are bootstrapping and thus don't have
284 ;; any of the dependencies required to build and run the tests.
285 (substitute* "build.xml"
286 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
287 (invoke "bash" "bootstrap.sh"
288 (string-append "-Ddist.dir="
289 (assoc-ref %outputs "out")))))
290 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
291 (lambda* (#:key outputs #:allow-other-keys)
292 (define (repack-archive jar)
293 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
294 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
295 (with-directory-excursion dir
296 (invoke "unzip" jar))
298 ;; XXX: copied from (gnu build install)
299 (for-each (lambda (file)
300 (let ((s (lstat file)))
301 (unless (eq? (stat:type s) 'symlink)
302 (utime file 0 0 0 0))))
303 (find-files dir #:directories? #t))
304 ;; It is important that the manifest appears first.
305 (with-directory-excursion dir
306 (let* ((files (find-files "." ".*" #:directories? #t))
307 ;; To ensure that the reference scanner can
308 ;; detect all store references in the jars
309 ;; we disable compression with the "-0" option.
310 (command (if (file-exists? manifest)
311 `("zip" "-0" "-X" ,jar ,manifest
313 `("zip" "-0" "-X" ,jar ,@files))))
314 (apply invoke command)))))
315 (for-each repack-archive
317 (string-append (assoc-ref %outputs "out") "/lib")
323 ("jamvm" ,jamvm-1-bootstrap)
326 (home-page "http://ant.apache.org")
327 (synopsis "Build tool for Java")
329 "Ant is a platform-independent build tool for Java. It is similar to
330 make but is implemented using the Java language, requires the Java platform,
331 and is best suited to building Java projects. Ant uses XML to describe the
332 build process and its dependencies, whereas Make uses Makefile format.")
333 (license license:asl2.0)))
335 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
336 ;; compiler for Java 1.5.
337 (define ecj-bootstrap
339 (name "ecj-bootstrap")
343 (uri (string-append "http://archive.eclipse.org/eclipse/"
344 "downloads/drops/R-" version
345 "-200702121330/ecjsrc.zip"))
348 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
349 ;; It would be so much easier if we could use the ant-build-system, but we
350 ;; cannot as we don't have ant at this point. We use ecj for
351 ;; bootstrapping the JDK.
352 (build-system gnu-build-system)
354 `(#:modules ((guix build gnu-build-system)
357 #:tests? #f ; there are no tests
359 (modify-phases %standard-phases
361 (lambda* (#:key inputs #:allow-other-keys)
364 (cons (string-append (assoc-ref inputs "jamvm")
366 (find-files (string-append
367 (assoc-ref inputs "ant-bootstrap")
373 (lambda* (#:key inputs #:allow-other-keys)
374 ;; The unpack phase enters the "org" directory by mistake.
377 ;; Create a simple manifest to make ecj executable.
378 (with-output-to-file "manifest"
380 (display "Manifest-Version: 1.0
381 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
384 (and (apply invoke "jikes"
385 (find-files "." "\\.java$"))
386 (invoke "fastjar" "cvfm"
387 "ecj-bootstrap.jar" "manifest" "."))))
389 (lambda* (#:key outputs #:allow-other-keys)
390 (let ((share (string-append (assoc-ref outputs "out")
393 (install-file "ecj-bootstrap.jar" share)
396 `(("ant-bootstrap" ,ant-bootstrap)
399 ("jamvm" ,jamvm-1-bootstrap)
400 ("fastjar" ,fastjar)))
401 (home-page "https://eclipse.org")
402 (synopsis "Eclipse Java development tools core batch compiler")
403 (description "This package provides the Eclipse Java core batch compiler
404 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
405 requirement for all GNU Classpath releases after version 0.93.")
406 (license license:epl1.0)))
408 (define ecj-javac-wrapper
409 (package (inherit ecj-bootstrap)
410 (name "ecj-javac-wrapper")
412 (build-system trivial-build-system)
414 `(#:modules ((guix build utils))
417 (use-modules (guix build utils))
418 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
419 (target (string-append bin "/javac"))
420 (guile (string-append (assoc-ref %build-inputs "guile")
422 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
423 "/share/java/ecj-bootstrap.jar"))
424 (java (string-append (assoc-ref %build-inputs "jamvm")
426 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
427 "/share/classpath")))
428 (string-append jvmlib "/glibj.zip:"
429 jvmlib "/tools.zip"))))
431 (with-output-to-file target
433 (format #t "#!~a --no-auto-compile\n!#\n" guile)
435 `(begin (use-modules (ice-9 match)
441 '(("-bootclasspath" ,bootcp)
446 (let ((classpath (getenv "CLASSPATH")))
448 (string-join (list ,ecj
449 ,(string-append (assoc-ref %build-inputs "jamvm")
453 (receive (vm-args other-args)
454 ;; Separate VM arguments from arguments to ECJ.
455 (partition (cut string-prefix? "-J" <>)
456 (fold (lambda (default acc)
457 (if (member (first default) acc)
458 acc (append default acc)))
462 ;; Remove "-J" prefix
463 (map (cut string-drop <> 2) vm-args)
464 '("org.eclipse.jdt.internal.compiler.batch.Main")
465 (cons "-nowarn" other-args)))))
467 (let ((args (cdr (command-line))))
469 (format (current-error-port) "javac: no arguments given!\n")
474 `(("guile" ,guile-2.2)
475 ("ecj-bootstrap" ,ecj-bootstrap)
476 ("jamvm" ,jamvm-1-bootstrap)
477 ("classpath" ,classpath-bootstrap)))
478 (description "This package provides a wrapper around the @dfn{Eclipse
479 compiler for Java} (ecj) with a command line interface that is compatible with
480 the standard javac executable.")))
482 ;; The classpath-bootstrap was built without a virtual machine, so it does not
483 ;; provide a wrapper for javah. We cannot build the development version of
484 ;; Classpath without javah.
485 (define classpath-0.99
486 (package (inherit classpath-bootstrap)
490 (uri (string-append "mirror://gnu/classpath/classpath-"
494 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
495 (patches (search-patches "classpath-aarch64-support.patch"))))
498 (list (string-append "--with-ecj-jar="
499 (assoc-ref %build-inputs "ecj-bootstrap")
500 "/share/java/ecj-bootstrap.jar")
501 (string-append "JAVAC="
502 (assoc-ref %build-inputs "ecj-javac-wrapper")
504 (string-append "JAVA="
505 (assoc-ref %build-inputs "jamvm")
508 "ac_cv_prog_java_works=yes" ; trust me
512 "--disable-gconf-peer"
518 (modify-phases %standard-phases
519 (add-after 'install 'install-data
520 (lambda _ (invoke "make" "install-data"))))))
522 `(("ecj-bootstrap" ,ecj-bootstrap)
523 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
525 ("jamvm" ,jamvm-1-bootstrap)
526 ("classpath" ,classpath-bootstrap)
528 ("pkg-config" ,pkg-config)))))
530 ;; We need this because classpath-bootstrap does not provide all of the tools
531 ;; we need to build classpath-devel.
532 (define classpath-jamvm-wrappers
533 (package (inherit classpath-0.99)
534 (name "classpath-jamvm-wrappers")
536 (build-system trivial-build-system)
538 `(#:modules ((guix build utils))
541 (use-modules (guix build utils))
542 (let* ((bash (assoc-ref %build-inputs "bash"))
543 (jamvm (assoc-ref %build-inputs "jamvm"))
544 (classpath (assoc-ref %build-inputs "classpath"))
545 (bin (string-append (assoc-ref %outputs "out")
548 (for-each (lambda (tool)
549 (with-output-to-file (string-append bin tool)
551 ,@(if (string-prefix? "armhf" (or (%current-system)
552 (%current-target-system)))
553 `((format #t "#!~a/bin/sh
554 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
555 gnu.classpath.tools.~a.~a $@"
556 bash jamvm classpath tool
557 (if (string=? "native2ascii" tool)
558 "Native2ASCII" "Main")))
559 `((format #t "#!~a/bin/sh
560 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
561 gnu.classpath.tools.~a.~a $@"
562 bash jamvm classpath tool
563 (if (string=? "native2ascii" tool)
564 "Native2ASCII" "Main"))))))
565 (chmod (string-append bin tool) #o755))
575 ("jamvm" ,jamvm-1-bootstrap)
576 ("classpath" ,classpath-0.99)))
578 (synopsis "Executables from GNU Classpath")
579 (description "This package provides wrappers around the tools provided by
580 the GNU Classpath library. They are executed by the JamVM virtual
583 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
584 ;; then Classpath has gained much more support for Java 1.6.
585 (define-public classpath-devel
586 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
588 (package (inherit classpath-bootstrap)
589 (version (string-append "0.99-" revision "." (string-take commit 9)))
593 (url "https://git.savannah.gnu.org/git/classpath.git")
595 (file-name (string-append "classpath-" version "-checkout"))
598 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
601 ;; Ensure that the initial heap size is smaller than the maximum
602 ;; size. By default only Xmx is set, which can lead to invalid
603 ;; memory settings on some machines with a lot of memory.
604 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
606 (list (string-append "--with-ecj-jar="
607 (assoc-ref %build-inputs "ecj-bootstrap")
608 "/share/java/ecj-bootstrap.jar")
609 (string-append "--with-javac="
610 (assoc-ref %build-inputs "ecj-javac-wrapper")
612 (string-append "JAVA="
613 (assoc-ref %build-inputs "jamvm")
616 "ac_cv_prog_java_works=yes" ; trust me
620 "--disable-gconf-peer"
626 (modify-phases %standard-phases
627 ;; XXX The bootstrap phase executes autogen.sh, which fails after
628 ;; complaining about the lack of gettext.
630 (lambda _ (invoke "autoreconf" "-vif")))
631 (add-after 'unpack 'remove-unsupported-annotations
633 (substitute* (find-files "java" "\\.java$")
636 (add-after 'install 'install-data
637 (lambda _ (invoke "make" "install-data"))))))
639 `(("autoconf" ,autoconf)
640 ("automake" ,automake)
642 ("gettext" ,gettext-minimal)
644 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
645 ("ecj-bootstrap" ,ecj-bootstrap)
646 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
648 ("jamvm" ,jamvm-1-bootstrap)
650 ("pkg-config" ,pkg-config))))))
653 (package (inherit jamvm-1-bootstrap)
657 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
658 "JamVM%20" version "/jamvm-"
662 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
663 (build-system gnu-build-system)
666 (list (string-append "--with-classpath-install-dir="
667 (assoc-ref %build-inputs "classpath")))))
669 `(("classpath" ,classpath-devel)
670 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
673 (define ecj-javac-wrapper-final
674 (package (inherit ecj-javac-wrapper)
676 `(("guile" ,guile-2.2)
677 ("ecj-bootstrap" ,ecj-bootstrap)
679 ("classpath" ,classpath-devel)))))
681 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
682 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
683 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
684 ;; which uses Java 6 only.
685 (define-public icedtea-6
692 "http://icedtea.wildebeest.org/download/source/icedtea6-"
696 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
697 (modules '((guix build utils)))
700 (substitute* "Makefile.in"
701 ;; do not leak information about the build host
702 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
703 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
705 (build-system gnu-build-system)
706 (outputs '("out" ; Java Runtime Environment
707 "jdk" ; Java Development Kit
708 "doc")) ; all documentation
710 `(;; There are many failing tests and many are known to fail upstream.
713 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
714 ;; gremlin) doesn't support it yet, so skip this phase.
715 #:validate-runpath? #f
717 #:modules ((guix build utils)
718 (guix build gnu-build-system)
722 `("--enable-bootstrap"
725 "--with-parallel-jobs"
726 "--disable-downloading"
728 ,(string-append "--with-ecj="
729 (assoc-ref %build-inputs "ecj")
730 "/share/java/ecj-bootstrap.jar")
731 ,(string-append "--with-jar="
732 (assoc-ref %build-inputs "fastjar")
734 ,(string-append "--with-jdk-home="
735 (assoc-ref %build-inputs "classpath"))
736 ,(string-append "--with-java="
737 (assoc-ref %build-inputs "jamvm")
740 (modify-phases %standard-phases
742 (lambda* (#:key source inputs #:allow-other-keys)
743 (invoke "tar" "xvf" source)
744 (chdir (string-append "icedtea6-" ,version))
746 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
747 ;; The convenient OpenJDK source bundle is no longer
748 ;; available for download, so we have to take the sources
749 ;; from the Mercurial repositories and change the Makefile
750 ;; to avoid tests for the OpenJDK zip archive.
751 (with-directory-excursion "openjdk"
752 (for-each (lambda (part)
756 (string-append part "-src"))
759 "langtools" "jaxp" "jaxws")))
760 (with-directory-excursion "openjdk"
761 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
762 (rename-file "hg-checkout" "hotspot"))
763 (substitute* "patches/freetypeversion.patch"
764 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
765 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
766 (substitute* "Makefile.in"
767 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
768 "echo \"trust me\";")
769 ;; The contents of the bootstrap directory must be
770 ;; writeable but when copying from the store they are
772 (("mkdir -p lib/rt" line)
773 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
774 (invoke "chmod" "-R" "u+w" "openjdk")))
775 (add-after 'unpack 'use-classpath
776 (lambda* (#:key inputs #:allow-other-keys)
777 (let ((jvmlib (assoc-ref inputs "classpath"))
778 (jamvm (assoc-ref inputs "jamvm")))
779 ;; Classpath does not provide rt.jar.
780 (substitute* "Makefile.in"
781 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
782 (string-append jvmlib "/share/classpath/glibj.zip")))
783 ;; Make sure we can find all classes.
785 (string-append jvmlib "/share/classpath/glibj.zip:"
786 jvmlib "/share/classpath/tools.zip:"
787 jamvm "/lib/rt.jar"))
789 (string-append "-cp "
790 jvmlib "/share/classpath/glibj.zip:"
791 jvmlib "/share/classpath/tools.zip")))
793 (add-after 'unpack 'patch-patches
795 ;; shebang in patches so that they apply cleanly
796 (substitute* '("patches/jtreg-jrunscript.patch"
797 "patches/hotspot/hs23/drop_unlicensed_test.patch")
798 (("#!/bin/sh") (string-append "#!" (which "sh"))))
800 (add-after 'unpack 'patch-paths
801 (lambda* (#:key inputs #:allow-other-keys)
802 ;; buildtree.make generates shell scripts, so we need to replace
803 ;; the generated shebang
804 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
805 (("/bin/sh") (which "bash")))
807 (let ((corebin (string-append
808 (assoc-ref inputs "coreutils") "/bin/"))
809 (binbin (string-append
810 (assoc-ref inputs "binutils") "/bin/"))
811 (grepbin (string-append
812 (assoc-ref inputs "grep") "/bin/")))
813 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
814 "openjdk/corba/make/common/shared/Defs-linux.gmk")
815 (("UNIXCOMMAND_PATH = /bin/")
816 (string-append "UNIXCOMMAND_PATH = " corebin))
817 (("USRBIN_PATH = /usr/bin/")
818 (string-append "USRBIN_PATH = " corebin))
819 (("DEVTOOLS_PATH *= */usr/bin/")
820 (string-append "DEVTOOLS_PATH = " corebin))
821 (("COMPILER_PATH *= */usr/bin/")
822 (string-append "COMPILER_PATH = "
823 (assoc-ref inputs "gcc") "/bin/"))
824 (("DEF_OBJCOPY *=.*objcopy")
825 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
827 ;; fix path to alsa header
828 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
829 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
830 (string-append "ALSA_INCLUDE="
831 (assoc-ref inputs "alsa-lib")
832 "/include/alsa/version.h")))
834 ;; fix hard-coded utility paths
835 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
836 "openjdk/corba/make/common/shared/Defs-utils.gmk")
838 (string-append "ECHO = " (which "echo")))
840 (string-append "GREP = " (which "grep")))
842 (string-append "EGREP = " (which "egrep")))
844 (string-append "CPIO = " (which "cpio")))
845 (("READELF *=.*readelf")
846 (string-append "READELF = " (which "readelf")))
848 (string-append "AR = " (which "ar")))
850 (string-append "TAR = " (which "tar")))
852 (string-append "AS = " (which "as")))
854 (string-append "LD = " (which "ld")))
856 (string-append "STRIP = " (which "strip")))
858 (string-append "NM = " (which "nm")))
860 (string-append "SH = " (which "bash")))
862 (string-append "FIND = " (which "find")))
864 (string-append "LDD = " (which "ldd")))
865 (("NAWK *=.*(n|g)awk")
866 (string-append "NAWK = " (which "gawk")))
868 (string-append "XARGS = " (which "xargs")))
870 (string-append "UNZIP = " (which "unzip")))
872 (string-append "ZIPEXE = " (which "zip")))
874 (string-append "SED = " (which "sed"))))
876 ;; Some of these timestamps cause problems as they are more than
877 ;; 10 years ago, failing the build process.
879 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
880 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
881 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
882 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
883 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
885 (add-before 'configure 'set-additional-paths
886 (lambda* (#:key inputs #:allow-other-keys)
888 (string-append (assoc-ref inputs "libxrender")
889 "/include/X11/extensions" ":"
890 (assoc-ref inputs "libxtst")
891 "/include/X11/extensions" ":"
892 (assoc-ref inputs "libxinerama")
893 "/include/X11/extensions" ":"
894 (or (getenv "CPATH") "")))
895 (setenv "ALT_CUPS_HEADERS_PATH"
896 (string-append (assoc-ref inputs "cups")
898 (setenv "ALT_FREETYPE_HEADERS_PATH"
899 (string-append (assoc-ref inputs "freetype")
901 (setenv "ALT_FREETYPE_LIB_PATH"
902 (string-append (assoc-ref inputs "freetype")
905 (add-before 'build 'disable-os-version-check
906 ;; allow build on linux major version change
908 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
911 (lambda* (#:key outputs #:allow-other-keys)
912 (let ((doc (string-append (assoc-ref outputs "doc")
913 "/share/doc/icedtea"))
914 (jre (assoc-ref outputs "out"))
915 (jdk (assoc-ref outputs "jdk")))
916 (copy-recursively "openjdk.build/docs" doc)
917 (copy-recursively "openjdk.build/j2re-image" jre)
918 (copy-recursively "openjdk.build/j2sdk-image" jdk))
921 `(("ant" ,ant-bootstrap)
922 ("alsa-lib" ,alsa-lib)
924 ("classpath" ,classpath-devel)
925 ("coreutils" ,coreutils)
928 ("ecj" ,ecj-bootstrap)
929 ("ecj-javac" ,ecj-javac-wrapper-final)
931 ("fontconfig" ,fontconfig)
932 ("freetype" ,freetype)
944 ("libxcomposite" ,libxcomposite)
946 ("libxinerama" ,libxinerama)
947 ("libxrender" ,libxrender)
948 ("libxslt" ,libxslt) ;for xsltproc
951 ("mit-krb5" ,mit-krb5)
953 ("nss-certs" ,nss-certs)
955 ("pkg-config" ,pkg-config)
956 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
966 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
967 (changeset "jdk6-b41")))
970 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
975 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
976 (changeset "jdk6-b41")))
979 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
984 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
985 (changeset "jdk6-b41")))
988 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
990 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
995 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
996 (changeset "jdk6-b41")))
999 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1004 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1005 (changeset "jdk6-b41")))
1008 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1013 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1014 (changeset "jdk6-b41")))
1017 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1022 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1023 (changeset "jdk6-b41")))
1026 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1027 (home-page "http://icedtea.classpath.org")
1028 (synopsis "Java development kit")
1030 "This package provides the OpenJDK built with the IcedTea build harness.
1031 This version of the OpenJDK is no longer maintained and is only used for
1032 bootstrapping purposes.")
1033 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1034 ;; same license as both GNU Classpath and OpenJDK.
1035 (license license:gpl2+)))
1037 (define-public icedtea-7
1038 (let* ((version "2.6.13")
1039 (drop (lambda (name hash)
1043 "http://icedtea.classpath.org/download/drops"
1044 "/icedtea7/" version "/" name ".tar.bz2"))
1045 (sha256 (base32 hash))))))
1052 "http://icedtea.wildebeest.org/download/source/icedtea-"
1056 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1057 (modules '((guix build utils)))
1060 (substitute* "Makefile.in"
1061 ;; do not leak information about the build host
1062 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1063 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1065 (build-system gnu-build-system)
1066 (outputs '("out" ; Java Runtime Environment
1067 "jdk" ; Java Development Kit
1068 "doc")) ; all documentation
1070 `(;; There are many test failures. Some are known to
1071 ;; fail upstream, others relate to not having an X
1072 ;; server running at test time, yet others are a
1073 ;; complete mystery to me.
1075 ;; hotspot: passed: 241; failed: 45; error: 2
1076 ;; langtools: passed: 1,934; failed: 26
1080 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1081 ;; gremlin) doesn't support it yet, so skip this phase.
1082 #:validate-runpath? #f
1084 ;; Apparently, the C locale is needed for some of the tests.
1087 #:modules ((guix build utils)
1088 (guix build gnu-build-system)
1095 ;; TODO: package pcsc and sctp, and add to inputs
1096 `("--disable-system-pcsc"
1097 "--disable-system-sctp"
1098 "--enable-bootstrap"
1101 "--disable-downloading"
1102 "--disable-tests" ;they are run in the check phase instead
1103 "--with-openjdk-src-dir=./openjdk.src"
1104 ,(string-append "--with-jdk-home="
1105 (assoc-ref %build-inputs "jdk")))
1108 (modify-phases %standard-phases
1110 (lambda* (#:key source inputs #:allow-other-keys)
1111 (let ((target (string-append "icedtea-" ,version))
1112 (unpack (lambda* (name #:optional dir)
1114 (string-drop-right name 5))))
1117 (assoc-ref inputs name)
1119 "--strip-components=1")))))
1121 (invoke "tar" "xvf" source
1122 "-C" target "--strip-components=1")
1124 (unpack "openjdk-src" "openjdk.src")
1125 (with-directory-excursion "openjdk.src"
1127 (filter (cut string-suffix? "-drop" <>)
1132 (add-after 'unpack 'patch-bitrot
1134 (substitute* '("patches/boot/revert-6973616.patch"
1135 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1136 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1137 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1138 ;; As of attr 2.4.48 this header is no longer
1139 ;; included. It is provided by the libc instead.
1140 (substitute* '("configure"
1141 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1142 (("attr/xattr.h") "sys/xattr.h"))
1144 (add-after 'unpack 'fix-x11-extension-include-path
1145 (lambda* (#:key inputs #:allow-other-keys)
1146 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1147 (((string-append "\\$\\(firstword \\$\\(wildcard "
1148 "\\$\\(OPENWIN_HOME\\)"
1149 "/include/X11/extensions\\).*$"))
1150 (string-append (assoc-ref inputs "libxrender")
1151 "/include/X11/extensions"
1152 " -I" (assoc-ref inputs "libxtst")
1153 "/include/X11/extensions"
1154 " -I" (assoc-ref inputs "libxinerama")
1155 "/include/X11/extensions"))
1156 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1158 (add-after 'unpack 'patch-paths
1160 ;; buildtree.make generates shell scripts, so we need to replace
1161 ;; the generated shebang
1162 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1163 (("/bin/sh") (which "bash")))
1165 (let ((corebin (string-append
1166 (assoc-ref %build-inputs "coreutils") "/bin/"))
1167 (binbin (string-append
1168 (assoc-ref %build-inputs "binutils") "/bin/"))
1169 (grepbin (string-append
1170 (assoc-ref %build-inputs "grep") "/bin/")))
1171 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1172 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1173 (("UNIXCOMMAND_PATH = /bin/")
1174 (string-append "UNIXCOMMAND_PATH = " corebin))
1175 (("USRBIN_PATH = /usr/bin/")
1176 (string-append "USRBIN_PATH = " corebin))
1177 (("DEVTOOLS_PATH *= */usr/bin/")
1178 (string-append "DEVTOOLS_PATH = " corebin))
1179 (("COMPILER_PATH *= */usr/bin/")
1180 (string-append "COMPILER_PATH = "
1181 (assoc-ref %build-inputs "gcc") "/bin/"))
1182 (("DEF_OBJCOPY *=.*objcopy")
1183 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1185 ;; fix path to alsa header
1186 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1187 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1188 (string-append "ALSA_INCLUDE="
1189 (assoc-ref %build-inputs "alsa-lib")
1190 "/include/alsa/version.h")))
1192 ;; fix hard-coded utility paths
1193 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1194 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1196 (string-append "ECHO = " (which "echo")))
1198 (string-append "GREP = " (which "grep")))
1199 (("EGREP *=.*egrep")
1200 (string-append "EGREP = " (which "egrep")))
1202 (string-append "CPIO = " (which "cpio")))
1203 (("READELF *=.*readelf")
1204 (string-append "READELF = " (which "readelf")))
1206 (string-append "AR = " (which "ar")))
1208 (string-append "TAR = " (which "tar")))
1210 (string-append "AS = " (which "as")))
1212 (string-append "LD = " (which "ld")))
1213 (("STRIP *=.*strip")
1214 (string-append "STRIP = " (which "strip")))
1216 (string-append "NM = " (which "nm")))
1218 (string-append "SH = " (which "bash")))
1220 (string-append "FIND = " (which "find")))
1222 (string-append "LDD = " (which "ldd")))
1223 (("NAWK *=.*(n|g)awk")
1224 (string-append "NAWK = " (which "gawk")))
1225 (("XARGS *=.*xargs")
1226 (string-append "XARGS = " (which "xargs")))
1227 (("UNZIP *=.*unzip")
1228 (string-append "UNZIP = " (which "unzip")))
1230 (string-append "ZIPEXE = " (which "zip")))
1232 (string-append "SED = " (which "sed"))))
1234 ;; Some of these timestamps cause problems as they are more than
1235 ;; 10 years ago, failing the build process.
1237 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1238 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1239 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1240 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1241 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1243 (add-before 'configure 'set-additional-paths
1244 (lambda* (#:key inputs #:allow-other-keys)
1245 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1246 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1247 (string-append "ALSA_INCLUDE="
1248 (assoc-ref inputs "alsa-lib")
1249 "/include/alsa/version.h")))
1252 (string-append (assoc-ref inputs "libxcomposite")
1253 "/include/X11/extensions" ":"
1254 (assoc-ref inputs "libxrender")
1255 "/include/X11/extensions" ":"
1256 (assoc-ref inputs "libxtst")
1257 "/include/X11/extensions" ":"
1258 (assoc-ref inputs "libxinerama")
1259 "/include/X11/extensions" ":"
1260 (or (getenv "CPATH") "")))
1261 (setenv "ALT_OBJCOPY" (which "objcopy"))
1262 (setenv "ALT_CUPS_HEADERS_PATH"
1263 (string-append (assoc-ref inputs "cups")
1265 (setenv "ALT_FREETYPE_HEADERS_PATH"
1266 (string-append (assoc-ref inputs "freetype")
1268 (setenv "ALT_FREETYPE_LIB_PATH"
1269 (string-append (assoc-ref inputs "freetype")
1272 (add-before 'build 'disable-os-version-check
1273 ;; allow build on linux major version change
1275 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1277 (add-before 'check 'fix-test-framework
1279 ;; Fix PATH in test environment
1280 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1281 (("PATH=/bin:/usr/bin")
1282 (string-append "PATH=" (getenv "PATH"))))
1283 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1284 (("/usr/bin/env") (which "env")))
1285 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1286 (("/bin/rm") (which "rm"))
1287 (("/bin/cp") (which "cp"))
1288 (("/bin/mv") (which "mv")))
1290 (add-before 'check 'fix-hotspot-tests
1292 (with-directory-excursion "openjdk.src/hotspot/test/"
1293 (substitute* "jprt.config"
1294 (("PATH=\"\\$\\{path4sdk\\}\"")
1295 (string-append "PATH=" (getenv "PATH")))
1296 (("make=/usr/bin/make")
1297 (string-append "make=" (which "make"))))
1298 (substitute* '("runtime/6626217/Test6626217.sh"
1299 "runtime/7110720/Test7110720.sh")
1300 (("/bin/rm") (which "rm"))
1301 (("/bin/cp") (which "cp"))
1302 (("/bin/mv") (which "mv"))))
1304 (add-before 'check 'fix-jdk-tests
1306 (with-directory-excursion "openjdk.src/jdk/test/"
1307 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1308 (("/bin/pwd") (which "pwd")))
1309 (substitute* "com/sun/jdi/ShellScaffold.sh"
1310 (("/bin/kill") (which "kill")))
1311 (substitute* "start-Xvfb.sh"
1312 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1313 (("/usr/bin/nohup") (which "nohup")))
1314 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1315 (("/bin/rm") (which "rm")))
1316 (substitute* "tools/launcher/MultipleJRE.sh"
1317 (("echo \"#!/bin/sh\"")
1318 (string-append "echo \"#!" (which "rm") "\""))
1319 (("/usr/bin/zip") (which "zip")))
1320 (substitute* "com/sun/jdi/OnThrowTest.java"
1321 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1322 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1323 (("/usr/bin/uptime") (which "uptime")))
1324 (substitute* "java/lang/ProcessBuilder/Basic.java"
1325 (("/usr/bin/env") (which "env"))
1326 (("/bin/false") (which "false"))
1327 (("/bin/true") (which "true"))
1328 (("/bin/cp") (which "cp"))
1329 (("/bin/sh") (which "sh")))
1330 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1331 (("/bin/sh") (which "sh")))
1332 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1333 (("/usr/bin/perl") (which "perl"))
1334 (("/bin/ps") (which "ps"))
1335 (("/bin/true") (which "true")))
1336 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1337 (("/usr/bin/tee") (which "tee")))
1338 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1339 (("/bin/true") (which "true")))
1340 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1341 (("/bin/cat") (which "cat")))
1342 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1343 (("/bin/sh") (which "sh"))
1344 (("/bin/true") (which "true"))
1345 (("/bin/kill") (which "kill")))
1346 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1347 (("/usr/bin/echo") (which "echo")))
1348 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1349 (("/usr/bin/cat") (which "cat")))
1350 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1351 (("/bin/cat") (which "cat"))
1352 (("/bin/sleep") (which "sleep"))
1353 (("/bin/sh") (which "sh")))
1354 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1355 (("/bin/cat") (which "cat")))
1356 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1357 (("/bin/chmod") (which "chmod")))
1358 (substitute* "java/util/zip/ZipFile/Assortment.java"
1359 (("/bin/sh") (which "sh"))))
1363 ;; The "make check-*" targets always return zero, so we need to
1364 ;; check for errors in the associated log files to determine
1365 ;; whether any tests have failed.
1366 (use-modules (ice-9 rdelim))
1367 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1368 (checker (lambda (port)
1370 (let ((line (read-line port)))
1372 ((eof-object? line) #t)
1373 ((regexp-exec error-pattern line)
1374 (error "test failed"))
1376 (run-test (lambda (test)
1377 (invoke "make" test)
1378 (call-with-input-file
1379 (string-append "test/" test ".log")
1381 (when #f ; skip tests
1382 (run-test "check-hotspot")
1383 (run-test "check-langtools")
1384 (run-test "check-jdk"))
1387 (lambda* (#:key outputs #:allow-other-keys)
1388 (let ((doc (string-append (assoc-ref outputs "doc")
1389 "/share/doc/icedtea"))
1390 (jre (assoc-ref outputs "out"))
1391 (jdk (assoc-ref outputs "jdk")))
1392 (copy-recursively "openjdk.build/docs" doc)
1393 (copy-recursively "openjdk.build/j2re-image" jre)
1394 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1396 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1397 ;; But that shared object is located in the server/ folder, so it
1398 ;; cannot be found. This phase creates a symbolic link in the
1399 ;; lib/amd64 folder so that the other libraries can find it.
1402 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1404 ;; FIXME: Find the bug in the build system, so that this symlink is
1406 (add-after 'install 'install-libjvm
1407 (lambda* (#:key inputs outputs #:allow-other-keys)
1408 (let* ((lib-path (string-append (assoc-ref outputs "out")
1409 ;; See 'INSTALL_ARCH_DIR' in
1411 ,(match (%current-system)
1420 (symlink (string-append lib-path "/server/libjvm.so")
1421 (string-append lib-path "/libjvm.so")))
1423 ;; By default IcedTea only generates an empty keystore. In order to
1424 ;; be able to use certificates in Java programs we need to generate a
1425 ;; keystore from a set of certificates. For convenience we use the
1426 ;; certificates from the nss-certs package.
1427 (add-after 'install 'install-keystore
1428 (lambda* (#:key inputs outputs #:allow-other-keys)
1429 (let* ((keystore "cacerts")
1430 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1432 (keytool (string-append (assoc-ref outputs "jdk")
1434 (define (extract-cert file target)
1435 (call-with-input-file file
1437 (call-with-output-file target
1439 (let loop ((line (read-line in 'concat))
1442 ((eof-object? line) #t)
1443 ((string-prefix? "-----BEGIN" line)
1445 (loop (read-line in 'concat) #t))
1446 ((string-prefix? "-----END" line)
1450 (when copying? (display line out))
1451 (loop (read-line in 'concat) copying?)))))))))
1452 (define (import-cert cert)
1453 (format #t "Importing certificate ~a\n" (basename cert))
1454 (let ((temp "tmpcert"))
1455 (extract-cert cert temp)
1456 (let ((port (open-pipe* OPEN_WRITE keytool
1458 "-alias" (basename cert)
1459 "-keystore" keystore
1460 "-storepass" "changeit"
1462 (display "yes\n" port)
1463 (when (not (zero? (status:exit-val (close-pipe port))))
1464 (format #t "failed to import ~a\n" cert)))
1465 (delete-file temp)))
1467 ;; This is necessary because the certificate directory contains
1468 ;; files with non-ASCII characters in their names.
1469 (setlocale LC_ALL "en_US.utf8")
1470 (setenv "LC_ALL" "en_US.utf8")
1472 (for-each import-cert (find-files certs-dir "\\.pem$"))
1473 (mkdir-p (string-append (assoc-ref outputs "out")
1475 (mkdir-p (string-append (assoc-ref outputs "jdk")
1476 "/jre/lib/security"))
1478 ;; The cacerts files we are going to overwrite are chmod'ed as
1479 ;; read-only (444) in icedtea-8 (which derives from this
1480 ;; package). We have to change this so we can overwrite them.
1481 (chmod (string-append (assoc-ref outputs "out")
1482 "/lib/security/" keystore) #o644)
1483 (chmod (string-append (assoc-ref outputs "jdk")
1484 "/jre/lib/security/" keystore) #o644)
1486 (install-file keystore
1487 (string-append (assoc-ref outputs "out")
1489 (install-file keystore
1490 (string-append (assoc-ref outputs "jdk")
1491 "/jre/lib/security"))
1496 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1499 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1502 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1505 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1508 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1511 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1516 "http://icedtea.classpath.org/downloads/drops"
1517 "/icedtea7/" version "/hotspot.tar.bz2"))
1520 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1521 (patches (search-patches
1522 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1523 ("ant" ,ant-bootstrap)
1525 ("coreutils" ,coreutils)
1526 ("diffutils" ,diffutils) ;for tests
1529 ("libtool" ,libtool)
1530 ("pkg-config" ,pkg-config)
1536 ("fastjar" ,fastjar)
1537 ("libxslt" ,libxslt) ;for xsltproc
1538 ("nss-certs" ,nss-certs)
1540 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1541 ("jdk" ,icedtea-6 "jdk")))
1543 `(("alsa-lib" ,alsa-lib)
1546 ("libxcomposite" ,libxcomposite)
1548 ("libxtst" ,libxtst)
1550 ("libxinerama" ,libxinerama)
1551 ("libxrender" ,libxrender)
1552 ("libjpeg" ,libjpeg)
1554 ("mit-krb5" ,mit-krb5)
1557 ("fontconfig" ,fontconfig)
1558 ("freetype" ,freetype)
1562 (home-page "http://icedtea.classpath.org")
1563 (synopsis "Java development kit")
1565 "This package provides the Java development kit OpenJDK built with the
1566 IcedTea build harness.")
1568 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1569 (supported-systems (delete "mips64el-linux" %supported-systems))
1571 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1572 ;; same license as both GNU Classpath and OpenJDK.
1573 (license license:gpl2+))))
1575 (define-public icedtea-8
1576 (let* ((version "3.7.0")
1577 (drop (lambda (name hash)
1581 "http://icedtea.classpath.org/download/drops"
1582 "/icedtea8/" version "/" name ".tar.xz"))
1583 (sha256 (base32 hash))))))
1584 (package (inherit icedtea-7)
1589 "http://icedtea.wildebeest.org/download/source/icedtea-"
1593 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1594 (modules '((guix build utils)))
1597 (substitute* '("configure"
1599 ;; Do not embed build time
1600 (("(DIST_ID=\"Custom build).*$" _ prefix)
1601 (string-append prefix "\"\n"))
1602 ;; Do not leak information about the build host
1603 (("DIST_NAME=\"\\$build_os\"")
1604 "DIST_NAME=\"guix\""))
1607 `(#:imported-modules
1608 ((guix build ant-build-system)
1609 (guix build syscalls)
1610 ,@%gnu-build-system-modules)
1611 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1612 ((#:modules modules)
1613 `((guix build utils)
1614 (guix build gnu-build-system)
1615 ((guix build ant-build-system) #:prefix ant:)
1620 ((#:configure-flags flags)
1621 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1622 `( ;;"--disable-bootstrap"
1623 "--enable-bootstrap"
1625 "--disable-downloading"
1626 "--disable-system-pcsc"
1627 "--disable-system-sctp"
1628 "--disable-tests" ;they are run in the check phase instead
1629 "--with-openjdk-src-dir=./openjdk.src"
1630 ,(string-append "--with-jdk-home=" jdk))))
1632 `(modify-phases ,phases
1633 (delete 'fix-x11-extension-include-path)
1634 (delete 'patch-paths)
1635 (delete 'set-additional-paths)
1636 (delete 'patch-patches)
1637 (delete 'patch-bitrot)
1638 ;; Prevent the keytool from recording the current time when
1639 ;; adding certificates at build time.
1640 (add-after 'unpack 'patch-keystore
1642 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1643 (("date = new Date\\(\\);")
1645 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1646 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1649 (add-after 'unpack 'patch-jni-libs
1650 ;; Hardcode dynamically loaded libraries.
1652 (let* ((library-path (search-path-as-string->list
1653 (getenv "LIBRARY_PATH")))
1654 (find-library (lambda (name)
1657 (string-append "lib" name ".so")))))
1660 (catch 'decoding-error
1663 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1665 (format #f "\"~a\"" (find-library name)))
1666 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1667 (format #f "\"~a\"" (find-library name)))))
1669 ;; Those are safe to skip.
1670 (format (current-error-port)
1671 "warning: failed to substitute: ~a~%"
1673 (find-files "openjdk.src/jdk/src/solaris/native"
1677 (lambda* (#:key outputs #:allow-other-keys)
1678 (let ((doc (string-append (assoc-ref outputs "doc")
1679 "/share/doc/icedtea"))
1680 (jre (assoc-ref outputs "out"))
1681 (jdk (assoc-ref outputs "jdk")))
1682 (copy-recursively "openjdk.build/docs" doc)
1683 (copy-recursively "openjdk.build/images/j2re-image" jre)
1684 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1685 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1687 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1688 (string-append jre "/lib/security/nss.cfg"))
1690 (add-after 'install 'strip-jar-timestamps
1691 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1693 `(("jdk" ,icedtea-7 "jdk")
1696 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1699 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1702 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1705 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1708 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1711 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1714 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1719 "http://icedtea.classpath.org/download/drops"
1720 "/icedtea8/" version "/hotspot.tar.xz"))
1723 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1724 (patches (search-patches
1725 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1728 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1731 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1732 ,@(fold alist-delete (package-native-inputs icedtea-7)
1733 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1734 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1736 (define-public openjdk9
1742 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1743 (file-name (string-append name "-" version ".tar.bz2"))
1746 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1747 (modules '((guix build utils)))
1750 (for-each delete-file (find-files "." ".*.bin$"))
1751 (for-each delete-file (find-files "." ".*.exe$"))
1752 (for-each delete-file (find-files "." ".*.jar$"))
1754 (build-system gnu-build-system)
1755 (outputs '("out" "jdk" "doc"))
1757 `(#:tests? #f; require jtreg
1759 ((guix build syscalls)
1760 ,@%gnu-build-system-modules)
1762 (modify-phases %standard-phases
1763 (add-after 'patch-source-shebangs 'fix-java-shebangs
1765 ;; This file was "fixed" by patch-source-shebangs, but it requires
1766 ;; this exact first line.
1767 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1768 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1771 (lambda* (#:key inputs outputs #:allow-other-keys)
1772 ;; TODO: unbundle libpng and lcms
1773 (invoke "bash" "./configure"
1774 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1775 "--disable-freetype-bundling"
1776 "--disable-warnings-as-errors"
1777 "--disable-hotspot-gtest"
1778 "--with-giflib=system"
1779 "--with-libjpeg=system"
1780 (string-append "--prefix=" (assoc-ref outputs "out")))
1784 (with-output-to-file ".src-rev"
1786 (display ,version)))
1787 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1788 (invoke "make" "all")
1790 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1791 ;; But that shared object is located in the server/ folder, so it
1792 ;; cannot be found. This phase creates a symbolic link in the
1793 ;; lib/ folder so that the other libraries can find it.
1796 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1798 ;; FIXME: Find the bug in the build system, so that this symlink is
1800 (add-after 'install 'install-libjvm
1801 (lambda* (#:key inputs outputs #:allow-other-keys)
1802 (let* ((lib-out (string-append (assoc-ref outputs "out")
1804 (lib-jdk (string-append (assoc-ref outputs "jdk")
1806 (symlink (string-append lib-jdk "/server/libjvm.so")
1807 (string-append lib-jdk "/libjvm.so"))
1808 (symlink (string-append lib-out "/server/libjvm.so")
1809 (string-append lib-out "/libjvm.so")))
1812 (lambda* (#:key outputs #:allow-other-keys)
1813 (let ((out (assoc-ref outputs "out"))
1814 (jdk (assoc-ref outputs "jdk"))
1815 (doc (assoc-ref outputs "doc"))
1816 (images (car (find-files "build" ".*-server-release"
1817 #:directories? #t))))
1818 (copy-recursively (string-append images "/images/jdk") jdk)
1819 (copy-recursively (string-append images "/images/jre") out)
1820 (copy-recursively (string-append images "/images/docs") doc))
1822 (add-after 'install 'strip-zip-timestamps
1823 (lambda* (#:key outputs #:allow-other-keys)
1824 (use-modules (guix build syscalls))
1825 (for-each (lambda (zip)
1826 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1827 (with-directory-excursion dir
1828 (invoke "unzip" zip))
1830 (for-each (lambda (file)
1831 (let ((s (lstat file)))
1832 (unless (eq? (stat:type s) 'symlink)
1833 (format #t "reset ~a~%" file)
1834 (utime file 0 0 0 0))))
1835 (find-files dir #:directories? #t))
1836 (with-directory-excursion dir
1837 (let ((files (find-files "." ".*" #:directories? #t)))
1838 (apply invoke "zip" "-0" "-X" zip files)))))
1839 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1842 `(("alsa-lib" ,alsa-lib)
1844 ("fontconfig" ,fontconfig)
1845 ("freetype" ,freetype)
1849 ("libjpeg" ,libjpeg)
1853 ("libxcomposite" ,libxcomposite)
1855 ("libxinerama" ,libxinerama)
1856 ("libxrender" ,libxrender)
1858 ("libxtst" ,libxtst)))
1860 `(("icedtea-8" ,icedtea-8)
1861 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1865 (home-page "https://openjdk.java.net/projects/jdk9/")
1866 (synopsis "Java development kit")
1868 "This package provides the Java development kit OpenJDK.")
1869 (license license:gpl2+)))
1871 (define-public openjdk10
1878 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1879 (file-name (string-append name "-" version ".tar.bz2"))
1882 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1883 (patches (search-patches
1884 "openjdk-10-idlj-reproducibility.patch"))
1885 (modules '((guix build utils)))
1888 (for-each delete-file (find-files "." ".*.bin$"))
1889 (for-each delete-file (find-files "." ".*.exe$"))
1890 (for-each delete-file (find-files "." ".*.jar$"))
1893 (substitute-keyword-arguments (package-arguments openjdk9)
1895 `(modify-phases ,phases
1896 (replace 'fix-java-shebangs
1898 ;; This file was "fixed" by patch-source-shebangs, but it requires
1899 ;; this exact first line.
1900 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1901 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1904 (lambda* (#:key inputs outputs #:allow-other-keys)
1905 (invoke "bash" "./configure"
1906 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1907 "--disable-freetype-bundling"
1908 "--disable-warnings-as-errors"
1909 "--disable-hotspot-gtest"
1910 "--with-giflib=system"
1911 "--with-libjpeg=system"
1912 "--with-native-debug-symbols=zipped"
1913 (string-append "--prefix=" (assoc-ref outputs "out")))
1916 `(("openjdk9" ,openjdk9)
1917 ("openjdk9:jdk" ,openjdk9 "jdk")
1922 (define-public openjdk11
1928 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1929 (file-name (string-append name "-" version ".tar.bz2"))
1932 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1933 (modules '((guix build utils)))
1936 (for-each delete-file (find-files "." ".*.bin$"))
1937 (for-each delete-file (find-files "." ".*.exe$"))
1938 (for-each delete-file (find-files "." ".*.jar$"))
1940 (build-system gnu-build-system)
1941 (outputs '("out" "jdk" "doc"))
1943 `(#:imported-modules
1944 ((guix build syscalls)
1945 (ice-9 binary-ports)
1947 ,@%gnu-build-system-modules)
1948 #:tests? #f; requires jtreg
1949 ;; TODO package jtreg
1950 ;; disable parallel builds, as the openjdk build system does not like -j
1951 #:parallel-build? #f
1952 #:parallel-tests? #f
1953 ;; reenable parallel builds and tests by adding the flags manually
1954 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1956 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1957 "--disable-warnings-as-errors"
1958 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1959 "--with-native-debug-symbols=zipped"
1960 ;; do not use the bundled libraries
1961 "--with-giflib=system"
1962 "--with-lcms=system"
1963 "--with-libjpeg=system"
1964 "--with-libpng=system"
1965 "--with-version-pre="
1966 ;; allow the build system to locate the system freetype
1967 ,(string-append "--with-freetype-include="
1968 (assoc-ref %build-inputs "freetype") "/include")
1969 ,(string-append "--with-freetype-lib="
1970 (assoc-ref %build-inputs "freetype") "/lib"))
1973 (modify-phases %standard-phases
1974 (add-after 'patch-source-shebangs 'fix-java-shebangs
1976 ;; This file was "fixed" by patch-source-shebangs, but it requires
1977 ;; this exact first line.
1978 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1979 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1983 (with-output-to-file ".src-rev"
1985 (display ,version)))
1986 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1987 (invoke "make" "all")
1989 ;; jdk 11 does not build jre by default any more
1990 ;; building it anyways
1991 ;; for further information see:
1992 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
1993 (add-after 'build 'build-jre
1995 (invoke "make" "legacy-jre-image")
1998 (lambda* (#:key outputs #:allow-other-keys)
1999 (let ((out (assoc-ref outputs "out"))
2000 (jdk (assoc-ref outputs "jdk"))
2001 (doc (assoc-ref outputs "doc"))
2002 (images (car (find-files "build" ".*-server-release"
2003 #:directories? #t))))
2004 (copy-recursively (string-append images "/images/jdk") jdk)
2005 (copy-recursively (string-append images "/images/jre") out)
2006 (copy-recursively (string-append images "/images/docs") doc))
2008 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2009 ;; But that shared object is located in the server/ folder, so it
2010 ;; cannot be found. This phase creates a symbolic link in the
2011 ;; lib/ folder so that the other libraries can find it.
2014 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2016 ;; FIXME: Find the bug in the build system, so that this symlink is
2018 (add-after 'install 'install-libjvm
2019 (lambda* (#:key inputs outputs #:allow-other-keys)
2020 (let* ((lib-out (string-append (assoc-ref outputs "out")
2022 (lib-jdk (string-append (assoc-ref outputs "jdk")
2024 (symlink (string-append lib-jdk "/server/libjvm.so")
2025 (string-append lib-jdk "/libjvm.so"))
2026 (symlink (string-append lib-out "/server/libjvm.so")
2027 (string-append lib-out "/libjvm.so")))
2029 (add-after 'install 'strip-character-data-timestamps
2030 (lambda* (#:key outputs #:allow-other-keys)
2031 (use-modules (guix build syscalls))
2032 (let ((archive (string-append
2033 (assoc-ref outputs "jdk") "/lib/src.zip"))
2034 (dir (mkdtemp! "zip-contents.XXXXXX")))
2035 (with-directory-excursion dir
2036 (invoke "unzip" archive))
2037 (delete-file archive)
2038 (with-directory-excursion dir
2039 (let ((char-data-files (find-files "." "CharacterData.*")))
2040 (for-each (lambda (file)
2042 (((string-append "This file was generated "
2043 "AUTOMATICALLY from a template "
2045 (string-append "This file was generated "
2046 "AUTOMATICALLY from a template "
2049 (with-directory-excursion dir
2050 (let ((files (find-files "." ".*" #:directories? #t)))
2051 (apply invoke "zip" "-0" "-X" archive files))))))
2052 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2053 (lambda* (#:key outputs #:allow-other-keys)
2054 (use-modules (guix build syscalls)
2055 (ice-9 binary-ports)
2057 (letrec ((repack-archive
2059 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2060 (with-directory-excursion dir
2061 (invoke "unzip" archive))
2062 (delete-file archive)
2063 (for-each (compose repack-archive canonicalize-path)
2064 (find-files dir "(ct.sym|.*.jar)$"))
2065 (let ((reset-file-timestamp
2067 (let ((s (lstat file)))
2068 (unless (eq? (stat:type s) 'symlink)
2069 (format #t "reset ~a~%" file)
2070 (utime file 0 0 0 0))))))
2071 (for-each reset-file-timestamp
2072 (find-files dir #:directories? #t)))
2073 (with-directory-excursion dir
2074 (let ((files (find-files "." ".*" #:directories? #t)))
2075 (apply invoke "zip" "-0" "-X" archive files)))))))
2076 (for-each repack-archive
2077 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2078 (for-each repack-archive
2079 (find-files (assoc-ref outputs "jdk")
2080 ".*.(zip|jar|diz)$"))
2081 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2084 (call-with-input-file file-name
2086 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2087 (if (equal? (get-bytevector-n
2088 file (bytevector-length header))
2090 (let* ((header-length (bytevector-length header))
2091 (temp-file (mkstemp!
2093 "temp-file.XXXXXX")))
2094 (temp-filename (port-filename temp-file))
2096 (- (stat:size (stat file))
2098 (sendfile temp-file file content-length header-length)
2099 (delete-file file-name)
2100 (close-port temp-file)
2101 (repack-archive (canonicalize-path temp-filename))
2102 (call-with-output-file file-name
2104 (put-bytevector file header)
2105 (call-with-input-file temp-filename
2109 (stat:size (stat temp-file)) 0)))))))))))))
2110 (for-each repack-jmod
2111 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2113 (add-after 'install 'remove-timestamp-from-api-summary
2114 (lambda* (#:key outputs #:allow-other-keys)
2115 (substitute* (string-append (assoc-ref outputs "doc")
2116 "/api/overview-summary.html")
2117 (("Generated by javadoc \\(11-internal\\).*$")
2118 "Generated by javadoc (11-internal) -->\n"))
2121 `(("alsa-lib" ,alsa-lib)
2123 ("fontconfig" ,fontconfig)
2124 ("freetype" ,freetype)
2127 ("libjpeg" ,libjpeg)
2130 ("libxext" ,libxext)
2131 ("libxrender" ,libxrender)
2133 ("libxtst" ,libxtst)))
2135 `(("autoconf" ,autoconf)
2136 ("openjdk10" ,openjdk10)
2137 ("openjdk10:jdk" ,openjdk10 "jdk")
2138 ("pkg-config" ,pkg-config)
2142 (home-page "https://openjdk.java.net/projects/jdk/11/")
2143 (synopsis "Java development kit")
2145 "This package provides the Java development kit OpenJDK.")
2146 (license license:gpl2+)))
2148 (define-public openjdk12
2155 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2156 (file-name (string-append name "-" version ".tar.bz2"))
2159 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2160 (modules '((guix build utils)))
2163 (for-each delete-file (find-files "." ".*.bin$"))
2164 (for-each delete-file (find-files "." ".*.exe$"))
2165 (for-each delete-file (find-files "." ".*.jar$"))
2168 `(("alsa-lib" ,alsa-lib)
2170 ("fontconfig" ,fontconfig)
2171 ("freetype" ,freetype)
2174 ("libjpeg" ,libjpeg)
2177 ("libxext" ,libxext)
2178 ("libxrandr" ,libxrandr)
2179 ("libxrender" ,libxrender)
2181 ("libxtst" ,libxtst)))
2183 `(("autoconf" ,autoconf)
2184 ("openjdk11" ,openjdk11)
2185 ("openjdk11:jdk" ,openjdk11 "jdk")
2186 ("pkg-config" ,pkg-config)
2190 (home-page "https://openjdk.java.net/projects/jdk/12")))
2192 (define-public icedtea icedtea-8)
2195 (define-public ant/java8
2196 (package (inherit ant-bootstrap)
2201 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2202 version "-src.tar.gz"))
2205 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2206 (modules '((guix build utils)))
2209 (for-each delete-file
2210 (find-files "lib/optional" "\\.jar$"))
2213 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2215 `(modify-phases ,phases
2216 (add-after 'unpack 'remove-scripts
2217 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2220 (for-each delete-file
2221 (find-files "src/script"
2222 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2225 (lambda* (#:key inputs outputs #:allow-other-keys)
2226 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2228 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2229 ;; Ant to build. This is necessary in addition to disabling the
2230 ;; "check" phase, because the dependency on "test-jar" would always
2231 ;; result in the tests to be run.
2232 (substitute* "build.xml"
2233 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2234 (invoke "bash" "bootstrap.sh"
2235 (string-append "-Ddist.dir="
2236 (assoc-ref outputs "out")))))))))
2238 `(("jdk" ,icedtea-8 "jdk")
2240 ("unzip" ,unzip)))))
2242 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2245 (package (inherit ant/java8)
2249 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2250 version "-src.tar.gz"))
2253 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2255 `(("jdk" ,icedtea-7 "jdk")
2257 ("unzip" ,unzip)))))
2259 (define-public ant-apache-bcel
2262 (name "ant-apache-bcel")
2264 (substitute-keyword-arguments (package-arguments ant/java8)
2266 `(modify-phases ,phases
2267 (add-after 'unpack 'link-bcel
2268 (lambda* (#:key inputs #:allow-other-keys)
2269 (for-each (lambda (file)
2271 (string-append "lib/optional/"
2273 (find-files (assoc-ref inputs "java-commons-bcel")
2276 (add-after 'build 'install
2277 (lambda* (#:key outputs #:allow-other-keys)
2278 (let* ((out (assoc-ref outputs "out"))
2279 (share (string-append out "/share/java"))
2280 (bin (string-append out "/bin"))
2281 (lib (string-append out "/lib")))
2283 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2284 (delete-file-recursively bin)
2285 (delete-file-recursively lib)
2288 `(("java-commons-bcel" ,java-commons-bcel)
2289 ,@(package-inputs ant/java8)))))
2291 (define-public ant-junit
2296 (substitute-keyword-arguments (package-arguments ant/java8)
2298 `(modify-phases ,phases
2299 (add-after 'unpack 'link-junit
2300 (lambda* (#:key inputs #:allow-other-keys)
2301 (for-each (lambda (file)
2303 (string-append "lib/optional/"
2305 (find-files (assoc-ref inputs "java-junit")
2308 (add-after 'build 'install
2309 (lambda* (#:key outputs #:allow-other-keys)
2310 (let* ((out (assoc-ref outputs "out"))
2311 (share (string-append out "/share/java"))
2312 (bin (string-append out "/bin"))
2313 (lib (string-append out "/lib")))
2315 (install-file (string-append lib "/ant-junit.jar") share)
2316 (delete-file-recursively bin)
2317 (delete-file-recursively lib)
2320 `(("java-junit" ,java-junit)
2321 ,@(package-inputs ant/java8)))))
2323 (define-public java-openjfx-build
2325 (name "java-openjfx-build")
2326 ;; This is a java-8 version
2331 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2332 (changeset (string-append
2333 (string-join (string-split version #\.) "u")
2335 (file-name (string-append name "-" version "-checkout"))
2338 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2339 (build-system ant-build-system)
2341 `(#:jar-name "java-openjfx.jar"
2342 #:source-dir "buildSrc/src/main/java"
2343 #:test-dir "buildSrc/src/test"
2345 (modify-phases %standard-phases
2346 (add-before 'configure 'generate-jsl-parser
2348 (invoke "antlr3" "-o"
2349 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2350 "buildSrc/src/main/antlr/JSL.g"))))))
2352 `(("antlr3" ,antlr3)
2353 ("java-stringtemplate" ,java-stringtemplate)))
2355 `(("java-junit" ,java-junit)
2356 ("java-hamcrest-core" ,java-hamcrest-core)))
2357 (home-page "https://openjfx.io")
2358 (synopsis "Graphical application toolkit in Java")
2359 (description "OpenJFX is a client application platform for desktop,
2360 mobile and embedded systems built on Java. Its goal is to produce a
2361 modern, efficient, and fully featured toolkit for developing rich client
2362 applications. This package contains base classes for the OpenJFX
2363 distribution and helper classes for building other parts of the
2365 (license license:gpl2))) ;gpl2 only, with classpath exception
2367 (define-public java-openjfx-base
2368 (package (inherit java-openjfx-build)
2369 (name "java-openjfx-base")
2371 `(#:jar-name "java-openjfx-base.jar"
2372 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2373 #:test-dir "modules/base/src/test"
2375 (modify-phases %standard-phases
2376 (add-before 'check 'remove-empty-file
2378 (with-directory-excursion "modules/base/src/test/java"
2379 ;; These files are completely commented, but junit expects them to
2380 ;; contain a class, so tests fail.
2382 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2384 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2385 (delete-file "javafx/beans/property/PropertiesTest.java")
2387 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2389 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2392 `(("java-openjfx-build" ,java-openjfx-build)))
2393 (description "OpenJFX is a client application platform for desktop,
2394 mobile and embedded systems built on Java. Its goal is to produce a
2395 modern, efficient, and fully featured toolkit for developing rich client
2396 applications. This package contains base classes for the OpenJFX
2399 (define-public java-openjfx-graphics
2400 (package (inherit java-openjfx-build)
2401 (name "java-openjfx-graphics")
2403 `(#:jar-name "java-openjfx-graphics.jar"
2404 #:source-dir "modules/graphics/src/main/java"
2405 #:tests? #f; require X
2406 #:test-dir "modules/graphics/src/test"))
2408 `(("java-openjfx-base" ,java-openjfx-base)
2409 ("java-swt" ,java-swt)))
2410 (description "OpenJFX is a client application platform for desktop,
2411 mobile and embedded systems built on Java. Its goal is to produce a
2412 modern, efficient, and fully featured toolkit for developing rich client
2413 applications. This package contains graphics-related classes for the
2414 OpenJFX distribution.")))
2416 (define-public java-openjfx-media
2417 (package (inherit java-openjfx-build)
2418 (name "java-openjfx-media")
2420 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2422 `(#:jar-name "java-openjfx-media.jar"
2423 #:source-dir "modules/media/src/main/java"
2424 #:tests? #f)); no tests
2425 (description "OpenJFX is a client application platform for desktop,
2426 mobile and embedded systems built on Java. Its goal is to produce a
2427 modern, efficient, and fully featured toolkit for developing rich client
2428 applications. This package contains media-related classes for the
2429 OpenJFX distribution.")))
2431 (define-public javacc-4
2438 (url "https://github.com/javacc/javacc.git")
2439 (commit "release_41")))
2440 (file-name (string-append "javacc-" version "-checkout"))
2443 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2444 (modules '((guix build utils)))
2445 ;; delete bundled jars
2446 (snippet '(begin (delete-file-recursively "lib") #t))))
2447 (build-system ant-build-system)
2449 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2454 (modify-phases %standard-phases
2455 ;; Delete tests to avoid build failure (we don't run them anyway).
2456 (add-after 'unpack 'delete-tests
2458 (for-each delete-file
2459 '("src/org/javacc/JavaCCTestCase.java"
2460 "src/org/javacc/parser/ExpansionTest.java"
2461 "src/org/javacc/parser/OptionsTest.java"
2462 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2463 (for-each delete-file-recursively
2464 '("src/org/javacc/parser/test"
2465 "src/org/javacc/jjdoc/test"))
2467 (replace 'install (install-jars "bin/lib")))))
2468 (home-page "https://javacc.org/")
2469 (synopsis "Java parser generator")
2470 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2471 generator for use with Java applications. A parser generator is a tool that
2472 reads a grammar specification and converts it to a Java program that can
2473 recognize matches to the grammar. In addition to the parser generator itself,
2474 JavaCC provides other standard capabilities related to parser generation such
2475 as tree building (via a tool called JJTree included with JavaCC), actions,
2477 (license license:bsd-3)))
2479 (define-public javacc
2487 (url "https://github.com/javacc/javacc.git")
2489 (file-name (git-file-name "javacc" version))
2491 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2492 (modules '((guix build utils)))
2493 ;; Delete bundled jars.
2494 (snippet '(begin (for-each delete-file-recursively
2495 '("bootstrap" "lib"))
2498 `(#:make-flags ; bootstrap from javacc-4
2499 (list (string-append "-Dbootstrap-jar="
2500 (assoc-ref %build-inputs "javacc")
2501 "/share/java/javacc.jar"))
2502 #:test-target "test"
2504 (modify-phases %standard-phases
2505 (replace 'install (install-jars "target"))
2506 (add-after 'install 'install-bin
2507 (lambda* (#:key outputs inputs #:allow-other-keys)
2508 (let* ((out (assoc-ref outputs "out"))
2509 (dir (string-append out "/share/java"))
2510 (bin (string-append out "/bin"))
2511 (javacc (string-append bin "/javacc")))
2513 (with-output-to-file javacc
2516 (string-append "#!/bin/sh\n"
2517 (assoc-ref inputs "jdk") "/bin/java"
2518 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2519 (chmod javacc #o755)
2520 ;; symlink to different names to affect the first argument and
2521 ;; change the behavior of the jar file.
2522 (symlink javacc (string-append bin "/jjdoc"))
2523 (symlink javacc (string-append bin "/jjtree"))
2527 `(("javacc" ,javacc-4)))))
2529 ;; This is the last 3.x release of ECJ
2530 (define-public java-ecj-3
2536 (uri (string-append "http://archive.eclipse.org/eclipse/"
2537 "downloads/drops/R-" version
2538 "-201301310800/ecjsrc-" version ".jar"))
2541 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2542 (build-system ant-build-system)
2544 `(#:tests? #f ; none included
2545 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2546 #:make-flags (list "-f" "src/build.xml")
2547 #:build-target "build"
2549 (modify-phases %standard-phases
2550 (add-after 'unpack 'fix-manifest
2552 ;; Record the main class to make ecj executable.
2553 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2555 (display "Manifest-Version: 1.0
2556 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2559 (replace 'install (install-jars ".")))))
2560 (home-page "https://eclipse.org")
2561 (synopsis "Eclipse Java development tools core batch compiler")
2562 (description "This package provides the Eclipse Java core batch compiler.")
2563 (license license:epl1.0)))
2565 ;; This is needed for java-cisd-args4j
2566 (define-public java-ecj-3.5
2567 (package (inherit java-ecj-3)
2570 (method url-fetch/zipbomb)
2571 (uri (string-append "http://archive.eclipse.org/eclipse/"
2572 "downloads/drops/R-" version
2573 "-200909170800/ecjsrc-" version ".zip"))
2576 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2577 (build-system ant-build-system)
2579 `(#:tests? #f ; none included
2580 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2581 #:build-target "build"
2583 (modify-phases %standard-phases
2584 (add-after 'unpack 'fix-manifest
2586 ;; Record the main class to make ecj executable.
2587 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2590 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2593 (replace 'install (install-jars ".")))))
2595 `(("unzip" ,unzip)))))
2597 (define-public java-cisd-base
2598 (let ((revision 38938)
2599 (base-version "14.12.0"))
2601 (name "java-cisd-base")
2602 (version (string-append base-version "-" (number->string revision)))
2606 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2607 "base/tags/release/"
2608 (version-major+minor base-version)
2609 ".x/" base-version "/base/"))
2610 (revision revision)))
2611 (file-name (string-append "java-cisd-base-" version "-checkout"))
2614 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2615 (modules '((guix build utils)))
2618 ;; Delete included gradle jar
2619 (delete-file-recursively "gradle/wrapper")
2620 ;; Delete pre-built native libraries
2621 (delete-file-recursively "libs")
2623 (build-system ant-build-system)
2625 `(#:make-flags '("-file" "build/build.xml")
2626 #:test-target "jar-test"
2629 (modify-phases %standard-phases
2630 (add-after 'unpack 'unpack-build-resources
2631 (lambda* (#:key inputs #:allow-other-keys)
2632 (copy-recursively (assoc-ref inputs "build-resources")
2633 "../build_resources")
2635 (add-after 'unpack-build-resources 'fix-dependencies
2636 (lambda* (#:key inputs #:allow-other-keys)
2637 (substitute* "build/build.xml"
2638 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2639 (string-append (assoc-ref inputs "java-testng")
2640 "/share/java/java-testng.jar"))
2641 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2642 (string-append (assoc-ref inputs "java-commons-lang")
2643 "/share/java/commons-lang-"
2644 ,(package-version java-commons-lang) ".jar"))
2645 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2646 (string-append (assoc-ref inputs "java-commons-io")
2647 "/share/java/commons-io-"
2648 ,(package-version java-commons-io)
2650 ;; Remove dependency on svn
2651 (("<build-info.*") "")
2652 (("\\$\\{revision.number\\}")
2653 ,(number->string revision))
2654 (("\\$\\{version.number\\}") ,base-version))
2655 ;; Remove dependency on classycle
2656 (substitute* "../build_resources/ant/build-common.xml"
2657 (("<taskdef name=\"dependency-checker.*") "")
2658 (("classname=\"classycle.*") "")
2659 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2661 ;; A few tests fail because of the lack of a proper /etc/groups and
2662 ;; /etc/passwd file in the build container.
2663 (add-after 'unpack 'disable-broken-tests
2665 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2666 (("Unix.isOperational\\(\\)") "false"))
2668 ;; These decorators are almost useless and pull in an unpackaged
2670 (add-after 'unpack 'remove-useless-decorators
2672 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2674 (("import ch.rinn.restrictions.Private;") ""))
2675 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2677 (("import ch.rinn.restrictions.Friend;") ""))
2679 (add-before 'configure 'build-native-code
2680 (lambda* (#:key inputs #:allow-other-keys)
2681 (let ((jdk (assoc-ref inputs "jdk"))
2682 (dir ,(match (%current-system)
2685 ((or "armhf-linux" "aarch64-linux")
2687 ((or "x86_64-linux")
2689 (_ "unknown-Linux"))))
2690 (with-directory-excursion "source/c"
2691 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2692 (string-append "-I" jdk "/include")
2693 (string-append "-I" jdk "/include/linux")
2695 (invoke "gcc" "-shared" "-O3" "-fPIC"
2696 "-DMACHINE_BYTE_ORDER=1"
2704 (string-append "-I" jdk "/include")
2705 (string-append "-I" jdk "/include/linux")
2706 "-o" "libnativedata.so"))
2707 (install-file "source/c/libunix.so"
2708 (string-append "libs/native/unix/" dir))
2709 (install-file "source/c/libnativedata.so"
2710 (string-append "libs/native/nativedata/" dir))
2712 ;; In the "check" phase we only build the test executable.
2713 (add-after 'check 'run-tests
2715 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2716 (delete-file "targets/dist/sis-base-test.jar")
2718 (replace 'install (install-jars "targets/dist")))))
2720 `(("jdk" ,icedtea-8)
2721 ("java-commons-lang" ,java-commons-lang)
2722 ("java-commons-io" ,java-commons-io)
2723 ("java-testng" ,java-testng)
2728 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2729 "base/tags/release/"
2730 (version-major+minor base-version)
2732 "/build_resources/"))
2733 (revision revision)))
2736 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2737 (home-page "http://svnsis.ethz.ch")
2738 (synopsis "Utility classes for libraries from ETH Zurich")
2739 (description "This library supplies some utility classes needed for
2740 libraries from the SIS division at ETH Zurich like jHDF5.")
2741 ;; The C sources are under a non-copyleft license, which looks like a
2742 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2743 (license (list license:asl2.0
2744 (license:non-copyleft "file://source/c/COPYING"))))))
2746 (define-public java-cisd-args4j
2747 (let ((revision 39162)
2748 (base-version "9.11.2"))
2750 (name "java-cisd-args4j")
2751 (version (string-append base-version "-" (number->string revision)))
2755 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2756 "args4j/tags/release/"
2757 (version-major+minor base-version)
2758 ".x/" base-version "/args4j/"))
2759 (revision revision)))
2760 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2763 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2764 (build-system ant-build-system)
2766 `(#:make-flags '("-file" "build/build.xml")
2767 #:tests? #f ; there are no tests
2768 ;; There are weird build failures with JDK8, such as: "The type
2769 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2770 ;; referenced from required .class files"
2772 #:modules ((guix build ant-build-system)
2774 (guix build java-utils)
2779 (modify-phases %standard-phases
2780 (add-after 'unpack 'unpack-build-resources
2781 (lambda* (#:key inputs #:allow-other-keys)
2782 (mkdir-p "../build_resources")
2783 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2784 "-C" "../build_resources"
2785 "--strip-components=1")
2786 (mkdir-p "../build_resources/lib")
2788 (add-after 'unpack-build-resources 'fix-dependencies
2789 (lambda* (#:key inputs #:allow-other-keys)
2790 ;; FIXME: There should be a more convenient abstraction for
2791 ;; editing XML files.
2792 (with-directory-excursion "../build_resources/ant/"
2793 (chmod "build-common.xml" #o664)
2794 (call-with-output-file "build-common.xml.new"
2798 (with-input-from-file "build-common.xml"
2799 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2800 `(;; Remove dependency on classycle and custom ant tasks
2801 (taskdef . ,(lambda (tag . kids)
2802 (let ((name ((sxpath '(name *text*)) kids)))
2803 (if (or (member "build-info" name)
2804 (member "dependency-checker" name)
2805 (member "build-java-subprojects" name)
2806 (member "project-classpath" name))
2809 (typedef . ,(lambda (tag . kids)
2810 (let ((name ((sxpath '(name *text*)) kids)))
2811 (if (member "recursive-jar" name)
2814 (build-java-subprojects . ,(lambda _ '()))
2815 ;; Ignore everything else
2816 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2817 (*text* . ,(lambda (_ txt) txt))))
2819 (rename-file "build-common.xml.new" "build-common.xml"))
2820 (substitute* "build/build.xml"
2821 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2822 (string-append (assoc-ref inputs "java-cisd-base")
2823 "/share/java/sis-base.jar"))
2824 ;; Remove dependency on svn
2825 (("<build-info.*") "")
2826 (("\\$\\{revision.number\\}")
2827 ,(number->string revision))
2828 (("\\$\\{version.number\\}") ,base-version)
2829 ;; Don't use custom ant tasks.
2830 (("recursive-jar") "jar")
2831 (("<project-classpath.*") ""))
2833 (replace 'install (install-jars "targets/dist")))))
2835 `(("java-cisd-base" ,java-cisd-base)))
2837 `(("ecj" ,java-ecj-3.5)
2842 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2843 "args4j/tags/release/"
2844 (version-major+minor base-version)
2846 "/build_resources/"))
2847 (revision revision)))
2850 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2851 (modules '((guix build utils)))
2852 ;; Delete bundled pre-built jars.
2854 '(begin (delete-file-recursively "lib/") #t))))))
2855 (home-page "http://svnsis.ethz.ch")
2856 (synopsis "Command line parser library")
2857 (description "This package provides a parser for command line arguments.")
2858 (license license:asl2.0))))
2860 (define-public java-cisd-jhdf5
2861 (let ((revision 39162)
2862 (base-version "14.12.6"))
2864 (name "java-cisd-jhdf5")
2865 (version (string-append base-version "-" (number->string revision)))
2869 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2870 "jhdf5/tags/release/"
2871 (version-major+minor base-version)
2872 ".x/" base-version "/jhdf5/"))
2873 (revision revision)))
2874 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2877 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2878 (modules '((guix build utils)))
2881 ;; Delete included gradle jar
2882 (delete-file-recursively "gradle/wrapper")
2883 ;; Delete pre-built native libraries
2884 (delete-file-recursively "libs")
2886 (build-system ant-build-system)
2888 `(#:make-flags '("-file" "build/build.xml")
2889 #:build-target "jar-all"
2890 #:test-target "jar-test"
2893 (modify-phases %standard-phases
2894 ;; FIXME: this build phase fails.
2895 (delete 'generate-jar-indices)
2896 ;; Don't erase results from the build phase when building tests.
2897 (add-after 'unpack 'separate-test-target-from-clean
2899 (substitute* "build/build.xml"
2900 (("\"jar-test\" depends=\"clean, ")
2901 "\"jar-test\" depends=\""))
2903 (add-after 'unpack 'unpack-build-resources
2904 (lambda* (#:key inputs #:allow-other-keys)
2905 (copy-recursively (assoc-ref inputs "build-resources")
2906 "../build_resources")
2907 (delete-file-recursively "../build_resources/lib/")
2908 (mkdir-p "../build_resources/lib")
2909 ;; Remove dependency on classycle
2910 (substitute* "../build_resources/ant/build-common.xml"
2911 (("<taskdef name=\"dependency-checker.*") "")
2912 (("classname=\"classycle.*") "")
2913 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2914 ;; Remove dependency on svn
2915 (substitute* "build/build.xml"
2916 (("<build-info.*") "")
2917 (("\\$\\{revision.number\\}")
2918 ,(number->string revision))
2919 (("\\$\\{version.number\\}") ,base-version))
2921 (add-after 'unpack-build-resources 'fix-dependencies
2922 (lambda* (#:key inputs #:allow-other-keys)
2923 (substitute* "../build_resources/ant/build-common.xml"
2924 (("../libraries/testng/testng-jdk15.jar")
2925 (string-append (assoc-ref inputs "java-testng")
2926 "/share/java/java-testng.jar")))
2927 (substitute* "build/build.xml"
2928 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2929 (string-append (assoc-ref inputs "java-cisd-base")
2930 "/share/java/sis-base.jar"))
2931 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2932 (string-append (assoc-ref inputs "java-cisd-args4j")
2933 "/share/java/cisd-args4j.jar"))
2934 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2935 (string-append (assoc-ref inputs "java-commons-lang")
2936 "/share/java/commons-lang-"
2937 ,(package-version java-commons-lang) ".jar"))
2938 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2939 (string-append (assoc-ref inputs "java-commons-io")
2940 "/share/java/commons-io-"
2941 ,(package-version java-commons-io)
2943 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2944 (string-append (assoc-ref inputs "java-testng")
2945 "/share/java/java-testng.jar"))
2946 (("\\$\\{lib\\}/junit4/junit.jar")
2947 (string-append (assoc-ref inputs "java-junit")
2948 "/share/java/junit.jar"))
2949 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2950 (string-append (assoc-ref inputs "java-hamcrest-core")
2951 "/share/java/hamcrest-core.jar")))
2952 ;; Remove dependency on ch.rinn.restrictions
2953 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2954 (substitute* '("BitSetConversionUtils.java"
2956 (("import ch.rinn.restrictions.Private;") "")
2958 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2959 (substitute* '("BitSetConversionTest.java"
2960 "h5ar/HDF5ArchiverTest.java")
2961 (("import ch.rinn.restrictions.Friend;") "")
2963 ;; Remove leftovers from removing @Friend
2964 (substitute* "h5ar/HDF5ArchiverTest.java"
2965 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2968 (add-before 'configure 'build-native-library
2969 (lambda* (#:key inputs #:allow-other-keys)
2970 (let ((jdk (assoc-ref inputs "jdk"))
2971 (hdf5 (assoc-ref inputs "hdf5"))
2972 (dir ,(match (%current-system)
2975 ((or "armhf-linux" "aarch64-linux")
2977 ((or "x86_64-linux")
2979 (_ "unknown-Linux"))))
2980 (with-directory-excursion "source/c"
2981 (apply invoke `("gcc" "-shared" "-O3"
2983 "-Wl,--exclude-libs,ALL"
2984 ,@(find-files "jhdf5" "\\.c$")
2985 ,@(find-files "hdf-java" "\\.c$")
2986 ,(string-append "-I" hdf5 "/include")
2987 ,(string-append "-I" jdk "/include")
2988 ,(string-append "-I" jdk "/include/linux")
2989 ,(string-append hdf5 "/lib/libhdf5.a")
2990 "-o" "libjhdf5.so" "-lz")))
2991 (install-file "source/c/libjhdf5.so"
2992 (string-append "libs/native/jhdf5/" dir))
2994 ;; In the "check" phase we only build the test executable.
2995 (add-after 'check 'run-tests
2997 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2998 (delete-file "targets/dist/sis-jhdf5-test.jar")
3001 (install-jars "targets/dist")))))
3003 `(("java-cisd-base" ,java-cisd-base)
3004 ("java-cisd-args4j" ,java-cisd-args4j)
3005 ("java-commons-lang" ,java-commons-lang)
3006 ("java-commons-io" ,java-commons-io)
3010 `(("jdk" ,icedtea-8)
3011 ("java-testng" ,java-testng)
3012 ("java-junit" ,java-junit)
3013 ("java-jmock" ,java-jmock)
3014 ("java-hamcrest-core" ,java-hamcrest-core)
3019 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3020 "jhdf5/tags/release/"
3021 (version-major+minor base-version)
3023 "/build_resources/"))
3024 (revision revision)))
3027 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3028 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3029 (synopsis "Java binding for HDF5")
3030 (description "JHDF5 is a high-level API in Java for reading and writing
3031 HDF5 files, building on the libraries provided by the HDF Group.")
3032 ;; The C sources are under a non-copyleft license, which looks like a
3033 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3034 (license (list license:asl2.0
3035 (license:non-copyleft "file://source/c/COPYING"))))))
3037 (define-public java-classpathx-servletapi
3039 (name "java-classpathx-servletapi")
3043 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3044 "servletapi-" version ".tar.gz"))
3047 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3048 (build-system ant-build-system)
3050 `(#:tests? #f ; there is no test target
3051 #:build-target "compile"
3053 (list "-Dbuild.compiler=javac1.8"
3054 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3056 (modify-phases %standard-phases
3058 (lambda* (#:key make-flags #:allow-other-keys)
3059 (apply invoke `("ant" "dist" ,@make-flags)))))))
3060 (home-page "https://www.gnu.org/software/classpathx/")
3061 (synopsis "Java servlet API implementation")
3062 (description "This is the GNU servlet API distribution, part of the
3063 ClasspathX project. It provides implementations of version 3.0 of the servlet
3064 API and version 2.1 of the Java ServerPages API.")
3065 (license license:gpl3+)))
3067 (define-public java-javaee-servletapi
3069 (name "java-javaee-servletapi")
3073 (uri (string-append "https://github.com/javaee/servlet-spec/"
3074 "archive/" version ".zip"))
3075 (file-name (string-append name "-" version ".zip"))
3078 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
3079 (build-system ant-build-system)
3081 `(#:jar-name "javax-servletapi.jar"
3084 #:source-dir "src/main/java"))
3086 `(("unzip" ,unzip)))
3087 (home-page "https://javaee.github.io/servlet-spec/")
3088 (synopsis "Java servlet API")
3089 (description "Java Servlet is the foundation web specification in the
3090 Java Enterprise Platform. Developers can build web applications using the
3091 Servlet API to interact with the request/response workflow. This project
3092 provides information on the continued development of the Java Servlet
3094 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3095 ;; Some files are licensed under ASL 2.0.
3096 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3098 (define-public java-swt
3103 ;; The types of many variables and procedures differ in the sources
3104 ;; dependent on whether the target architecture is a 32-bit system or a
3105 ;; 64-bit system. Instead of patching the sources on demand in a build
3106 ;; phase we download either the 32-bit archive (which mostly uses "int"
3107 ;; types) or the 64-bit archive (which mostly uses "long" types).
3108 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3109 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3112 (let-values (((hash file)
3113 (match (or (%current-target-system) (%current-system))
3114 ("x86_64-linux" (values hash64 file64))
3115 (_ (values hash32 file32)))))
3119 "http://download.eclipse.org/eclipse/downloads/drops4/"
3120 "R-" version "-201710090410/swt-" version
3121 "-gtk-linux-" file ".zip"))
3122 (sha256 (base32 hash))))))
3123 (build-system ant-build-system)
3125 `(#:jar-name "swt.jar"
3127 #:tests? #f ; no "check" target
3129 (modify-phases %standard-phases
3131 (lambda* (#:key source #:allow-other-keys)
3133 (invoke "unzip" source "-d" "swt")
3136 (invoke "unzip" "src.zip" "-d" "src")))
3137 ;; The classpath contains invalid icecat jars. Since we don't need
3138 ;; anything other than the JDK on the classpath, we can simply unset
3140 (add-after 'configure 'unset-classpath
3141 (lambda _ (unsetenv "CLASSPATH") #t))
3142 (add-before 'build 'build-native
3143 (lambda* (#:key inputs outputs #:allow-other-keys)
3144 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3145 ;; Build shared libraries. Users of SWT have to set the system
3146 ;; property swt.library.path to the "lib" directory of this
3149 (setenv "OUTPUT_DIR" lib)
3150 (with-directory-excursion "src"
3151 (invoke "bash" "build.sh")))))
3152 (add-after 'install 'install-native
3153 (lambda* (#:key outputs #:allow-other-keys)
3154 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3155 (for-each (lambda (file)
3156 (install-file file lib))
3157 (find-files "." "\\.so$"))
3161 ("libxtst" ,libxtst)
3166 `(("pkg-config" ,pkg-config)
3168 (home-page "https://www.eclipse.org/swt/")
3169 (synopsis "Widget toolkit for Java")
3171 "SWT is a widget toolkit for Java designed to provide efficient, portable
3172 access to the user-interface facilities of the operating systems on which it
3174 ;; SWT code is licensed under EPL1.0
3175 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3176 ;; Cairo bindings contain code under MPL1.1
3177 ;; XULRunner 1.9 bindings contain code under MPL2.0
3182 license:lgpl2.1+))))
3184 (define-public java-xz
3190 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3193 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3194 (build-system ant-build-system)
3196 `(#:tests? #f ; There are no tests to run.
3197 #:jar-name ,(string-append "xz-" version ".jar")
3199 (modify-phases %standard-phases
3200 ;; The unpack phase enters the "maven" directory by accident.
3201 (add-after 'unpack 'chdir
3202 (lambda _ (chdir "..") #t)))))
3204 `(("unzip" ,unzip)))
3205 (home-page "https://tukaani.org/xz/java.html")
3206 (synopsis "Implementation of XZ data compression in pure Java")
3207 (description "This library aims to be a complete implementation of XZ data
3208 compression in pure Java. Single-threaded streamed compression and
3209 decompression and random access decompression have been fully implemented.")
3210 (license license:public-domain)))
3212 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3213 ;; of the latest release.
3214 (define-public java-qdox-1.12
3220 (uri (string-append "http://central.maven.org/maven2/"
3221 "com/thoughtworks/qdox/qdox/" version
3222 "/qdox-" version "-sources.jar"))
3225 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3226 (build-system ant-build-system)
3228 `(;; Tests require junit
3230 #:jar-name "qdox.jar"
3232 (modify-phases %standard-phases
3234 (lambda* (#:key source #:allow-other-keys)
3236 (with-directory-excursion "src"
3237 (invoke "jar" "-xf" source))))
3238 ;; At this point we don't have junit, so we must remove the API
3240 (add-after 'unpack 'delete-tests
3242 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3244 (home-page "http://qdox.codehaus.org/")
3245 (synopsis "Parse definitions from Java source files")
3247 "QDox is a high speed, small footprint parser for extracting
3248 class/interface/method definitions from source files complete with JavaDoc
3249 @code{@@tags}. It is designed to be used by active code generators or
3250 documentation tools.")
3251 (license license:asl2.0)))
3253 (define-public java-jarjar
3255 (name "java-jarjar")
3260 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3261 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3264 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3265 (modules '((guix build utils)))
3268 ;; Delete bundled thirds-party jar archives.
3269 ;; TODO: unbundle maven-plugin-api.
3270 (delete-file "lib/asm-4.0.jar")
3271 (delete-file "lib/asm-commons-4.0.jar")
3272 (delete-file "lib/junit-4.8.1.jar")
3274 (build-system ant-build-system)
3276 `(;; Tests require junit, which ultimately depends on this package.
3278 #:build-target "jar"
3280 (modify-phases %standard-phases
3281 (add-before 'build 'do-not-use-bundled-asm
3282 (lambda* (#:key inputs #:allow-other-keys)
3283 (substitute* "build.xml"
3284 (("<path id=\"path.build\">")
3285 (string-append "<path id=\"path.build\"><fileset dir=\""
3286 (assoc-ref inputs "java-asm-bootstrap")
3287 "/share/java\" includes=\"**/*.jar\"/>"))
3288 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3289 (("lib/asm-commons-4.0.jar")
3290 (string-append (assoc-ref inputs "java-asm-bootstrap")
3291 "/share/java/asm-6.0.jar"))
3292 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3293 (string-append "<include name=\"org/objectweb/asm/"
3294 "commons/Remap*.class\"/>"
3295 "<include name=\"org/objectweb/asm/*.class\"/>"
3296 "<include name=\"org/objectweb/asm/"
3297 "signature/*.class\"/>"
3298 "<include name=\"org/objectweb/asm/"
3299 "commons/SignatureRemapper.class\"/>")))
3302 (lambda* (#:key outputs #:allow-other-keys)
3303 (let ((target (string-append (assoc-ref outputs "out")
3305 (install-file (string-append "dist/jarjar-" ,version ".jar")
3309 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3311 `(("unzip" ,unzip)))
3312 (home-page "https://code.google.com/archive/p/jarjar/")
3313 (synopsis "Repackage Java libraries")
3315 "Jar Jar Links is a utility that makes it easy to repackage Java
3316 libraries and embed them into your own distribution. Jar Jar Links includes
3317 an Ant task that extends the built-in @code{jar} task.")
3318 (license license:asl2.0)))
3320 (define-public java-hamcrest-core
3322 (name "java-hamcrest-core")
3326 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3327 "archive/hamcrest-java-" version ".tar.gz"))
3330 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3331 (modules '((guix build utils)))
3334 ;; Delete bundled thirds-party jar archives.
3335 (delete-file-recursively "lib")
3337 (build-system ant-build-system)
3339 `(#:tests? #f ; Tests require junit
3340 #:modules ((guix build ant-build-system)
3343 #:make-flags (list (string-append "-Dversion=" ,version))
3344 #:test-target "unit-test"
3345 #:build-target "core"
3347 (modify-phases %standard-phases
3348 ;; Disable unit tests, because they require junit, which requires
3349 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3350 ;; attribute from the manifest for reproducibility.
3351 (add-before 'configure 'patch-build.xml
3353 (substitute* "build.xml"
3354 (("unit-test, ") "")
3355 (("\\$\\{build.timestamp\\}") "guix"))
3357 ;; Java's "getMethods()" returns methods in an unpredictable order.
3358 ;; To make the output of the generated code deterministic we must
3359 ;; sort the array of methods.
3360 (add-after 'unpack 'make-method-order-deterministic
3362 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3363 (("import java\\.util\\.Iterator;" line)
3364 (string-append line "\n"
3365 "import java.util.Arrays; import java.util.Comparator;"))
3366 (("allMethods = cls\\.getMethods\\(\\);" line)
3367 (string-append "_" line
3369 private Method[] getSortedMethods() {
3370 Arrays.sort(_allMethods, new Comparator<Method>() {
3372 public int compare(Method a, Method b) {
3373 return a.toString().compareTo(b.toString());
3379 private Method[] allMethods = getSortedMethods();")))
3381 (add-before 'build 'do-not-use-bundled-qdox
3382 (lambda* (#:key inputs #:allow-other-keys)
3383 (substitute* "build.xml"
3384 (("lib/generator/qdox-1.12.jar")
3385 (string-append (assoc-ref inputs "java-qdox-1.12")
3386 "/share/java/qdox.jar")))
3388 ;; build.xml searches for .jar files in this directoy, which
3389 ;; we remove from the source archive.
3390 (add-before 'build 'create-dummy-directories
3392 (mkdir-p "lib/integration")
3395 (lambda* (#:key outputs #:allow-other-keys)
3396 (let* ((target (string-append (assoc-ref outputs "out")
3398 (version-suffix ,(string-append "-" version ".jar"))
3399 (install-without-version-suffix
3402 (string-append target
3403 (basename jar version-suffix)
3407 install-without-version-suffix
3410 (and (string-suffix? ".jar" name)
3411 (not (string-suffix? "-sources.jar" name)))))))
3414 `(("java-qdox-1.12" ,java-qdox-1.12)
3415 ("java-jarjar" ,java-jarjar)))
3416 (home-page "http://hamcrest.org/")
3417 (synopsis "Library of matchers for building test expressions")
3419 "This package provides a library of matcher objects (also known as
3420 constraints or predicates) allowing @code{match} rules to be defined
3421 declaratively, to be used in other frameworks. Typical scenarios include
3422 testing frameworks, mocking libraries and UI validation rules.")
3423 (license license:bsd-2)))
3425 (define-public java-junit
3431 (uri (string-append "https://github.com/junit-team/junit/"
3432 "archive/r" version ".tar.gz"))
3433 (file-name (string-append name "-" version ".tar.gz"))
3436 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3437 (modules '((guix build utils)))
3440 ;; Delete bundled jar archives.
3441 (delete-file-recursively "lib")
3443 (build-system ant-build-system)
3445 `(#:tests? #f ; no tests
3446 #:jar-name "junit.jar"))
3448 `(("java-hamcrest-core" ,java-hamcrest-core)))
3449 (home-page "http://junit.org/")
3450 (synopsis "Test framework for Java")
3452 "JUnit is a simple framework to write repeatable tests for Java projects.
3453 JUnit provides assertions for testing expected results, test fixtures for
3454 sharing common test data, and test runners for running tests.")
3455 (license license:epl1.0)))
3457 (define-public java-plexus-utils
3459 (name "java-plexus-utils")
3463 (uri (string-append "https://github.com/codehaus-plexus/"
3464 "plexus-utils/archive/plexus-utils-"
3468 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3469 (build-system ant-build-system)
3470 ;; FIXME: The default build.xml does not include a target to install
3473 `(#:jar-name "plexus-utils.jar"
3474 #:source-dir "src/main"
3476 (modify-phases %standard-phases
3477 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3479 (substitute* "src/main/java/org/codehaus/plexus/util/\
3480 cli/shell/BourneShell.java"
3481 (("/bin/sh") (which "sh"))
3482 (("/usr/") (getcwd)))
3484 (add-after 'unpack 'fix-or-disable-broken-tests
3486 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3487 (substitute* '("cli/CommandlineTest.java"
3488 "cli/shell/BourneShellTest.java")
3489 (("/bin/sh") (which "sh"))
3490 (("/bin/echo") (which "echo")))
3492 ;; This test depends on MavenProjectStub, but we don't have
3493 ;; a package for Maven.
3494 (delete-file "introspection/ReflectionValueExtractorTest.java")
3496 ;; FIXME: The command line tests fail, maybe because they use
3498 (delete-file "cli/CommandlineTest.java"))
3501 `(("java-hamcrest-core" ,java-hamcrest-core)
3502 ("java-junit" ,java-junit)))
3503 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3504 (synopsis "Common utilities for the Plexus framework")
3505 (description "This package provides various Java utility classes for the
3506 Plexus framework to ease working with strings, files, command lines, XML and
3508 (license license:asl2.0)))
3510 (define-public java-plexus-interpolation
3512 (name "java-plexus-interpolation")
3516 (uri (string-append "https://github.com/codehaus-plexus/"
3517 "plexus-interpolation/archive/"
3518 "plexus-interpolation-" version ".tar.gz"))
3521 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3522 (build-system ant-build-system)
3524 `(#:jar-name "plexus-interpolation.jar"
3525 #:source-dir "src/main"))
3527 `(("java-junit" ,java-junit)
3528 ("java-hamcrest-core" ,java-hamcrest-core)))
3529 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3530 (synopsis "Java components for interpolating ${} strings and the like")
3531 (description "Plexus interpolator is a modular, flexible interpolation
3532 framework for the expression language style commonly seen in Maven, Plexus,
3533 and other related projects.
3535 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3536 package within @code{plexus-utils}, but has been separated in order to allow
3537 these two libraries to vary independently of one another.")
3538 (license license:asl2.0)))
3540 (define-public java-plexus-classworlds
3542 (name "java-plexus-classworlds")
3546 (uri (string-append "https://github.com/codehaus-plexus/"
3547 "plexus-classworlds/archive/plexus-classworlds-"
3551 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3552 (build-system ant-build-system)
3554 `(#:jar-name "plexus-classworlds.jar"
3555 #:source-dir "src/main"
3556 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3558 `(("java-junit" ,java-junit)))
3559 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3560 (synopsis "Java class loader framework")
3561 (description "Plexus classworlds replaces the native @code{ClassLoader}
3562 mechanism of Java. It is especially useful for dynamic loading of application
3564 (license license:asl2.0)))
3566 (define java-plexus-container-default-bootstrap
3568 (name "java-plexus-container-default-bootstrap")
3572 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3573 "/archive/plexus-containers-" version ".tar.gz"))
3576 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3577 (build-system ant-build-system)
3579 `(#:jar-name "container-default.jar"
3580 #:source-dir "plexus-container-default/src/main/java"
3581 #:test-dir "plexus-container-default/src/test"
3583 #:tests? #f; requires plexus-archiver, which depends on this package
3585 (modify-phases %standard-phases
3586 (add-before 'build 'copy-resources
3589 "plexus-container-default/src/main/resources/"
3593 `(("worldclass" ,java-plexus-classworlds)
3594 ("xbean" ,java-geronimo-xbean-reflect)
3595 ("utils" ,java-plexus-utils)
3596 ("junit" ,java-junit)
3597 ("guava" ,java-guava)))
3598 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3599 (synopsis "Inversion-of-control container")
3600 (description "Plexus-default-container is Plexus' inversion-of-control
3601 (@dfn{IoC}) container. It is composed of its public API and its default
3603 (license license:asl2.0)))
3605 (define-public java-plexus-io
3607 (name "java-plexus-io")
3611 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3612 "/archive/plexus-io-" version ".tar.gz"))
3615 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3616 (build-system ant-build-system)
3618 `(#:jar-name "plexus-io.jar"
3619 #:source-dir "src/main/java"
3620 #:test-dir "src/test"
3623 (modify-phases %standard-phases
3624 (add-before 'build 'copy-resources
3626 (mkdir-p "build/classes/META-INF/plexus")
3627 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3628 "build/classes/META-INF/plexus/components.xml")
3631 `(("utils" ,java-plexus-utils)
3632 ("commons-io" ,java-commons-io)
3633 ("java-jsr305" ,java-jsr305)))
3635 `(("junit" ,java-junit)
3636 ("hamcrest" ,java-hamcrest-core)
3637 ("guava" ,java-guava)
3638 ("classworlds" ,java-plexus-classworlds)
3639 ("xbean" ,java-geronimo-xbean-reflect)
3640 ("container-default" ,java-plexus-container-default-bootstrap)))
3641 (home-page "https://github.com/codehaus-plexus/plexus-io")
3642 (synopsis "I/O plexus components")
3643 (description "Plexus IO is a set of plexus components, which are designed
3644 for use in I/O operations. This implementation using plexus components allows
3645 reusing it in maven.")
3646 (license license:asl2.0)))
3648 (define-public java-plexus-archiver
3650 (name "java-plexus-archiver")
3654 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3655 "/archive/plexus-archiver-" version ".tar.gz"))
3658 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3659 (build-system ant-build-system)
3661 `(#:jar-name "plexus-archiver.jar"
3662 #:source-dir "src/main/java"
3664 #:test-dir "src/test"
3665 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3667 (modify-phases %standard-phases
3668 (add-before 'check 'remove-failing
3670 ;; Requires an older version of plexus container
3672 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3674 (add-before 'check 'fix-test-building
3676 (substitute* "build.xml"
3677 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3679 (add-before 'build 'copy-resources
3681 (mkdir-p "build/classes/META-INF/plexus")
3682 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3683 "build/classes/META-INF/plexus/components.xml")
3686 `(("utils" ,java-plexus-utils)
3687 ("commons-io" ,java-commons-io)
3688 ("snappy" ,java-iq80-snappy)
3689 ("io" ,java-plexus-io)
3690 ("compress" ,java-commons-compress)
3691 ("container-default" ,java-plexus-container-default-bootstrap)
3692 ("snappy" ,java-snappy)
3693 ("java-jsr305" ,java-jsr305)))
3695 `(("java-hamcrest-core" ,java-hamcrest-core)
3696 ("junit" ,java-junit)
3697 ("classworld" ,java-plexus-classworlds)
3698 ("xbean" ,java-geronimo-xbean-reflect)
3699 ("xz" ,java-tukaani-xz)
3700 ("guava" ,java-guava)))
3701 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3702 (synopsis "Archiver component of the Plexus project")
3703 (description "Plexus-archiver contains a component to deal with project
3705 (license license:asl2.0)))
3707 (define-public java-plexus-container-default
3709 (inherit java-plexus-container-default-bootstrap)
3710 (name "java-plexus-container-default")
3712 `(#:jar-name "container-default.jar"
3713 #:source-dir "plexus-container-default/src/main/java"
3714 #:test-dir "plexus-container-default/src/test"
3715 #:test-exclude (list ;"**/*Test.java"
3717 ;; Requires plexus-hierarchy
3718 "**/PlexusHierarchyTest.java"
3720 "**/ComponentRealmCompositionTest.java"
3721 "**/PlexusContainerTest.java")
3724 (modify-phases %standard-phases
3725 (add-before 'build 'copy-resources
3728 "plexus-container-default/src/main/resources/"
3731 (add-before 'check 'fix-paths
3733 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3736 dir "/plexus/component/composition/"
3737 "ComponentRealmCompositionTest.java")
3738 (("src/test") "plexus-container-default/src/test"))
3741 `(("worldclass" ,java-plexus-classworlds)
3742 ("xbean" ,java-geronimo-xbean-reflect)
3743 ("utils" ,java-plexus-utils)
3744 ("junit" ,java-junit)
3745 ("guava" ,java-guava)))
3747 `(("archiver" ,java-plexus-archiver)
3748 ("hamcrest" ,java-hamcrest-core)))))
3750 (define-public java-plexus-component-annotations
3752 (inherit java-plexus-container-default)
3753 (name "java-plexus-component-annotations")
3755 `(#:jar-name "plexus-component-annotations.jar"
3756 #:source-dir "plexus-component-annotations/src/main/java"
3757 #:tests? #f)); no tests
3760 (synopsis "Plexus descriptors generator")
3761 (description "This package is a Maven plugin to generate Plexus descriptors
3762 from source tags and class annotations.")))
3764 (define-public java-plexus-cipher
3766 (name "java-plexus-cipher")
3770 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3771 "/archive/plexus-cipher-" version ".tar.gz"))
3774 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3775 (build-system ant-build-system)
3777 `(#:jar-name "plexus-cipher.jar"
3778 #:source-dir "src/main/java"
3780 #:tests? #f; FIXME: requires sisu-inject-bean
3782 (modify-phases %standard-phases
3783 (add-before 'build 'copy-resources
3785 (copy-recursively "src/main/resources" "build/classes")
3786 (mkdir-p "build/classes/META-INF/sisu")
3787 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3789 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3792 `(("java-cdi-api" ,java-cdi-api)
3793 ("java-javax-inject" ,java-javax-inject)))
3794 (home-page "https://github.com/sonatype/plexus-cipher")
3795 (synopsis "Encryption/decryption Component")
3796 (description "Plexus-cipher contains a component to deal with encryption
3798 (license license:asl2.0)))
3800 (define-public java-plexus-compiler-api
3802 (name "java-plexus-compiler-api")
3806 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3807 "/archive/plexus-compiler-" version ".tar.gz"))
3810 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3811 (build-system ant-build-system)
3813 `(#:jar-name "plexus-compiler-api.jar"
3814 #:source-dir "plexus-compiler-api/src/main/java"
3816 #:test-dir "plexus-compiler-api/src/test"))
3818 `(("java-plexus-container-default" ,java-plexus-container-default)
3819 ("java-plexus-util" ,java-plexus-utils)))
3821 `(("java-junit" ,java-junit)))
3822 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3823 (synopsis "Plexus Compilers component's API to manipulate compilers")
3824 (description "This package contains the API used by components to manipulate
3826 (license (list license:asl2.0
3829 (define-public java-plexus-compiler-javac
3831 (inherit java-plexus-compiler-api)
3832 (name "java-plexus-compiler-javac")
3834 `(#:jar-name "plexus-compiler-javac.jar"
3835 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3837 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3838 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3840 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3841 ("java-plexus-utils" ,java-plexus-utils)
3842 ("java-plexus-container-default" ,java-plexus-container-default)))
3844 `(("java-junit" ,java-junit)))
3845 (synopsis "Javac Compiler support for Plexus Compiler component")
3846 (description "This package contains the Javac Compiler support for Plexus
3847 Compiler component.")))
3849 (define-public java-plexus-sec-dispatcher
3851 (name "java-plexus-sec-dispatcher")
3852 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3854 ;; This project doesn't tag releases or publish tarballs, so we take
3855 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3857 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3858 "archive/7db8f88048.tar.gz"))
3861 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3862 (file-name (string-append name "-" version ".tar.gz"))))
3864 `(#:jar-name "plexus-sec-dispatcher.jar"
3865 #:source-dir "src/main/java"
3868 (modify-phases %standard-phases
3869 (add-before 'build 'generate-models
3870 (lambda* (#:key inputs #:allow-other-keys)
3871 (define (modello-single-mode file version mode)
3873 "org.codehaus.modello.ModelloCli"
3874 file mode "src/main/java" version
3876 (let ((file "src/main/mdo/settings-security.mdo"))
3877 (modello-single-mode file "1.0.0" "java")
3878 (modello-single-mode file "1.0.0" "xpp3-reader")
3879 (modello-single-mode file "1.0.0" "xpp3-writer"))
3881 (add-before 'build 'generate-components.xml
3883 (mkdir-p "build/classes/META-INF/plexus")
3884 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3890 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3891 <role-hint>default</role-hint>\n
3892 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3893 <description></description>\n
3896 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3897 <field-name>_cipher</field-name>\n
3900 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3901 <field-name>_decryptors</field-name>\n
3905 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3909 </component-set>\n")))
3911 (add-before 'check 'fix-paths
3913 (copy-recursively "src/test/resources" "target")
3916 `(("java-plexus-cipher" ,java-plexus-cipher)))
3918 `(("java-modello-core" ,java-modello-core)
3920 ("java-plexus-container-default" ,java-plexus-container-default)
3921 ("java-plexus-classworlds" ,java-plexus-classworlds)
3922 ("java-plexus-utils" ,java-plexus-utils)
3923 ("java-guava" ,java-guava)
3924 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3925 ("java-sisu-build-api" ,java-sisu-build-api)
3927 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3928 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3929 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3931 ("java-junit" ,java-junit)))
3932 (build-system ant-build-system)
3933 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3934 (synopsis "Plexus Security Dispatcher Component")
3935 (description "This package is the Plexus Security Dispatcher Component.
3936 This component decrypts a string passed to it.")
3937 (license license:asl2.0)))
3939 (define-public java-plexus-cli
3941 (name "java-plexus-cli")
3946 (url "https://github.com/sonatype/plexus-cli")
3947 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3948 (file-name (string-append name "-" version))
3951 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3952 (build-system ant-build-system)
3954 `(#:jar-name "plexus-cli.jar"
3955 #:source-dir "src/main/java"
3957 #:test-dir "src/test"))
3959 `(("java-commons-cli" ,java-commons-cli)
3960 ("java-plexus-container-default" ,java-plexus-container-default)
3961 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3963 `(("java-plexus-utils" ,java-plexus-utils)
3964 ("java-junit" ,java-junit)
3965 ("java-guava" ,java-guava)))
3966 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3967 (synopsis "CLI building library for plexus")
3968 (description "This package is a library to help creating CLI around
3969 Plexus components.")
3970 (license license:asl2.0)))
3972 (define-public java-sisu-build-api
3974 (name "java-sisu-build-api")
3978 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3979 "archive/plexus-build-api-" version ".tar.gz"))
3982 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3983 (build-system ant-build-system)
3985 `(#:jar-name "sisu-build-api.jar"
3986 #:source-dir "src/main/java"
3988 #:tests? #f; FIXME: how to run the tests?
3990 (modify-phases %standard-phases
3991 (add-before 'build 'copy-resources
3993 (copy-recursively "src/main/resources" "build/classes")
3994 (substitute* (find-files "build/classes")
3995 (("\\$\\{project.version\\}") ,version))
3997 (add-before 'build 'generate-plexus-compontent
3999 (mkdir-p "build/classes/META-INF/plexus")
4000 ;; This file is required for plexus to inject this package.
4001 ;; FIXME: how is it generated?
4002 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4008 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4009 <role-hint>default</role-hint>\n
4010 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4011 <description>Filesystem based non-incremental build context implementation\n
4012 which behaves as if all files were just created.</description>\n
4015 </component-set>\n")))
4018 `(("java-plexus-utils" ,java-plexus-utils)
4019 ("java-plexus-container-default" ,java-plexus-container-default)))
4020 (home-page "https://github.com/sonatype/sisu-build-api/")
4021 (synopsis "Base build API for maven")
4022 (description "This package contains the base build API for maven and
4023 a default implementation of it. This API is about scanning files in a
4024 project and determining what files need to be rebuilt.")
4025 (license license:asl2.0)))
4027 (define-public java-modello-core
4029 (name "java-modello-core")
4033 (uri (string-append "https://github.com/codehaus-plexus/modello"
4034 "/archive/modello-" version ".tar.gz"))
4037 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
4038 (build-system ant-build-system)
4040 `(#:jar-name "modello-core.jar"
4041 #:source-dir "modello-core/src/main/java"
4042 #:test-dir "modello-core/src/test"
4043 #:main-class "org.codehaus.modello.ModelloCli"
4046 (modify-phases %standard-phases
4047 (add-before 'build 'copy-resources
4049 (mkdir-p "build/classes/META-INF/plexus")
4050 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4051 "build/classes/META-INF/plexus/components.xml")
4053 (add-before 'check 'fix-tests
4055 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4056 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4057 "modello/core/io/ModelReaderTest.java")
4058 (("src/test") "modello-core/src/test")))
4061 `(("java-plexus-utils" ,java-plexus-utils)
4062 ("java-plexus-container-default" ,java-plexus-container-default)
4063 ("java-sisu-build-api" ,java-sisu-build-api)))
4065 `(("java-junit" ,java-junit)
4066 ("java-plexus-classworlds" ,java-plexus-classworlds)
4067 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4068 ("java-guava" ,java-guava)))
4069 (home-page "http://codehaus-plexus.github.io/modello/")
4070 (synopsis "Framework for code generation from a simple model")
4071 (description "Modello is a framework for code generation from a simple model.
4073 Modello generates code from a simple model format: based on a plugin
4074 architecture, various types of code and descriptors can be generated from the
4075 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4076 XSD and documentation.")
4079 ;; Although this package uses only files licensed under expat,
4080 ;; other parts of the source are licensed under different
4081 ;; licenses. We include them to be inherited by other packages.
4083 ;; Some files in modello-plugin-java are licensed under a
4084 ;; 5-clause BSD license.
4085 (license:non-copyleft
4086 (string-append "file:///modello-plugins/modello-plugin-java/"
4087 "src/main/java/org/codehaus/modello/plugin/"
4088 "java/javasource/JNaming.java"))))))
4090 (define-public java-modello-plugins-java
4092 (inherit java-modello-core)
4093 (name "java-modello-plugins-java")
4095 `(#:jar-name "modello-plugins-java.jar"
4096 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4097 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4099 #:tests? #f; requires maven-model, which depends on this package
4101 (modify-phases %standard-phases
4102 (add-before 'build 'copy-resources
4104 (mkdir-p "build/classes")
4105 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4109 `(("java-modello-core" ,java-modello-core)
4110 ,@(package-inputs java-modello-core)))
4111 (synopsis "Modello Java Plugin")
4112 (description "Modello Java Plugin generates Java objects for the model.")))
4114 (define-public java-modello-plugins-xml
4116 (inherit java-modello-core)
4117 (name "java-modello-plugins-xml")
4119 `(#:jar-name "modello-plugins-xml.jar"
4120 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4121 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4124 (modify-phases %standard-phases
4125 (add-before 'build 'copy-resources
4127 (mkdir-p "build/classes")
4129 "modello-plugins/modello-plugin-xml/src/main/resources"
4132 (add-before 'check 'fix-paths
4134 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4136 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4137 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4140 `(("java-modello-core" ,java-modello-core)
4141 ("java-modello-plugins-java" ,java-modello-plugins-java)
4142 ,@(package-inputs java-modello-core)))
4143 (synopsis "Modello XML Plugin")
4144 (description "Modello XML Plugin contains shared code for every plugins
4145 working on XML representation of the model.")))
4147 (define-public java-modello-test
4149 (inherit java-modello-core)
4150 (name "java-modello-test")
4152 `(#:jar-name "modello-test.jar"
4153 #:source-dir "modello-test/src/main/java"
4154 #:tests? #f; no tests
4157 `(("java-plexus-utils" ,java-plexus-utils)
4158 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4159 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4160 ("java-plexus-container-default" ,java-plexus-container-default)))
4161 (synopsis "Modello test package")
4162 (description "The modello test package contains the basis to create
4163 Modello generator unit-tests, including sample models and xml files to test
4164 every feature for every plugin.")))
4166 (define-public java-modello-plugins-xpp3
4168 (inherit java-modello-core)
4169 (name "java-modello-plugins-xpp3")
4171 `(#:jar-name "modello-plugins-xpp3.jar"
4172 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4173 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4174 ;; One of the test dependencies is maven-model which depends on this package.
4178 (modify-phases %standard-phases
4179 (add-before 'build 'copy-resources
4181 (mkdir-p "build/classes")
4182 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4186 `(("java-modello-core" ,java-modello-core)
4187 ("java-modello-plugins-java" ,java-modello-plugins-java)
4188 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4189 ,@(package-inputs java-modello-core)))
4191 `(("java-xmlunit" ,java-xmlunit)
4192 ("java-modello-test" ,java-modello-test)
4193 ,@(package-native-inputs java-modello-core)))
4194 (synopsis "Modello XPP3 Plugin")
4195 (description "The modello XPP3 plugin generates XML readers and writers based
4196 on the XPP3 API (XML Pull Parser).")))
4198 (define-public java-asm
4204 (uri (string-append "http://download.forge.ow2.org/asm/"
4205 "asm-" version ".tar.gz"))
4208 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4209 (build-system ant-build-system)
4211 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4212 ("java-aqute-libg" ,java-aqute-libg)))
4214 `(#:build-target "compile"
4215 ;; The tests require an old version of Janino, which no longer compiles
4220 ;; We don't need these extra ant tasks, but the build system asks us to
4221 ;; provide a path anyway.
4222 "-Dobjectweb.ant.tasks.path=dummy-path"
4223 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4224 ;; used during the build automatically by ant-build-system, but
4225 ;; java-asm's build.xml fails unless we provide something here.
4226 "-Dbiz.aQute.bnd.path=dummy-path")
4228 (modify-phases %standard-phases
4229 (add-before 'install 'build-jars
4230 (lambda* (#:key make-flags #:allow-other-keys)
4231 ;; We cannot use the "jar" target because it depends on a couple
4232 ;; of unpackaged, complicated tools.
4235 "-cf" (string-append "dist/asm-" ,version ".jar")
4236 "-C" "output/build/tmp" ".")))
4238 (install-jars "dist")))))
4240 `(("java-junit" ,java-junit)))
4241 (home-page "http://asm.ow2.org/")
4242 (synopsis "Very small and fast Java bytecode manipulation framework")
4243 (description "ASM is an all purpose Java bytecode manipulation and
4244 analysis framework. It can be used to modify existing classes or dynamically
4245 generate classes, directly in binary form. The provided common
4246 transformations and analysis algorithms allow to easily assemble custom
4247 complex transformations and code analysis tools.")
4248 (license license:bsd-3)))
4250 (define java-asm-bootstrap
4253 (name "java-asm-bootstrap")
4255 (substitute-keyword-arguments (package-arguments java-asm)
4259 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4260 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4261 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4262 (delete `("java-aqute-libg" ,java-aqute-libg)
4263 (package-inputs java-asm)))))))
4265 (define-public java-cglib
4273 (url "https://github.com/cglib/cglib.git")
4274 (commit (string-append
4276 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4278 (file-name (git-file-name name version))
4280 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4281 (build-system ant-build-system)
4283 `(;; FIXME: tests fail because junit runs
4284 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4285 ;; to describe a test at all.
4287 #:jar-name "cglib.jar"
4289 (modify-phases %standard-phases
4290 (add-after 'unpack 'chdir
4291 (lambda _ (chdir "cglib") #t)))))
4293 `(("java-asm" ,java-asm)
4294 ("java-junit" ,java-junit)))
4295 (home-page "https://github.com/cglib/cglib/")
4296 (synopsis "Java byte code generation library")
4297 (description "The byte code generation library CGLIB is a high level API
4298 to generate and transform Java byte code.")
4299 (license license:asl2.0)))
4301 (define-public java-objenesis
4303 (name "java-objenesis")
4307 (uri (string-append "https://github.com/easymock/objenesis/"
4308 "archive/" version ".tar.gz"))
4309 (file-name (string-append "objenesis-" version ".tar.gz"))
4312 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4313 (build-system ant-build-system)
4315 `(#:jar-name "objenesis.jar"
4316 #:source-dir "main/src/"
4317 #:test-dir "main/src/test/"))
4319 `(("java-junit" ,java-junit)
4320 ("java-hamcrest-core" ,java-hamcrest-core)))
4321 (home-page "http://objenesis.org/")
4322 (synopsis "Bypass the constructor when creating an object")
4323 (description "Objenesis is a small Java library that serves one purpose:
4324 to instantiate a new object of a particular class. It is common to see
4325 restrictions in libraries stating that classes must require a default
4326 constructor. Objenesis aims to overcome these restrictions by bypassing the
4327 constructor on object instantiation.")
4328 (license license:asl2.0)))
4330 (define-public java-easymock
4332 (name "java-easymock")
4336 (uri (string-append "https://github.com/easymock/easymock/"
4337 "archive/easymock-" version ".tar.gz"))
4340 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4341 (build-system ant-build-system)
4343 `(#:jar-name "easymock.jar"
4344 #:source-dir "core/src/main"
4345 #:test-dir "core/src/test"
4347 (modify-phases %standard-phases
4348 ;; FIXME: Android support requires the following packages to be
4349 ;; available: com.google.dexmaker.stock.ProxyBuilder
4350 (add-after 'unpack 'delete-android-support
4352 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4353 (substitute* "MocksControl.java"
4354 (("AndroidSupport.isAndroid\\(\\)") "false")
4355 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4356 (delete-file "AndroidClassProxyFactory.java"))
4358 (add-after 'unpack 'delete-broken-tests
4360 (with-directory-excursion "core/src/test/java/org/easymock"
4361 ;; This test depends on dexmaker.
4362 (delete-file "tests2/ClassExtensionHelperTest.java")
4364 ;; This is not a test.
4365 (delete-file "tests/BaseEasyMockRunnerTest.java")
4367 ;; This test should be executed with a different runner...
4368 (delete-file "tests2/EasyMockAnnotationsTest.java")
4369 ;; ...but deleting it means that we also have to delete these
4371 (delete-file "tests2/EasyMockRunnerTest.java")
4372 (delete-file "tests2/EasyMockRuleTest.java")
4374 ;; This test fails because the file "easymock.properties" does
4376 (delete-file "tests2/EasyMockPropertiesTest.java"))
4379 `(("java-asm" ,java-asm)
4380 ("java-cglib" ,java-cglib)
4381 ("java-objenesis" ,java-objenesis)))
4383 `(("java-junit" ,java-junit)
4384 ("java-hamcrest-core" ,java-hamcrest-core)))
4385 (home-page "http://easymock.org")
4386 (synopsis "Java library providing mock objects for unit tests")
4387 (description "EasyMock is a Java library that provides an easy way to use
4388 mock objects in unit testing.")
4389 (license license:asl2.0)))
4391 (define-public java-jmock-1
4397 (uri (string-append "https://github.com/jmock-developers/"
4398 "jmock-library/archive/" version ".tar.gz"))
4399 (file-name (string-append "jmock-" version ".tar.gz"))
4402 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4403 (build-system ant-build-system)
4405 `(#:build-target "jars"
4406 #:test-target "run.tests"
4408 (modify-phases %standard-phases
4409 (replace 'install (install-jars "build")))))
4410 (home-page "http://www.jmock.org")
4411 (synopsis "Mock object library for test-driven development")
4412 (description "JMock is a library that supports test-driven development of
4413 Java code with mock objects. Mock objects help you design and test the
4414 interactions between the objects in your programs.
4419 @item makes it quick and easy to define mock objects
4420 @item lets you precisely specify the interactions between
4421 your objects, reducing the brittleness of your tests
4422 @item plugs into your favourite test framework
4423 @item is easy to extend.
4425 (license license:bsd-3)))
4427 (define-public java-jmock
4429 (inherit java-jmock-1)
4434 (uri (string-append "https://github.com/jmock-developers/"
4435 "jmock-library/archive/" version ".tar.gz"))
4436 (file-name (string-append name "-" version ".tar.gz"))
4439 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4441 `(("java-hamcrest-all" ,java-hamcrest-all)
4442 ("java-asm" ,java-asm)
4443 ("java-bsh" ,java-bsh)
4444 ("java-junit" ,java-junit)))
4446 `(("cglib" ,java-cglib)))
4448 `(#:jar-name "java-jmock.jar"
4449 #:source-dir "jmock/src/main/java"
4450 #:test-dir "jmock/src/test"))))
4452 (define-public java-jmock-junit4
4454 (inherit java-jmock)
4455 (name "java-jmock-junit4")
4457 `(#:jar-name "java-jmock-junit4.jar"
4458 #:source-dir "jmock-junit4/src/main/java"
4459 #:test-dir "jmock-junit4/src/test"))
4461 `(("java-hamcrest-all" ,java-hamcrest-all)
4462 ("java-asm" ,java-asm)
4463 ("java-bsh" ,java-bsh)
4464 ("java-jmock" ,java-jmock)
4465 ("java-jumit" ,java-junit)))))
4467 (define-public java-jmock-legacy
4469 (inherit java-jmock)
4470 (name "java-jmock-legacy")
4472 `(#:jar-name "java-jmock-legacy.jar"
4473 #:source-dir "jmock-legacy/src/main/java"
4474 #:test-dir "jmock-legacy/src/test"
4476 (modify-phases %standard-phases
4477 (add-before 'check 'copy-tests
4479 ;; This file is a dependancy of some tests
4480 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4481 (copy-file (string-append "jmock/src/test/java/" file)
4482 (string-append "jmock-legacy/src/test/java/" file))
4485 `(("java-hamcrest-all" ,java-hamcrest-all)
4486 ("java-objenesis" ,java-objenesis)
4487 ("java-cglib" ,java-cglib)
4488 ("java-jmock" ,java-jmock)
4489 ("java-asm" ,java-asm)
4490 ("java-bsh" ,java-bsh)
4491 ("java-junit" ,java-junit)))
4493 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4495 (define-public java-hamcrest-all
4496 (package (inherit java-hamcrest-core)
4497 (name "java-hamcrest-all")
4500 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4501 ((#:build-target _) "bigjar")
4503 `(modify-phases ,phases
4504 ;; Some build targets override the classpath, so we need to patch
4505 ;; the build.xml to ensure that required dependencies are on the
4507 (add-after 'unpack 'patch-classpath-for-integration
4508 (lambda* (#:key inputs #:allow-other-keys)
4509 (substitute* "build.xml"
4510 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4514 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4515 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4516 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4518 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4519 (string-append (assoc-ref inputs "java-hamcrest-core")
4520 "/share/java/hamcrest-core.jar")))
4523 `(("java-junit" ,java-junit)
4524 ("java-jmock" ,java-jmock-1)
4525 ;; This is necessary because of what seems to be a race condition.
4526 ;; This package would sometimes fail to build because hamcrest-core.jar
4527 ;; could not be found, even though it is built as part of this package.
4528 ;; Adding java-hamcrest-core appears to fix this problem. See
4529 ;; https://debbugs.gnu.org/31390 for more information.
4530 ("java-hamcrest-core" ,java-hamcrest-core)
4531 ("java-easymock" ,java-easymock)
4532 ,@(package-inputs java-hamcrest-core)))))
4534 (define-public java-jopt-simple
4536 (name "java-jopt-simple")
4540 (uri (string-append "http://repo1.maven.org/maven2/"
4541 "net/sf/jopt-simple/jopt-simple/"
4542 version "/jopt-simple-"
4543 version "-sources.jar"))
4546 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4547 (build-system ant-build-system)
4549 `(#:tests? #f ; there are no tests
4550 #:jar-name "jopt-simple.jar"))
4551 (home-page "https://pholser.github.io/jopt-simple/")
4552 (synopsis "Java library for parsing command line options")
4553 (description "JOpt Simple is a Java library for parsing command line
4554 options, such as those you might pass to an invocation of @code{javac}. In
4555 the interest of striving for simplicity, as closely as possible JOpt Simple
4556 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4557 GNU @code{getopt_long}. It also aims to make option parser configuration and
4558 retrieval of options and their arguments simple and expressive, without being
4560 (license license:expat)))
4562 (define-public java-commons-math3
4564 (name "java-commons-math3")
4568 (uri (string-append "mirror://apache/commons/math/source/"
4569 "commons-math3-" version "-src.tar.gz"))
4572 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4573 (build-system ant-build-system)
4575 `(#:build-target "jar"
4576 #:test-target "test"
4578 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4579 (junit (assoc-ref %build-inputs "java-junit")))
4580 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4581 (string-append "-Dhamcrest.jar=" hamcrest
4582 "/share/java/hamcrest-core.jar")))
4584 (modify-phases %standard-phases
4585 ;; We want to build the jar in the build phase and run the tests
4586 ;; later in a separate phase.
4587 (add-after 'unpack 'untangle-targets
4589 (substitute* "build.xml"
4590 (("name=\"jar\" depends=\"test\"")
4591 "name=\"jar\" depends=\"compile\""))
4593 ;; There is no install target.
4595 (install-jars "target")))))
4597 `(("java-junit" ,java-junit)
4598 ("java-hamcrest-core" ,java-hamcrest-core)))
4599 (home-page "http://commons.apache.org/math/")
4600 (synopsis "Apache Commons mathematics library")
4601 (description "Commons Math is a library of lightweight, self-contained
4602 mathematics and statistics components addressing the most common problems not
4603 available in the Java programming language or Commons Lang.")
4604 (license license:asl2.0)))
4606 (define-public java-jmh
4613 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4614 (changeset version)))
4615 (file-name (string-append name "-" version "-checkout"))
4618 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4619 (build-system ant-build-system)
4621 `(#:jar-name "jmh-core.jar"
4622 #:source-dir "jmh-core/src/main"
4623 #:test-dir "jmh-core/src/test"
4625 (modify-phases %standard-phases
4626 ;; This seems to be a bug in the JDK. It may not be necessary in
4627 ;; future versions of the JDK.
4628 (add-after 'unpack 'fix-bug
4630 (with-directory-excursion
4631 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4632 (substitute* '("IntegerValueConverter.java"
4633 "ThreadsValueConverter.java")
4634 (("public Class<Integer> valueType")
4635 "public Class<? extends Integer> valueType")))
4638 `(("java-jopt-simple" ,java-jopt-simple)
4639 ("java-commons-math3" ,java-commons-math3)))
4641 `(("java-junit" ,java-junit)
4642 ("java-hamcrest-core" ,java-hamcrest-core)))
4643 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4644 (synopsis "Benchmark harness for the JVM")
4645 (description "JMH is a Java harness for building, running, and analysing
4646 nano/micro/milli/macro benchmarks written in Java and other languages
4647 targeting the JVM.")
4649 (license license:gpl2)))
4651 (define-public java-commons-collections4
4653 (name "java-commons-collections4")
4657 (uri (string-append "mirror://apache/commons/collections/source/"
4658 "commons-collections4-" version "-src.tar.gz"))
4661 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4662 (build-system ant-build-system)
4664 `(#:test-target "test"
4666 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4667 (junit (assoc-ref %build-inputs "java-junit"))
4668 (easymock (assoc-ref %build-inputs "java-easymock")))
4669 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4670 (string-append "-Dhamcrest.jar=" hamcrest
4671 "/share/java/hamcrest-core.jar")
4672 (string-append "-Deasymock.jar=" easymock
4673 "/share/java/easymock.jar")))
4675 (modify-phases %standard-phases
4677 (install-jars "target")))))
4679 `(("java-junit" ,java-junit)
4680 ("java-hamcrest-core" ,java-hamcrest-core)
4681 ("java-easymock" ,java-easymock)))
4682 (home-page "http://commons.apache.org/collections/")
4683 (synopsis "Collections framework")
4684 (description "The Java Collections Framework is the recognised standard
4685 for collection handling in Java. Commons-Collections seek to build upon the
4686 JDK classes by providing new interfaces, implementations and utilities. There
4687 are many features, including:
4690 @item @code{Bag} interface for collections that have a number of copies of
4692 @item @code{BidiMap} interface for maps that can be looked up from value to
4693 key as well and key to value
4694 @item @code{MapIterator} interface to provide simple and quick iteration over
4696 @item Transforming decorators that alter each object as it is added to the
4698 @item Composite collections that make multiple collections look like one
4699 @item Ordered maps and sets that retain the order elements are added in,
4700 including an LRU based map
4701 @item Reference map that allows keys and/or values to be garbage collected
4703 @item Many comparator implementations
4704 @item Many iterator implementations
4705 @item Adapter classes from array and enumerations to collections
4706 @item Utilities to test or create typical set-theory properties of collections
4707 such as union, intersection, and closure.
4709 (license license:asl2.0)))
4711 (define-public java-commons-collections
4713 (inherit java-commons-collections4)
4714 (name "java-commons-collections")
4718 (uri (string-append "mirror://apache/commons/collections/source/"
4719 "commons-collections-" version "-src.tar.gz"))
4722 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4724 (search-patches "java-commons-collections-fix-java8.patch"))))
4726 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4728 `(modify-phases ,phases
4729 ;; The manifest is required by the build procedure
4730 (add-before 'build 'add-manifest
4732 (mkdir-p "build/conf")
4733 (call-with-output-file "build/conf/MANIFEST.MF"
4735 (format file "Manifest-Version: 1.0\n")))
4738 (install-jars "build"))))))))
4740 (define java-commons-collections-test-classes
4742 (inherit java-commons-collections)
4744 `(#:jar-name "commons-collections-test-classes.jar"
4745 #:source-dir "src/test"
4748 `(("collection" ,java-commons-collections)))))
4750 (define-public java-commons-beanutils
4752 (name "java-commons-beanutils")
4756 (uri (string-append "mirror://apache/commons/beanutils/source/"
4757 "commons-beanutils-" version "-src.tar.gz"))
4760 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4761 (build-system ant-build-system)
4763 `(#:test-target "test"
4766 (modify-phases %standard-phases
4768 (lambda* (#:key outputs #:allow-other-keys)
4769 (rename-file (string-append "dist/commons-beanutils-" ,version
4771 "commons-beanutils.jar")
4772 (install-file "commons-beanutils.jar"
4773 (string-append (assoc-ref outputs "out") "/share/java/"))
4776 `(("logging" ,java-commons-logging-minimal)
4777 ("collections" ,java-commons-collections)))
4779 `(("junit" ,java-junit)
4780 ("collections-test" ,java-commons-collections-test-classes)))
4781 (home-page "http://commons.apache.org/beanutils/")
4782 (synopsis "Dynamically set or get properties in Java")
4783 (description "BeanUtils provides a simplified interface to reflection and
4784 introspection to set or get dynamically determined properties through their
4785 setter and getter method.")
4786 (license license:asl2.0)))
4788 (define-public java-commons-io
4790 (name "java-commons-io")
4795 (uri (string-append "mirror://apache/commons/io/source/"
4796 "commons-io-" version "-src.tar.gz"))
4799 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4800 (build-system ant-build-system)
4801 (outputs '("out" "doc"))
4803 `(#:test-target "test"
4805 (list (string-append "-Djunit.jar="
4806 (assoc-ref %build-inputs "java-junit")
4807 "/share/java/junit.jar"))
4809 (modify-phases %standard-phases
4810 (add-after 'build 'build-javadoc ant-build-javadoc)
4811 (replace 'install (install-jars "target"))
4812 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4814 `(("java-junit" ,java-junit)
4815 ("java-hamcrest-core" ,java-hamcrest-core)))
4816 (home-page "http://commons.apache.org/io/")
4817 (synopsis "Common useful IO related classes")
4818 (description "Commons-IO contains utility classes, stream implementations,
4819 file filters and endian classes.")
4820 (license license:asl2.0)))
4822 (define-public java-commons-exec-1.1
4824 (name "java-commons-exec")
4829 (uri (string-append "mirror://apache/commons/exec/source/"
4830 "commons-exec-" version "-src.tar.gz"))
4833 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4834 (build-system ant-build-system)
4836 `(#:test-target "test"
4838 (list (string-append "-Dmaven.junit.jar="
4839 (assoc-ref %build-inputs "java-junit")
4840 "/share/java/junit.jar"))
4842 (modify-phases %standard-phases
4843 (add-before 'build 'delete-network-tests
4845 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4846 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4847 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4849 ;; The "build" phase automatically tests.
4851 (replace 'install (install-jars "target")))))
4853 `(("java-junit" ,java-junit)))
4854 (home-page "http://commons.apache.org/proper/commons-exec/")
4855 (synopsis "Common program execution related classes")
4856 (description "Commons-Exec simplifies executing external processes.")
4857 (license license:asl2.0)))
4859 (define-public java-commons-exec
4861 (inherit java-commons-exec-1.1)
4866 (uri (string-append "mirror://apache/commons/exec/source/"
4867 "commons-exec-" version "-src.tar.gz"))
4870 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4872 `(#:test-target "test"
4874 (list (string-append "-Dmaven.junit.jar="
4875 (assoc-ref %build-inputs "java-junit")
4876 "/share/java/junit.jar")
4877 "-Dmaven.compiler.source=1.7"
4878 "-Dmaven.compiler.target=1.7")
4880 (modify-phases %standard-phases
4881 (add-before 'build 'delete-network-tests
4882 (lambda* (#:key inputs #:allow-other-keys)
4883 ;; This test hangs indefinitely.
4884 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4885 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4886 (("ping -c 10 127.0.0.1") "sleep 10"))
4887 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4889 (call-with-output-file "src/test/scripts/ping.sh"
4891 (format port "#!~a/bin/sh\nsleep $1\n"
4892 (assoc-ref inputs "bash"))))
4894 ;; The "build" phase automatically tests.
4896 (replace 'install (install-jars "target")))))
4898 `(("java-junit" ,java-junit)
4899 ("java-hamcrest-core" ,java-hamcrest-core)))))
4901 (define-public java-commons-lang
4903 (name "java-commons-lang")
4908 (uri (string-append "mirror://apache/commons/lang/source/"
4909 "commons-lang-" version "-src.tar.gz"))
4911 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4912 (build-system ant-build-system)
4913 (outputs '("out" "doc"))
4915 `(#:test-target "test"
4916 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4918 (modify-phases %standard-phases
4919 (add-after 'build 'build-javadoc ant-build-javadoc)
4920 (add-before 'check 'disable-failing-test
4922 ;; Disable a failing test
4923 (substitute* "src/test/java/org/apache/commons/lang/\
4924 time/FastDateFormatTest.java"
4925 (("public void testFormat\\(\\)")
4926 "public void disabled_testFormat()"))
4928 (replace 'install (install-jars "target"))
4929 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4931 `(("java-junit" ,java-junit)))
4932 (home-page "http://commons.apache.org/lang/")
4933 (synopsis "Extension of the java.lang package")
4934 (description "The Commons Lang components contains a set of Java classes
4935 that provide helper methods for standard Java classes, especially those found
4936 in the @code{java.lang} package in the Sun JDK. The following classes are
4940 @item StringUtils - Helper for @code{java.lang.String}.
4941 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4942 of characters such as @code{[a-z]} and @code{[abcdez]}.
4943 @item RandomStringUtils - Helper for creating randomised strings.
4944 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4945 @item NumberRange - A range of numbers with an upper and lower bound.
4946 @item ObjectUtils - Helper for @code{java.lang.Object}.
4947 @item SerializationUtils - Helper for serializing objects.
4948 @item SystemUtils - Utility class defining the Java system properties.
4949 @item NestedException package - A sub-package for the creation of nested
4951 @item Enum package - A sub-package for the creation of enumerated types.
4952 @item Builder package - A sub-package for the creation of @code{equals},
4953 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4955 (license license:asl2.0)))
4957 (define-public java-commons-lang3
4959 (name "java-commons-lang3")
4964 (uri (string-append "mirror://apache/commons/lang/source/"
4965 "commons-lang3-" version "-src.tar.gz"))
4967 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4968 (build-system ant-build-system)
4969 (outputs '("out" "doc"))
4971 `(#:test-target "test"
4973 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4974 (junit (assoc-ref %build-inputs "java-junit"))
4975 (easymock (assoc-ref %build-inputs "java-easymock"))
4976 (io (assoc-ref %build-inputs "java-commons-io")))
4977 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4978 (string-append "-Dhamcrest.jar=" hamcrest
4979 "/share/java/hamcrest-all.jar")
4980 (string-append "-Dcommons-io.jar=" io
4981 "/share/java/commons-io-"
4982 ,(package-version java-commons-io)
4984 (string-append "-Deasymock.jar=" easymock
4985 "/share/java/easymock.jar")))
4987 (modify-phases %standard-phases
4988 (add-after 'build 'build-javadoc ant-build-javadoc)
4989 (replace 'install (install-jars "target"))
4990 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4992 `(("java-junit" ,java-junit)
4993 ("java-commons-io" ,java-commons-io)
4994 ("java-hamcrest-all" ,java-hamcrest-all)
4995 ("java-easymock" ,java-easymock)))
4996 (home-page "http://commons.apache.org/lang/")
4997 (synopsis "Extension of the java.lang package")
4998 (description "The Commons Lang components contains a set of Java classes
4999 that provide helper methods for standard Java classes, especially those found
5000 in the @code{java.lang} package. The following classes are included:
5003 @item StringUtils - Helper for @code{java.lang.String}.
5004 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5005 characters such as @code{[a-z]} and @code{[abcdez]}.
5006 @item RandomStringUtils - Helper for creating randomised strings.
5007 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5008 @item NumberRange - A range of numbers with an upper and lower bound.
5009 @item ObjectUtils - Helper for @code{java.lang.Object}.
5010 @item SerializationUtils - Helper for serializing objects.
5011 @item SystemUtils - Utility class defining the Java system properties.
5012 @item NestedException package - A sub-package for the creation of nested
5014 @item Enum package - A sub-package for the creation of enumerated types.
5015 @item Builder package - A sub-package for the creation of @code{equals},
5016 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5018 (license license:asl2.0)))
5020 (define-public java-commons-bsf
5022 (name "java-commons-bsf")
5026 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5030 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5031 (modules '((guix build utils)))
5034 (for-each delete-file
5035 (find-files "." "\\.jar$"))
5037 (build-system ant-build-system)
5039 `(#:build-target "jar"
5040 #:tests? #f; No test file
5041 #:modules ((guix build ant-build-system)
5043 (guix build java-utils)
5046 (modify-phases %standard-phases
5047 (add-before 'build 'create-properties
5049 ;; This file is missing from the distribution
5050 (call-with-output-file "build-properties.xml"
5053 `(project (@ (basedir ".") (name "build-properties") (default ""))
5054 (property (@ (name "project.name") (value "bsf")))
5055 (property (@ (name "source.level") (value "1.5")))
5056 (property (@ (name "build.lib") (value "build/jar")))
5057 (property (@ (name "src.dir") (value "src")))
5058 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5059 (property (@ (name "build.tests") (value "build/test-classes")))
5060 (property (@ (name "build.dest") (value "build/classes"))))
5063 (replace 'install (install-jars "build")))))
5065 `(("java-junit" ,java-junit)))
5067 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5068 (home-page "https://commons.apache.org/proper/commons-bsf")
5069 (synopsis "Bean Scripting Framework")
5070 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5071 which provides scripting language support within Java applications, and access
5072 to Java objects and methods from scripting languages. BSF allows one to write
5073 JSPs in languages other than Java while providing access to the Java class
5074 library. In addition, BSF permits any Java application to be implemented in
5075 part (or dynamically extended) by a language that is embedded within it. This
5076 is achieved by providing an API that permits calling scripting language engines
5077 from within Java, as well as an object registry that exposes Java objects to
5078 these scripting language engines.")
5079 (license license:asl2.0)))
5081 (define-public java-commons-jxpath
5083 (name "java-commons-jxpath")
5087 (uri (string-append "mirror://apache/commons/jxpath/source/"
5088 "commons-jxpath-" version "-src.tar.gz"))
5091 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5092 (build-system ant-build-system)
5094 `(#:jar-name "commons-jxpath.jar"
5095 ;; tests require more dependencies, including mockrunner which depends on old software
5097 #:source-dir "src/java"))
5099 `(("servlet" ,java-classpathx-servletapi)
5100 ("java-jdom" ,java-jdom)
5101 ("java-commons-beanutils" ,java-commons-beanutils)))
5103 `(("java-junit" ,java-junit)))
5104 (home-page "http://commons.apache.org/jxpath/")
5105 (synopsis "Simple interpreter of an expression language called XPath.")
5106 (description "The org.apache.commons.jxpath package defines a simple
5107 interpreter of an expression language called XPath. JXPath applies XPath
5108 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5109 contexts, DOM etc, including mixtures thereof.")
5110 (license license:asl2.0)))
5112 (define-public java-jsr250
5114 (name "java-jsr250")
5118 (uri (string-append "https://repo1.maven.org/maven2/"
5119 "javax/annotation/javax.annotation-api/"
5120 version "/javax.annotation-api-"
5121 version "-sources.jar"))
5124 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5125 (build-system ant-build-system)
5127 `(#:tests? #f ; no tests included
5129 #:jar-name "jsr250.jar"))
5130 (home-page "https://jcp.org/en/jsr/detail?id=250")
5131 (synopsis "Security-related annotations")
5132 (description "This package provides annotations for security. It provides
5133 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5135 ;; either cddl or gpl2 only, with classpath exception
5136 (license (list license:cddl1.0
5139 (define-public java-jsr305
5141 (name "java-jsr305")
5145 (uri (string-append "https://repo1.maven.org/maven2/"
5146 "com/google/code/findbugs/"
5147 "jsr305/" version "/jsr305-"
5148 version "-sources.jar"))
5151 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5152 (build-system ant-build-system)
5154 `(#:tests? #f ; no tests included
5155 #:jar-name "jsr305.jar"))
5156 (home-page "http://findbugs.sourceforge.net/")
5157 (synopsis "Annotations for the static analyzer called findbugs")
5158 (description "This package provides annotations for the findbugs package.
5159 It provides packages in the @code{javax.annotations} namespace.")
5160 (license license:asl2.0)))
5162 (define-public java-guava
5165 ;; This is the last release of Guava that can be built with Java 7.
5169 (uri (string-append "https://github.com/google/guava/"
5170 "releases/download/v" version
5171 "/guava-" version "-sources.jar"))
5174 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5175 (build-system ant-build-system)
5177 `(#:tests? #f ; no tests included
5178 #:jar-name "guava.jar"
5180 (modify-phases %standard-phases
5181 (add-after 'unpack 'trim-sources
5183 (with-directory-excursion "src/com/google/common"
5184 ;; Remove annotations to avoid extra dependencies:
5185 ;; * "j2objc" annotations are used when converting Java to
5187 ;; * "errorprone" annotations catch common Java mistakes at
5189 ;; * "IgnoreJRERequirement" is used for Android.
5190 (substitute* (find-files "." "\\.java$")
5191 (("import com.google.j2objc.*") "")
5192 (("import com.google.errorprone.annotation.*") "")
5193 (("import org.codehaus.mojo.animal_sniffer.*") "")
5194 (("@CanIgnoreReturnValue") "")
5197 (("@RetainedWith") "")
5199 (("@ForOverride") "")
5200 (("@J2ObjCIncompatible") "")
5201 (("@IgnoreJRERequirement") "")))
5204 `(("java-jsr305" ,java-jsr305)))
5205 (home-page "https://github.com/google/guava")
5206 (synopsis "Google core libraries for Java")
5207 (description "Guava is a set of core libraries that includes new
5208 collection types (such as multimap and multiset), immutable collections, a
5209 graph library, functional types, an in-memory cache, and APIs/utilities for
5210 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5212 (license license:asl2.0)))
5214 ;; The java-commons-logging package provides adapters to many different
5215 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5216 ;; it with only a minimal set of adapters.
5217 (define-public java-commons-logging-minimal
5219 (name "java-commons-logging-minimal")
5223 (uri (string-append "mirror://apache/commons/logging/source/"
5224 "commons-logging-" version "-src.tar.gz"))
5227 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5228 (build-system ant-build-system)
5230 `(#:tests? #f ; avoid dependency on logging frameworks
5231 #:jar-name "commons-logging-minimal.jar"
5233 (modify-phases %standard-phases
5234 (add-after 'unpack 'delete-adapters-and-tests
5236 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5237 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5238 ;; is used by applications; SimpleLog is the only actually usable
5239 ;; implementation that does not depend on another logging
5243 (delete-file (string-append
5244 "src/main/java/org/apache/commons/logging/impl/" file)))
5245 (list "Jdk13LumberjackLogger.java"
5246 "WeakHashtable.java"
5248 "ServletContextCleaner.java"
5251 "LogKitLogger.java"))
5252 (delete-file-recursively "src/test")
5254 (home-page "http://commons.apache.org/logging/")
5255 (synopsis "Common API for logging implementations")
5256 (description "The Logging package is a thin bridge between different
5257 logging implementations. A library that uses the commons-logging API can be
5258 used with any logging implementation at runtime.")
5259 (license license:asl2.0)))
5261 ;; This is the last release of the 1.x series.
5262 (define-public java-mockito-1
5264 (name "java-mockito")
5268 (uri (string-append "http://repo1.maven.org/maven2/"
5269 "org/mockito/mockito-core/" version
5270 "/mockito-core-" version "-sources.jar"))
5273 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5274 (build-system ant-build-system)
5276 `(#:jar-name "mockito.jar"
5277 #:tests? #f ; no tests included
5278 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5279 ;; patches in build phases.
5281 (modify-phases %standard-phases
5282 ;; Mockito was developed against a different version of hamcrest,
5283 ;; which does not require matcher implementations to provide an
5284 ;; implementation of the "describeMismatch" method. We add this
5285 ;; simple definition to pass the build with our version of hamcrest.
5286 (add-after 'unpack 'fix-hamcrest-build-error
5288 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5289 (("public Matcher getActualMatcher\\(\\) .*" line)
5291 public void describeMismatch(Object item, Description description) {
5292 actualMatcher.describeMismatch(item, description);
5296 ;; Mockito bundles cglib. We have a cglib package, so let's use
5298 (add-after 'unpack 'use-system-libraries
5300 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5301 (substitute* '("CGLIBHacker.java"
5302 "CglibMockMaker.java"
5303 "ClassImposterizer.java"
5304 "DelegatingMockitoMethodProxy.java"
5305 "MethodInterceptorFilter.java"
5306 "MockitoNamingPolicy.java"
5307 "SerializableMockitoMethodProxy.java"
5308 "SerializableNoOp.java")
5309 (("import org.mockito.cglib") "import net.sf.cglib")))
5312 `(("java-junit" ,java-junit)
5313 ("java-objenesis" ,java-objenesis)
5314 ("java-cglib" ,java-cglib)
5315 ("java-hamcrest-core" ,java-hamcrest-core)))
5316 (home-page "http://mockito.org")
5317 (synopsis "Mockito is a mock library for Java")
5318 (description "Mockito is a mocking library for Java which lets you write
5319 tests with a clean and simple API. It generates mocks using reflection, and
5320 it records all mock invocations, including methods arguments.")
5321 (license license:asl2.0)))
5323 (define-public java-httpcomponents-httpcore
5325 (name "java-httpcomponents-httpcore")
5329 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5330 "source/httpcomponents-core-"
5331 version "-src.tar.gz"))
5334 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5335 (build-system ant-build-system)
5337 `(#:jar-name "httpcomponents-httpcore.jar"
5339 (modify-phases %standard-phases
5340 (add-after 'unpack 'chdir
5341 (lambda _ (chdir "httpcore") #t)))))
5343 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5344 ("java-commons-lang3" ,java-commons-lang3)))
5346 `(("java-junit" ,java-junit)
5347 ("java-mockito" ,java-mockito-1)))
5348 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5349 (synopsis "Low level HTTP transport components")
5350 (description "HttpCore is a set of low level HTTP transport components
5351 that can be used to build custom client and server side HTTP services with a
5352 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5353 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5356 This package provides the blocking I/O model library.")
5357 (license license:asl2.0)))
5359 (define-public java-httpcomponents-httpcore-nio
5360 (package (inherit java-httpcomponents-httpcore)
5361 (name "java-httpcomponents-httpcore-nio")
5363 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5365 (modify-phases %standard-phases
5366 (add-after 'unpack 'chdir
5367 (lambda _ (chdir "httpcore-nio") #t)))))
5369 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5370 ("java-hamcrest-core" ,java-hamcrest-core)
5371 ,@(package-inputs java-httpcomponents-httpcore)))
5372 (description "HttpCore is a set of low level HTTP transport components
5373 that can be used to build custom client and server side HTTP services with a
5374 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5375 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5378 This package provides the non-blocking I/O model library based on Java
5381 (define-public java-httpcomponents-httpcore-ab
5382 (package (inherit java-httpcomponents-httpcore)
5383 (name "java-httpcomponents-httpcore-ab")
5385 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5387 (modify-phases %standard-phases
5388 (add-after 'unpack 'chdir
5389 (lambda _ (chdir "httpcore-ab") #t)))))
5391 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5392 ("java-commons-cli" ,java-commons-cli)
5393 ("java-hamcrest-core" ,java-hamcrest-core)
5394 ,@(package-inputs java-httpcomponents-httpcore)))
5395 (synopsis "Apache HttpCore benchmarking tool")
5396 (description "This package provides the HttpCore benchmarking tool. It is
5397 an Apache AB clone based on HttpCore.")))
5399 (define-public java-httpcomponents-httpclient
5401 (name "java-httpcomponents-httpclient")
5405 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5406 "source/httpcomponents-client-"
5407 version "-src.tar.gz"))
5410 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5411 (build-system ant-build-system)
5413 `(#:jar-name "httpcomponents-httpclient.jar"
5415 (modify-phases %standard-phases
5416 (add-after 'unpack 'chdir
5417 (lambda _ (chdir "httpclient") #t)))))
5419 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5420 ("java-commons-codec" ,java-commons-codec)
5421 ("java-hamcrest-core" ,java-hamcrest-core)
5422 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5423 ("java-mockito" ,java-mockito-1)
5424 ("java-junit" ,java-junit)))
5425 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5426 (synopsis "HTTP client library for Java")
5427 (description "Although the @code{java.net} package provides basic
5428 functionality for accessing resources via HTTP, it doesn't provide the full
5429 flexibility or functionality needed by many applications. @code{HttpClient}
5430 seeks to fill this void by providing an efficient, up-to-date, and
5431 feature-rich package implementing the client side of the most recent HTTP
5432 standards and recommendations.")
5433 (license license:asl2.0)))
5435 (define-public java-httpcomponents-httpmime
5436 (package (inherit java-httpcomponents-httpclient)
5437 (name "java-httpcomponents-httpmime")
5439 `(#:jar-name "httpcomponents-httpmime.jar"
5441 (modify-phases %standard-phases
5442 (add-after 'unpack 'chdir
5443 (lambda _ (chdir "httpmime") #t)))))
5445 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5446 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5447 ("java-junit" ,java-junit)
5448 ("java-hamcrest-core" ,java-hamcrest-core)))))
5450 (define-public java-commons-net
5452 (name "java-commons-net")
5456 (uri (string-append "mirror://apache/commons/net/source/"
5457 "commons-net-" version "-src.tar.gz"))
5460 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5461 (build-system ant-build-system)
5463 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5464 ;; should be "resources/examples/examples.properties"), but gets "null"
5467 #:jar-name "commons-net.jar"))
5469 `(("java-junit" ,java-junit)
5470 ("java-hamcrest-core" ,java-hamcrest-core)))
5471 (home-page "http://commons.apache.org/net/")
5472 (synopsis "Client library for many basic Internet protocols")
5473 (description "The Apache Commons Net library implements the client side of
5474 many basic Internet protocols. The purpose of the library is to provide
5475 fundamental protocol access, not higher-level abstractions.")
5476 (license license:asl2.0)))
5478 (define-public java-jsch
5484 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5485 version "/jsch-" version ".zip"))
5488 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5489 (build-system ant-build-system)
5491 `(#:build-target "dist"
5492 #:tests? #f ; no tests included
5494 (modify-phases %standard-phases
5495 (replace 'install (install-jars "dist")))))
5497 `(("unzip" ,unzip)))
5498 (home-page "http://www.jcraft.com/jsch/")
5499 (synopsis "Pure Java implementation of SSH2")
5500 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5501 to connect to an SSH server and use port forwarding, X11 forwarding, file
5502 transfer, etc., and you can integrate its functionality into your own Java
5504 (license license:bsd-3)))
5506 (define-public java-commons-compress
5508 (name "java-commons-compress")
5512 (uri (string-append "mirror://apache/commons/compress/source/"
5513 "commons-compress-" version "-src.tar.gz"))
5516 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5517 (build-system ant-build-system)
5519 `(#:jar-name "commons-compress.jar"
5521 (modify-phases %standard-phases
5522 (add-after 'unpack 'delete-bad-tests
5524 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5525 ;; FIXME: These tests really should not fail. Maybe they are
5526 ;; indicative of problems with our Java packaging work.
5528 ;; This test fails with a null pointer exception.
5529 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5530 ;; This test fails to open test resources.
5531 (delete-file "archivers/zip/ExplodeSupportTest.java")
5533 ;; FIXME: This test adds a dependency on powermock, which is hard to
5534 ;; package at this point.
5535 ;; https://github.com/powermock/powermock
5536 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5539 `(("java-junit" ,java-junit)
5540 ("java-hamcrest-core" ,java-hamcrest-core)
5541 ("java-mockito" ,java-mockito-1)
5542 ("java-xz" ,java-xz)))
5543 (home-page "https://commons.apache.org/proper/commons-compress/")
5544 (synopsis "Java library for working with compressed files")
5545 (description "The Apache Commons Compress library defines an API for
5546 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5547 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5548 (license license:asl2.0)))
5550 (define-public java-commons-csv
5552 (name "java-commons-csv")
5556 (uri (string-append "mirror://apache/commons/csv/source/"
5557 "commons-csv-" version "-src.tar.gz"))
5560 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5561 (build-system ant-build-system)
5563 `(#:jar-name "commons-csv.jar"
5564 #:source-dir "src/main/java"
5565 #:tests? #f)); FIXME: requires java-h2
5567 `(("java-hamcrest-core" ,java-hamcrest-core)
5568 ("java-commons-io" ,java-commons-io)
5569 ("java-commons-lang3" ,java-commons-lang3)
5570 ("junit" ,java-junit)))
5571 (home-page "https://commons.apache.org/proper/commons-csv/")
5572 (synopsis "Read and write CSV documents")
5573 (description "Commons CSV reads and writes files in variations of the Comma
5574 Separated Value (CSV) format. The most common CSV formats are predefined in the
5578 @item Microsoft Excel
5579 @item Informix UNLOAD
5580 @item Informix UNLOAD CSV
5586 Custom formats can be created using a fluent style API.")
5587 (license license:asl2.0)))
5589 (define-public java-osgi-annotation
5591 (name "java-osgi-annotation")
5595 (uri (string-append "https://repo1.maven.org/maven2/"
5596 "org/osgi/org.osgi.annotation/" version "/"
5597 "org.osgi.annotation-" version "-sources.jar"))
5600 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5601 (build-system ant-build-system)
5603 `(#:tests? #f ; no tests
5604 #:jar-name "osgi-annotation.jar"))
5605 (home-page "https://www.osgi.org")
5606 (synopsis "Annotation module of OSGi framework")
5608 "OSGi, for Open Services Gateway initiative framework, is a module system
5609 and service platform for the Java programming language. This package contains
5610 the OSGi annotation module, providing additional services to help dynamic
5612 (license license:asl2.0)))
5614 (define-public java-osgi-core
5616 (name "java-osgi-core")
5620 (uri (string-append "https://repo1.maven.org/maven2/"
5621 "org/osgi/org.osgi.core/" version "/"
5622 "org.osgi.core-" version "-sources.jar"))
5625 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5626 (build-system ant-build-system)
5628 `(#:tests? #f ; no tests
5629 #:jar-name "osgi-core.jar"))
5631 `(("java-osgi-annotation" ,java-osgi-annotation)))
5632 (home-page "https://www.osgi.org")
5633 (synopsis "Core module of OSGi framework")
5635 "OSGi, for Open Services Gateway initiative framework, is a module system
5636 and service platform for the Java programming language. This package contains
5637 the OSGi Core module.")
5638 (license license:asl2.0)))
5640 (define-public java-osgi-service-event
5642 (name "java-osgi-service-event")
5646 (uri (string-append "https://repo1.maven.org/maven2/"
5647 "org/osgi/org.osgi.service.event/"
5648 version "/org.osgi.service.event-"
5649 version "-sources.jar"))
5652 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5653 (build-system ant-build-system)
5655 `(#:tests? #f ; no tests
5656 #:jar-name "osgi-service-event.jar"))
5658 `(("java-osgi-annotation" ,java-osgi-annotation)
5659 ("java-osgi-core" ,java-osgi-core)))
5660 (home-page "https://www.osgi.org")
5661 (synopsis "OSGi service event module")
5663 "OSGi, for Open Services Gateway initiative framework, is a module system
5664 and service platform for the Java programming language. This package contains
5665 the OSGi @code{org.osgi.service.event} module.")
5666 (license license:asl2.0)))
5668 (define-public java-eclipse-osgi
5670 (name "java-eclipse-osgi")
5674 (uri (string-append "https://repo1.maven.org/maven2/"
5675 "org/eclipse/platform/org.eclipse.osgi/"
5676 version "/org.eclipse.osgi-"
5677 version "-sources.jar"))
5680 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5681 (build-system ant-build-system)
5683 `(#:tests? #f ; no tests included
5684 #:jar-name "eclipse-equinox-osgi.jar"))
5686 `(("java-osgi-annotation" ,java-osgi-annotation)))
5687 (home-page "http://www.eclipse.org/equinox/")
5688 (synopsis "Eclipse Equinox OSGi framework")
5689 (description "This package provides an implementation of the OSGi Core
5691 (license license:epl1.0)))
5693 (define-public java-eclipse-equinox-common
5695 (name "java-eclipse-equinox-common")
5696 (version "3.10.200")
5699 (uri (string-append "https://repo1.maven.org/maven2/"
5700 "org/eclipse/platform/org.eclipse.equinox.common/"
5701 version "/org.eclipse.equinox.common-"
5702 version "-sources.jar"))
5705 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5706 (build-system ant-build-system)
5708 `(#:tests? #f ; no tests included
5709 #:jar-name "eclipse-equinox-common.jar"))
5711 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5712 (home-page "http://www.eclipse.org/equinox/")
5713 (synopsis "Common Eclipse runtime")
5714 (description "This package provides the common Eclipse runtime.")
5715 (license license:epl1.0)))
5717 (define-public java-eclipse-core-jobs
5719 (name "java-eclipse-core-jobs")
5723 (uri (string-append "https://repo1.maven.org/maven2/"
5724 "org/eclipse/platform/org.eclipse.core.jobs/"
5725 version "/org.eclipse.core.jobs-"
5726 version "-sources.jar"))
5729 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5730 (build-system ant-build-system)
5732 `(#:tests? #f ; no tests included
5733 #:jar-name "eclipse-core-jobs.jar"))
5735 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5736 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5737 (home-page "http://www.eclipse.org/equinox/")
5738 (synopsis "Eclipse jobs mechanism")
5739 (description "This package provides the Eclipse jobs mechanism.")
5740 (license license:epl1.0)))
5742 (define-public java-eclipse-equinox-registry
5744 (name "java-eclipse-equinox-registry")
5748 (uri (string-append "https://repo1.maven.org/maven2/"
5749 "org/eclipse/platform/org.eclipse.equinox.registry/"
5750 version "/org.eclipse.equinox.registry-"
5751 version "-sources.jar"))
5754 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5755 (build-system ant-build-system)
5757 `(#:tests? #f ; no tests included
5758 #:jar-name "eclipse-equinox-registry.jar"))
5760 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5761 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5762 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5763 (home-page "http://www.eclipse.org/equinox/")
5764 (synopsis "Eclipse extension registry support")
5765 (description "This package provides support for the Eclipse extension
5767 (license license:epl1.0)))
5769 (define-public java-eclipse-equinox-app
5771 (name "java-eclipse-equinox-app")
5775 (uri (string-append "https://repo1.maven.org/maven2/"
5776 "org/eclipse/platform/org.eclipse.equinox.app/"
5777 version "/org.eclipse.equinox.app-"
5778 version "-sources.jar"))
5781 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5782 (build-system ant-build-system)
5784 `(#:tests? #f ; no tests included
5785 #:jar-name "eclipse-equinox-app.jar"))
5787 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5788 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5789 ("java-eclipse-osgi" ,java-eclipse-osgi)
5790 ("java-osgi-service-event" ,java-osgi-service-event)))
5791 (home-page "http://www.eclipse.org/equinox/")
5792 (synopsis "Equinox application container")
5793 (description "This package provides the Equinox application container for
5795 (license license:epl1.0)))
5797 (define-public java-eclipse-equinox-preferences
5799 (name "java-eclipse-equinox-preferences")
5803 (uri (string-append "https://repo1.maven.org/maven2/"
5804 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5805 version "/org.eclipse.equinox.preferences-"
5806 version "-sources.jar"))
5809 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5810 (build-system ant-build-system)
5812 `(#:tests? #f ; no tests included
5813 #:jar-name "eclipse-equinox-preferences.jar"))
5815 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5816 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5817 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5818 (home-page "http://www.eclipse.org/equinox/")
5819 (synopsis "Eclipse preferences mechanism")
5820 (description "This package provides the Eclipse preferences mechanism with
5821 the module @code{org.eclipse.equinox.preferences}.")
5822 (license license:epl1.0)))
5824 (define-public java-eclipse-core-contenttype
5826 (name "java-eclipse-core-contenttype")
5830 (uri (string-append "https://repo1.maven.org/maven2/"
5831 "org/eclipse/platform/org.eclipse.core.contenttype/"
5832 version "/org.eclipse.core.contenttype-"
5833 version "-sources.jar"))
5836 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5837 (build-system ant-build-system)
5839 `(#:tests? #f ; no tests included
5840 #:jar-name "eclipse-core-contenttype.jar"))
5842 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5843 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5844 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5845 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5846 (home-page "http://www.eclipse.org/")
5847 (synopsis "Eclipse content mechanism")
5848 (description "This package provides the Eclipse content mechanism in the
5849 @code{org.eclipse.core.contenttype} module.")
5850 (license license:epl1.0)))
5852 (define-public java-eclipse-core-runtime
5854 (name "java-eclipse-core-runtime")
5855 (version "3.15.100")
5858 (uri (string-append "https://repo1.maven.org/maven2/"
5859 "org/eclipse/platform/org.eclipse.core.runtime/"
5860 version "/org.eclipse.core.runtime-"
5861 version "-sources.jar"))
5864 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
5865 (build-system ant-build-system)
5867 `(#:tests? #f ; no tests included
5868 #:jar-name "eclipse-core-runtime.jar"))
5870 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5871 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5872 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5873 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5874 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5875 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5876 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5877 (home-page "https://www.eclipse.org/")
5878 (synopsis "Eclipse core runtime")
5879 (description "This package provides the Eclipse core runtime with the
5880 module @code{org.eclipse.core.runtime}.")
5881 (license license:epl1.0)))
5883 (define-public java-eclipse-core-filesystem
5885 (name "java-eclipse-core-filesystem")
5889 (uri (string-append "https://repo1.maven.org/maven2/"
5890 "org/eclipse/platform/org.eclipse.core.filesystem/"
5891 version "/org.eclipse.core.filesystem-"
5892 version "-sources.jar"))
5895 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5896 (build-system ant-build-system)
5898 `(#:tests? #f ; no tests included
5899 #:jar-name "eclipse-core-filesystem.jar"))
5901 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5902 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5903 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5904 (home-page "https://www.eclipse.org/")
5905 (synopsis "Eclipse core file system")
5906 (description "This package provides the Eclipse core file system with the
5907 module @code{org.eclipse.core.filesystem}.")
5908 (license license:epl1.0)))
5910 (define-public java-eclipse-core-expressions
5912 (name "java-eclipse-core-expressions")
5916 (uri (string-append "https://repo1.maven.org/maven2/"
5917 "org/eclipse/platform/org.eclipse.core.expressions/"
5918 version "/org.eclipse.core.expressions-"
5919 version "-sources.jar"))
5922 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5923 (build-system ant-build-system)
5925 `(#:tests? #f ; no tests included
5926 #:jar-name "eclipse-core-expressions.jar"))
5928 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5929 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5930 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5931 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5932 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5933 (home-page "https://www.eclipse.org/")
5934 (synopsis "Eclipse core expression language")
5935 (description "This package provides the Eclipse core expression language
5936 with the @code{org.eclipse.core.expressions} module.")
5937 (license license:epl1.0)))
5939 (define-public java-eclipse-core-variables
5941 (name "java-eclipse-core-variables")
5945 (uri (string-append "https://repo1.maven.org/maven2/"
5946 "org/eclipse/platform/org.eclipse.core.variables/"
5947 version "/org.eclipse.core.variables-"
5948 version "-sources.jar"))
5951 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5952 (build-system ant-build-system)
5954 `(#:tests? #f ; no tests included
5955 #:jar-name "eclipse-core-variables.jar"))
5957 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5958 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5959 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5960 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5961 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5962 (home-page "https://www.eclipse.org/platform")
5963 (synopsis "Eclipse core variables")
5964 (description "This package provides the Eclipse core variables module
5965 @code{org.eclipse.core.variables}.")
5966 (license license:epl1.0)))
5968 (define-public java-eclipse-ant-core
5970 (name "java-eclipse-ant-core")
5974 (uri (string-append "https://repo1.maven.org/maven2/"
5975 "org/eclipse/platform/org.eclipse.ant.core/"
5976 version "/org.eclipse.ant.core-"
5977 version "-sources.jar"))
5980 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5981 (build-system ant-build-system)
5983 `(#:tests? #f ; no tests included
5984 #:jar-name "eclipse-ant-core.jar"))
5986 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5987 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5988 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5989 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5990 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5991 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5992 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5993 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5994 (home-page "https://www.eclipse.org/platform")
5995 (synopsis "Ant build tool core libraries")
5996 (description "This package provides the ant build tool core libraries with
5997 the module @code{org.eclipse.ant.core}.")
5998 (license license:epl1.0)))
6000 (define-public java-eclipse-core-resources
6002 (name "java-eclipse-core-resources")
6003 (version "3.13.200")
6006 (uri (string-append "https://repo1.maven.org/maven2/"
6007 "org/eclipse/platform/org.eclipse.core.resources/"
6008 version "/org.eclipse.core.resources-"
6009 version "-sources.jar"))
6012 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6013 (build-system ant-build-system)
6015 `(#:tests? #f ; no tests included
6016 #:jar-name "eclipse-core-resources.jar"))
6018 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6019 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6020 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6021 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6022 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6023 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6024 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6025 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6026 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6027 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6028 (home-page "https://www.eclipse.org/")
6029 (synopsis "Eclipse core resource management")
6030 (description "This package provides the Eclipse core resource management
6031 module @code{org.eclipse.core.resources}.")
6032 (license license:epl1.0)))
6034 (define-public java-eclipse-compare-core
6036 (name "java-eclipse-compare-core")
6040 (uri (string-append "https://repo1.maven.org/maven2/"
6041 "org/eclipse/platform/org.eclipse.compare.core/"
6042 version "/org.eclipse.compare.core-"
6043 version "-sources.jar"))
6046 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6047 (build-system ant-build-system)
6049 `(#:tests? #f ; no tests included
6050 #:jar-name "eclipse-compare-core.jar"))
6052 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6053 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6054 ("java-eclipse-osgi" ,java-eclipse-osgi)
6055 ("java-icu4j" ,java-icu4j)))
6056 (home-page "https://www.eclipse.org/")
6057 (synopsis "Eclipse core compare support")
6058 (description "This package provides the Eclipse core compare support
6059 module @code{org.eclipse.compare.core}.")
6060 (license license:epl1.0)))
6062 (define-public java-eclipse-team-core
6064 (name "java-eclipse-team-core")
6068 (uri (string-append "https://repo1.maven.org/maven2/"
6069 "org/eclipse/platform/org.eclipse.team.core/"
6070 version "/org.eclipse.team.core-"
6071 version "-sources.jar"))
6074 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6075 (build-system ant-build-system)
6077 `(#:tests? #f ; no tests included
6078 #:jar-name "eclipse-team-core.jar"))
6080 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6081 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6082 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6083 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6084 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6085 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6086 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6087 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6088 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6089 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6090 (home-page "https://www.eclipse.org/platform")
6091 (synopsis "Eclipse team support core")
6092 (description "This package provides the Eclipse team support core module
6093 @code{org.eclipse.team.core}.")
6094 (license license:epl1.0)))
6096 (define-public java-eclipse-core-commands
6098 (name "java-eclipse-core-commands")
6102 (uri (string-append "https://repo1.maven.org/maven2/"
6103 "org/eclipse/platform/org.eclipse.core.commands/"
6104 version "/org.eclipse.core.commands-"
6105 version "-sources.jar"))
6108 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6109 (build-system ant-build-system)
6111 `(#:tests? #f ; no tests included
6112 #:jar-name "eclipse-core-commands.jar"))
6114 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6115 (home-page "https://www.eclipse.org/platform")
6116 (synopsis "Eclipse core commands")
6117 (description "This package provides Eclipse core commands in the module
6118 @code{org.eclipse.core.commands}.")
6119 (license license:epl1.0)))
6121 (define-public java-eclipse-text
6123 (name "java-eclipse-text")
6127 (uri (string-append "https://repo1.maven.org/maven2/"
6128 "org/eclipse/platform/org.eclipse.text/"
6129 version "/org.eclipse.text-"
6130 version "-sources.jar"))
6133 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6134 (build-system ant-build-system)
6136 `(#:tests? #f ; no tests included
6137 #:jar-name "eclipse-text.jar"
6139 (modify-phases %standard-phases
6140 ;; When creating a new category we must make sure that the new list
6141 ;; matches List<Position>. By default it seems to be too generic
6142 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6143 ;; Without this we get this error:
6145 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6146 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6147 ;; [javac] fPositions.put(category, new ArrayList<>());
6149 ;; [javac] required: String,List<Position>
6150 ;; [javac] found: String,ArrayList<Object>
6151 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6152 ;; to List<Position> by method invocation conversion
6153 ;; [javac] where K,V are type-variables:
6154 ;; [javac] K extends Object declared in interface Map
6155 ;; [javac] V extends Object declared in interface Map
6157 ;; I don't know if this is a good fix. I suspect it is not, but it
6159 (add-after 'unpack 'fix-compilation-error
6161 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6162 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6163 "Positions.put(category, new ArrayList<Position>());"))
6166 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6167 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6168 ("java-icu4j" ,java-icu4j)))
6169 (home-page "http://www.eclipse.org/platform")
6170 (synopsis "Eclipse text library")
6171 (description "Platform Text is part of the Platform UI project and
6172 provides the basic building blocks for text and text editors within Eclipse
6173 and contributes the Eclipse default text editor.")
6174 (license license:epl1.0)))
6176 (define-public java-eclipse-jdt-core
6178 (name "java-eclipse-jdt-core")
6182 (uri (string-append "https://repo1.maven.org/maven2/"
6183 "org/eclipse/jdt/org.eclipse.jdt.core/"
6184 version "/org.eclipse.jdt.core-"
6185 version "-sources.jar"))
6188 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6189 (build-system ant-build-system)
6191 `(#:tests? #f ; no tests included
6192 #:jar-name "eclipse-jdt-core.jar"
6194 (modify-phases %standard-phases
6195 (add-after 'unpack 'move-sources
6197 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6198 (for-each (lambda (file)
6199 (install-file file (string-append "../" (dirname file))))
6200 (find-files "." ".*")))
6201 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6203 (add-before 'build 'copy-resources
6205 (with-directory-excursion "src"
6206 (for-each (lambda (file)
6207 (install-file file (string-append "../build/classes/" (dirname file))))
6208 (find-files "." ".*.(props|properties|rsc)")))
6211 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6212 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6213 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6214 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6215 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6216 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6217 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6218 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6219 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6220 ("java-eclipse-osgi" ,java-eclipse-osgi)
6221 ("java-eclipse-text" ,java-eclipse-text)))
6222 (home-page "https://www.eclipse.org/jdt")
6223 (synopsis "Java development tools core libraries")
6224 (description "This package provides the core libraries of the Eclipse Java
6225 development tools.")
6226 (license license:epl1.0)))
6228 (define-public java-eclipse-jdt-compiler-apt
6230 (name "java-eclipse-jdt-compiler-apt")
6234 (uri (string-append "https://repo1.maven.org/maven2/"
6235 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6236 version "/org.eclipse.jdt.compiler.apt-"
6237 version "-sources.jar"))
6240 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6241 (build-system ant-build-system)
6243 `(#:tests? #f ; no tests included
6244 #:jar-name "eclipse-jdt-compiler-apt.jar"
6247 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6248 (home-page "https://www.eclipse.org/jdt/apt/")
6249 (synopsis "Annotation processing tool")
6250 (description "APT stands for Annotation Processing Tool. APT provides a
6251 means for generating files and compiling new Java classes based on annotations
6252 found in your source code.")
6253 (license license:epl2.0)))
6255 (define-public java-javax-mail
6257 (name "java-javax-mail")
6261 (uri (string-append "https://repo1.maven.org/maven2/"
6262 "com/sun/mail/javax.mail/"
6263 version "/javax.mail-"
6264 version "-sources.jar"))
6267 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6268 (build-system ant-build-system)
6270 `(#:tests? #f ; no tests
6271 #:jar-name "javax-mail.jar"))
6272 (home-page "https://javamail.java.net")
6273 (synopsis "Reference implementation of the JavaMail API")
6275 "This package provides versions of the JavaMail API implementation, IMAP,
6276 SMTP, and POP3 service providers, some examples, and documentation for the
6278 ;; GPLv2 only with "classpath exception".
6279 (license license:gpl2)))
6281 (define-public java-log4j-api
6283 (name "java-log4j-api")
6287 (uri (string-append "mirror://apache/logging/log4j/" version
6288 "/apache-log4j-" version "-src.tar.gz"))
6291 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6292 (build-system ant-build-system)
6294 `(#:tests? #f ; tests require unpackaged software
6295 #:jar-name "log4j-api.jar"
6297 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6300 (modify-phases %standard-phases
6301 (add-after 'unpack 'enter-dir
6302 (lambda _ (chdir "log4j-api") #t))
6303 ;; FIXME: The tests require additional software that has not been
6304 ;; packaged yet, such as
6305 ;; * org.apache.maven
6306 ;; * org.apache.felix
6307 (add-after 'enter-dir 'delete-tests
6308 (lambda _ (delete-file-recursively "src/test") #t)))))
6310 `(("java-osgi-core" ,java-osgi-core)
6311 ("java-hamcrest-core" ,java-hamcrest-core)
6312 ("java-junit" ,java-junit)))
6313 (home-page "http://logging.apache.org/log4j/2.x/")
6314 (synopsis "API module of the Log4j logging framework for Java")
6316 "This package provides the API module of the Log4j logging framework for
6318 (license license:asl2.0)))
6320 (define-public java-log4j-core
6322 (inherit java-log4j-api)
6323 (name "java-log4j-core")
6325 `(("java-osgi-core" ,java-osgi-core)
6326 ("java-hamcrest-core" ,java-hamcrest-core)
6327 ("java-log4j-api" ,java-log4j-api)
6328 ("java-mail" ,java-mail)
6329 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6330 ("java-lmax-disruptor" ,java-lmax-disruptor)
6331 ("java-kafka" ,java-kafka-clients)
6332 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6333 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6334 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6335 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6336 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6337 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6338 ("java-commons-compress" ,java-commons-compress)
6339 ("java-commons-csv" ,java-commons-csv)
6340 ("java-jeromq" ,java-jeromq)
6341 ("java-junit" ,java-junit)))
6343 `(("hamcrest" ,java-hamcrest-all)
6344 ("java-commons-io" ,java-commons-io)
6345 ("java-commons-lang3" ,java-commons-lang3)
6346 ("slf4j" ,java-slf4j-api)))
6348 `(#:tests? #f ; tests require more dependencies
6349 #:test-dir "src/test"
6350 #:source-dir "src/main/java"
6351 #:jar-name "log4j-core.jar"
6354 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6357 (modify-phases %standard-phases
6358 (add-after 'unpack 'enter-dir
6359 (lambda _ (chdir "log4j-core") #t)))))
6360 (synopsis "Core component of the Log4j framework")
6361 (description "This package provides the core component of the Log4j
6362 logging framework for Java.")))
6364 (define-public java-log4j-1.2-api
6366 (inherit java-log4j-api)
6367 (name "java-log4j-1.2-api")
6369 `(#:jar-name "java-log4j-1.2-api.jar"
6370 #:source-dir "log4j-1.2-api/src/main/java"
6372 ;; Tests require maven-model (and other maven subprojects), which is a
6373 ;; cyclic dependency.
6376 `(("log4j-api" ,java-log4j-api)
6377 ("log4j-core" ,java-log4j-core)
6378 ("osgi-core" ,java-osgi-core)
6379 ("eclipse-osgi" ,java-eclipse-osgi)
6380 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6382 (define-public java-commons-cli
6384 (name "java-commons-cli")
6388 (uri (string-append "mirror://apache/commons/cli/source/"
6389 "commons-cli-" version "-src.tar.gz"))
6392 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6393 (build-system ant-build-system)
6396 `(#:jar-name "commons-cli.jar"))
6398 `(("java-junit" ,java-junit)
6399 ("java-hamcrest-core" ,java-hamcrest-core)))
6400 (home-page "http://commons.apache.org/cli/")
6401 (synopsis "Command line arguments and options parsing library")
6402 (description "The Apache Commons CLI library provides an API for parsing
6403 command line options passed to programs. It is also able to print help
6404 messages detailing the options available for a command line tool.
6406 Commons CLI supports different types of options:
6409 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6410 @item GNU like long options (ie. du --human-readable --max-depth=1)
6411 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6412 @item Short options with value attached (ie. gcc -O2 foo.c)
6413 @item long options with single hyphen (ie. ant -projecthelp)
6416 This is a part of the Apache Commons Project.")
6417 (license license:asl2.0)))
6419 (define-public java-commons-codec
6421 (name "java-commons-codec")
6425 (uri (string-append "mirror://apache/commons/codec/source/"
6426 "commons-codec-" version "-src.tar.gz"))
6429 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6430 (build-system ant-build-system)
6431 (outputs '("out" "doc"))
6433 `(#:test-target "test"
6435 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6436 (junit (assoc-ref %build-inputs "java-junit")))
6437 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6438 (string-append "-Dhamcrest.jar=" hamcrest
6439 "/share/java/hamcrest-core.jar")
6440 ;; Do not append version to jar.
6441 "-Dfinal.name=commons-codec"))
6443 (modify-phases %standard-phases
6444 (add-after 'build 'build-javadoc ant-build-javadoc)
6445 (replace 'install (install-jars "dist"))
6446 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6448 `(("java-junit" ,java-junit)
6449 ("java-hamcrest-core" ,java-hamcrest-core)))
6450 (home-page "http://commons.apache.org/codec/")
6451 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6452 (description "The codec package contains simple encoder and decoders for
6453 various formats such as Base64 and Hexadecimal. In addition to these widely
6454 used encoders and decoders, the codec package also maintains a collection of
6455 phonetic encoding utilities.
6457 This is a part of the Apache Commons Project.")
6458 (license license:asl2.0)))
6460 (define-public java-commons-daemon
6462 (name "java-commons-daemon")
6466 (uri (string-append "mirror://apache/commons/daemon/source/"
6467 "commons-daemon-" version "-src.tar.gz"))
6470 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
6471 (build-system ant-build-system)
6473 `(#:test-target "test"
6475 (modify-phases %standard-phases
6476 (add-after 'build 'build-javadoc ant-build-javadoc)
6477 (replace 'install (install-jars "dist"))
6478 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6480 `(("java-junit" ,java-junit)))
6481 (home-page "http://commons.apache.org/daemon/")
6482 (synopsis "Library to launch Java applications as daemons")
6483 (description "The Daemon package from Apache Commons can be used to
6484 implement Java applications which can be launched as daemons. For example the
6485 program will be notified about a shutdown so that it can perform cleanup tasks
6486 before its process of execution is destroyed by the operation system.
6488 This package contains the Java library. You will also need the actual binary
6489 for your architecture which is provided by the jsvc package.
6491 This is a part of the Apache Commons Project.")
6492 (license license:asl2.0)))
6494 (define-public java-javaewah
6496 (name "java-javaewah")
6500 (uri (string-append "https://github.com/lemire/javaewah/"
6501 "archive/JavaEWAH-" version ".tar.gz"))
6504 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6505 (build-system ant-build-system)
6506 (arguments `(#:jar-name "javaewah.jar"))
6508 `(("java-junit" ,java-junit)
6509 ("java-hamcrest-core" ,java-hamcrest-core)))
6510 (home-page "https://github.com/lemire/javaewah")
6511 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6512 (description "This is a word-aligned compressed variant of the Java
6513 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6514 compression scheme. It can be used to implement bitmap indexes.
6516 The goal of word-aligned compression is not to achieve the best compression,
6517 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6518 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6519 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6520 @code{BitSet} class by Sun).")
6521 ;; GPL2.0 derivates are explicitly allowed.
6522 (license license:asl2.0)))
6524 (define-public java-slf4j-api
6526 (name "java-slf4j-api")
6530 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6534 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6535 (modules '((guix build utils)))
6536 ;; Delete bundled jars.
6539 (for-each delete-file (find-files "." "\\.jar$"))
6541 (build-system ant-build-system)
6543 `(#:jar-name "slf4j-api.jar"
6544 #:source-dir "slf4j-api/src/main"
6545 #:test-dir "slf4j-api/src/test"
6547 (modify-phases %standard-phases
6548 (add-after 'build 'regenerate-jar
6550 ;; pom.xml ignores these files in the jar creation process. If we don't,
6551 ;; we get the error "This code should have never made it into slf4j-api.jar"
6552 (delete-file-recursively "build/classes/org/slf4j/impl")
6553 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6554 "build/classes" ".")))
6555 (add-before 'check 'dont-test-abstract-classes
6557 ;; abstract classes are not meant to be run with junit
6558 (substitute* "build.xml"
6559 (("<include name=\"\\*\\*/\\*Test.java\" />")
6560 (string-append "<include name=\"**/*Test.java\" />"
6561 "<exclude name=\"**/MultithreadedInitializationTest"
6565 `(("java-junit" ,java-junit)
6566 ("java-hamcrest-core" ,java-hamcrest-core)))
6567 (home-page "https://www.slf4j.org/")
6568 (synopsis "Simple logging facade for Java")
6569 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6570 simple facade or abstraction for various logging
6571 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6572 allowing the end user to plug in the desired logging framework at deployment
6574 (license license:expat)))
6576 (define java-slf4j-api-bootstrap
6578 (inherit java-slf4j-api)
6579 (name "java-slf4j-api-bootstrap")
6582 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6583 ((#:tests? _ #f) #f)))))
6585 (define-public java-slf4j-simple
6587 (name "java-slf4j-simple")
6589 (source (package-source java-slf4j-api))
6590 (build-system ant-build-system)
6592 `(#:jar-name "slf4j-simple.jar"
6593 #:source-dir "slf4j-simple/src/main"
6594 #:test-dir "slf4j-simple/src/test"
6596 (modify-phases %standard-phases
6597 ;; The tests need some test classes from slf4j-api
6598 (add-before 'check 'build-slf4j-api-test-helpers
6600 ;; Add current dir to CLASSPATH ...
6602 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6603 ;; ... and build test helper classes here:
6606 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6608 `(("java-junit" ,java-junit)
6609 ("java-hamcrest-core" ,java-hamcrest-core)
6610 ("java-slf4j-api" ,java-slf4j-api)))
6611 (home-page "https://www.slf4j.org/")
6612 (synopsis "Simple implementation of simple logging facade for Java")
6613 (description "SLF4J binding for the Simple implementation, which outputs
6614 all events to System.err. Only messages of level INFO and higher are
6616 (license license:expat)))
6618 (define-public antlr2
6624 (uri (string-append "http://www.antlr2.org/download/antlr-"
6628 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6629 (modules '((guix build utils)))
6632 (delete-file "antlr.jar")
6633 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6637 "#define EOF (-1)\n"
6638 "#include <strings.h>")))
6639 (substitute* "configure"
6642 (build-system gnu-build-system)
6644 `(#:tests? #f ; no test target
6645 #:imported-modules ((guix build ant-build-system)
6646 (guix build syscalls)
6647 ,@%gnu-build-system-modules)
6648 #:modules (((guix build ant-build-system) #:prefix ant:)
6649 (guix build gnu-build-system)
6652 (modify-phases %standard-phases
6653 (add-after 'install 'strip-jar-timestamps
6654 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6655 (add-before 'configure 'fix-timestamp
6657 (substitute* "configure"
6658 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6660 (add-after 'configure 'fix-bin-ls
6662 (substitute* (find-files "." "Makefile")
6668 ("java" ,icedtea "jdk")))
6670 `(("java" ,icedtea)))
6671 (home-page "http://www.antlr2.org")
6672 (synopsis "Framework for constructing recognizers, compilers, and translators")
6673 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6674 is a language tool that provides a framework for constructing recognizers,
6675 compilers, and translators from grammatical descriptions containing Java, C#,
6676 C++, or Python actions. ANTLR provides excellent support for tree construction,
6677 tree walking, and translation.")
6678 (license license:public-domain)))
6680 (define-public java-stringtemplate-3
6682 (name "java-stringtemplate")
6686 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6687 "gh-pages/download/stringtemplate-"
6691 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6692 (build-system ant-build-system)
6694 `(#:jar-name (string-append ,name "-" ,version ".jar")
6696 #:modules ((guix build ant-build-system)
6700 (modify-phases %standard-phases
6701 (add-before 'check 'fix-tests
6703 (substitute* "build.xml"
6704 (("\\$\\{test.home\\}/java")
6705 "${test.home}/org"))
6707 (add-before 'build 'generate-grammar
6709 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6710 (for-each (lambda (file)
6711 (format #t "~a\n" file)
6712 (invoke "antlr" file))
6713 '("template.g" "angle.bracket.template.g" "action.g"
6714 "eval.g" "group.g" "interface.g")))
6718 ("java-junit" ,java-junit)))
6719 (home-page "http://www.stringtemplate.org")
6720 (synopsis "Template engine to generate formatted text output")
6721 (description "StringTemplate is a java template engine (with ports for C#,
6722 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6723 or any other formatted text output. StringTemplate is particularly good at
6724 code generators, multiple site skins, and internationalization / localization.
6725 StringTemplate also powers ANTLR.")
6726 (license license:bsd-3)))
6728 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6729 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6730 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6731 ;; of antlr3 at runtime.
6732 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6733 ;; This version of ST4 is sufficient for the latest antlr3.
6734 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6735 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6736 ;; against the latest ST4.
6737 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6738 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6739 ;; only grammar files with the antlr2 syntax.
6740 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6742 (define-public java-stringtemplate
6743 (package (inherit java-stringtemplate-3)
6744 (name "java-stringtemplate")
6748 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6750 (file-name (string-append name "-" version ".tar.gz"))
6753 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6754 (build-system ant-build-system)
6756 `(#:jar-name (string-append ,name "-" ,version ".jar")
6757 #:tests? #f ; FIXME: tests fail for unknown reasons
6759 #:modules ((guix build ant-build-system)
6763 (modify-phases %standard-phases
6764 (add-before 'check 'fix-test-target
6766 (substitute* "build.xml"
6767 (("\\$\\{test.home\\}/java") "${test.home}/")
6768 (("\\*Test.java") "Test*.java"))
6770 (add-before 'build 'generate-grammar
6772 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6773 (for-each (lambda (file)
6774 (format #t "~a\n" file)
6775 (invoke "antlr3" file))
6776 '("STParser.g" "Group.g" "CodeGenerator.g")))
6779 `(("antlr3" ,antlr3-bootstrap)
6781 ("java-stringtemplate" ,java-stringtemplate-3)
6782 ("java-junit" ,java-junit)))))
6784 (define java-stringtemplate-4.0.6
6785 (package (inherit java-stringtemplate)
6786 (name "java-stringtemplate")
6790 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6792 (file-name (string-append name "-" version ".tar.gz"))
6795 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6797 `(("antlr3" ,antlr3-3.3)
6799 ("java-stringtemplate" ,java-stringtemplate-3)))))
6801 (define-public antlr3
6807 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6809 (file-name (string-append name "-" version ".tar.gz"))
6812 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6813 (build-system ant-build-system)
6815 `(#:jar-name (string-append ,name "-" ,version ".jar")
6816 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6819 (modify-phases %standard-phases
6820 (add-after 'install 'bin-install
6821 (lambda* (#:key inputs outputs #:allow-other-keys)
6822 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6823 (bin (string-append (assoc-ref outputs "out") "/bin")))
6825 (with-output-to-file (string-append bin "/antlr3")
6828 (string-append "#!" (which "sh") "\n"
6829 "java -cp " jar "/" ,name "-" ,version ".jar:"
6831 (find-files (assoc-ref inputs "stringtemplate")
6835 (find-files (assoc-ref inputs "stringtemplate4")
6839 (find-files (string-append
6840 (assoc-ref inputs "antlr")
6843 " org.antlr.Tool $*"))))
6844 (chmod (string-append bin "/antlr3") #o755))
6846 (add-before 'build 'generate-grammar
6848 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6849 (for-each (lambda (file)
6852 (invoke "antlr3" file))
6853 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6854 "AssignTokenTypesWalker.g"
6855 "ActionTranslator.g" "TreeToNFAConverter.g"
6856 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6857 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6858 (substitute* "ANTLRParser.java"
6859 (("public Object getTree") "public GrammarAST getTree"))
6860 (substitute* "ANTLRv3Parser.java"
6861 (("public Object getTree") "public CommonTree getTree"))
6862 (chdir "../../../../../java")
6863 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6864 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6865 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6866 (substitute* "org/antlr/tool/ErrorManager.java"
6867 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6868 (chdir "../../../..")
6870 (add-before 'build 'fix-build-xml
6872 (substitute* "build.xml"
6873 (("target name=\"compile\">")
6874 "target name=\"compile\">
6875 <copy todir=\"${classes.dir}\">
6876 <fileset dir=\"tool/src/main/resources\">
6877 <include name=\"**/*.stg\"/>
6878 <include name=\"**/*.st\"/>
6879 <include name=\"**/*.sti\"/>
6880 <include name=\"**/STLexer.tokens\"/>
6886 ("antlr3" ,antlr3-bootstrap)))
6888 `(("junit" ,java-junit)
6889 ("stringtemplate" ,java-stringtemplate-3)
6890 ("stringtemplate4" ,java-stringtemplate)))
6892 `(("stringtemplate" ,java-stringtemplate-3)
6894 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6895 (home-page "http://www.antlr3.org")
6896 (synopsis "Framework for constructing recognizers, compilers, and translators")
6897 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6898 is a language tool that provides a framework for constructing recognizers,
6899 compilers, and translators from grammatical descriptions containing Java, C#,
6900 C++, or Python actions. ANTLR provides excellent support for tree construction,
6901 tree walking, and translation.")
6902 (license license:bsd-3)))
6904 (define antlr3-bootstrap
6907 (name "antlr3-bootstrap")
6910 ("antlr3" ,antlr3-3.3)))
6912 `(("junit" ,java-junit)))))
6921 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6922 "gh-pages/download/antlr-"
6926 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6928 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6930 `(#:jar-name (string-append ,name "-" ,version ".jar")
6931 #:source-dir (string-join '("tool/src/main/java"
6932 "runtime/Java/src/main/java"
6933 "tool/src/main/antlr2"
6934 "tool/src/main/antlr3")
6936 #:tests? #f ; FIXME: tests seem to require maven plugin
6937 #:modules ((guix build ant-build-system)
6941 (modify-phases %standard-phases
6942 (add-after 'install 'bin-install
6943 (lambda* (#:key inputs outputs #:allow-other-keys)
6944 (let* ((out (assoc-ref outputs "out"))
6945 (jar (string-append out "/share/java"))
6946 (bin (string-append out "/bin")))
6948 (with-output-to-file (string-append bin "/antlr3")
6952 "#!" (which "sh") "\n"
6953 "java -cp " jar "/antlr3-3.3.jar:"
6955 (append (find-files (assoc-ref inputs "java-stringtemplate")
6957 (find-files (string-append (assoc-ref inputs "antlr")
6961 " org.antlr.Tool $*"))))
6962 (chmod (string-append bin "/antlr3") #o755)
6964 (add-before 'build 'generate-grammar
6966 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6967 (("import org.antlr.grammar.v2.\\*;")
6968 "import org.antlr.grammar.v2.*;\n
6969 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6970 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6971 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6972 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6973 (for-each (lambda (file)
6974 (format #t "~a\n" file)
6975 (invoke "antlr" file))
6976 '("antlr.g" "antlr.print.g" "assign.types.g"
6977 "buildnfa.g" "codegen.g" "define.g")))
6978 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6979 (for-each (lambda (file)
6980 (format #t "~a\n" file)
6981 (invoke "antlr3" file))
6982 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6985 (add-before 'build 'fix-build-xml
6987 (substitute* "build.xml"
6988 (("target name=\"compile\">")
6989 "target name=\"compile\">
6990 <copy todir=\"${classes.dir}\">
6991 <fileset dir=\"tool/src/main/resources\">
6992 <include name=\"**/*.stg\"/>
6993 <include name=\"**/*.st\"/>
6994 <include name=\"**/*.sti\"/>
6995 <include name=\"**/STLexer.tokens\"/>
7001 ("antlr3" ,antlr3-3.1)))
7003 `(("junit" ,java-junit)))
7005 `(("java-stringtemplate" ,java-stringtemplate-3)
7007 ("antlr3" ,antlr3-3.1)))))
7009 (define-public antlr3-3.1
7015 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7016 "gh-pages/download/antlr-"
7020 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7022 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7024 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7025 #:source-dir "src:runtime/Java/src"
7028 (modify-phases %standard-phases
7029 (add-after 'install 'bin-install
7030 (lambda* (#:key inputs outputs #:allow-other-keys)
7031 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7032 (bin (string-append (assoc-ref outputs "out") "/bin")))
7034 (with-output-to-file (string-append bin "/antlr3")
7037 (string-append "#!" (which "sh") "\n"
7038 "java -cp " jar "/antlr3-3.1.jar:"
7040 (find-files (assoc-ref inputs "stringtemplate")
7044 (find-files (string-append
7045 (assoc-ref inputs "antlr")
7048 " org.antlr.Tool $*"))))
7049 (chmod (string-append bin "/antlr3") #o755))
7051 (add-before 'build 'generate-grammar
7053 (let ((dir "src/org/antlr/tool/"))
7054 (for-each (lambda (file)
7057 (invoke "antlr" "-o" dir (string-append dir file)))
7058 '("antlr.g" "antlr.print.g" "assign.types.g"
7059 "buildnfa.g" "define.g")))
7060 (format #t "codegen.g\n")
7061 (invoke "antlr" "-o" "src/org/antlr/codegen"
7062 "src/org/antlr/codegen/codegen.g")
7064 (add-before 'build 'fix-build-xml
7066 (substitute* "build.xml"
7067 (("target name=\"compile\">")
7068 "target name=\"compile\">
7069 <copy todir=\"${classes.dir}\">
7070 <fileset dir=\"src\">
7071 <include name=\"**/*.stg\"/>
7072 <include name=\"**/*.st\"/>
7073 <include name=\"**/*.sti\"/>
7074 <include name=\"**/STLexer.tokens\"/>
7079 `(("antlr" ,antlr2)))
7081 `(("junit" ,java-junit)))
7083 `(("stringtemplate" ,java-stringtemplate-3)))))
7085 (define-public java-commons-cli-1.2
7086 ;; This is a bootstrap dependency for Maven2.
7088 (inherit java-commons-cli)
7092 (uri (string-append "mirror://apache/commons/cli/source/"
7093 "commons-cli-" version "-src.tar.gz"))
7096 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7098 `(#:jar-name "commons-cli.jar"
7100 (modify-phases %standard-phases
7101 (add-before 'check 'fix-build-xml
7102 (lambda* (#:key inputs #:allow-other-keys)
7103 (substitute* "build.xml"
7104 (("dir=\"\\$\\{test.home\\}/java\"")
7105 "dir=\"${test.home}\""))
7108 `(("java-junit" ,java-junit)))))
7110 (define-public java-microemulator-cldc
7112 (name "java-microemulator-cldc")
7116 (uri (string-append "https://github.com/barteo/microemu/archive/"
7118 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7121 (file-name (string-append name "-" version ".tar.gz"))
7124 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7125 (build-system ant-build-system)
7127 `(#:jar-name "microemulator-cldc.jar"
7128 #:source-dir "microemu-cldc/src/main/java"
7129 #:tests? #f)); Requires even older software
7130 (home-page "https://github.com/barteo/microemu")
7131 (synopsis "J2ME CLDC emulator")
7132 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7133 Emulator. It allows to demonstrate MIDlet based applications in web browser
7134 applet and can be run as a standalone java application.")
7135 (license (list license:asl2.0
7137 license:lgpl2.1+))))
7139 (define-public java-datanucleus-javax-persistence
7141 (name "java-datanucleus-javax-persistence")
7145 (uri (string-append "https://github.com/datanucleus/"
7146 "javax.persistence/archive/javax.persistence-"
7147 version "-release.tar.gz"))
7150 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7151 (build-system ant-build-system)
7153 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7155 #:source-dir "src/main/java"
7156 #:tests? #f)); no tests
7157 (home-page "https://github.com/datanucleus/javax.persistence")
7158 (synopsis "JPA API")
7159 (description "This package contains a clean definition of JPA API intended
7160 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7161 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7162 used to generate this API.")
7163 (license (list license:edl1.0 license:epl1.0))))
7165 (define-public java-osgi-cmpn
7167 (name "java-osgi-cmpn")
7171 (uri (string-append "http://central.maven.org/maven2/"
7172 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7173 version "-sources.jar"))
7176 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7177 (build-system ant-build-system)
7179 `(#:jar-name "osgi-cmpn.jar"
7180 #:tests? #f)); no tests
7182 `(("annotation" ,java-osgi-annotation)
7183 ("core" ,java-osgi-core)
7184 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7185 ("microemulator" ,java-microemulator-cldc)
7186 ("servlet" ,java-classpathx-servletapi)))
7187 (home-page "https://www.osgi.org")
7188 (synopsis "Compendium specification module of OSGi framework")
7190 "OSGi, for Open Services Gateway initiative framework, is a module system
7191 and service platform for the Java programming language. This package contains
7192 the compendium specification module, providing interfaces and classes for use
7193 in compiling bundles.")
7194 (license license:asl2.0)))
7196 (define-public java-osgi-service-component-annotations
7198 (name "java-osgi-service-component-annotations")
7202 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7203 "org.osgi.service.component.annotations/"
7204 version "/org.osgi.service.component.annotations-"
7205 version "-sources.jar"))
7208 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7209 (build-system ant-build-system)
7211 `(#:jar-name "osgi-service-component-annotations.jar"
7212 #:tests? #f)); no tests
7214 `(("annotation" ,java-osgi-annotation)))
7215 (home-page "https://www.osgi.org")
7216 (synopsis "Support annotations for osgi-service-component")
7218 "OSGi, for Open Services Gateway initiative framework, is a module system
7219 and service platform for the Java programming language. This package contains
7220 the support annotations for osgi-service-component.")
7221 (license license:asl2.0)))
7223 (define-public java-osgi-dto
7225 (name "java-osgi-dto")
7229 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7230 "org.osgi.dto/" version "/org.osgi.dto-"
7231 version "-sources.jar"))
7234 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7235 (build-system ant-build-system)
7237 `(#:jar-name "osgi-dto.jar"
7238 #:tests? #f)); no tests
7240 `(("annotation" ,java-osgi-annotation)))
7241 (home-page "https://www.osgi.org")
7242 (synopsis "Data Transfer Objects")
7244 "OSGi, for Open Services Gateway initiative framework, is a module system
7245 and service platform for the Java programming language. This package contains
7246 the Data Transfer Objects. It is easily serializable having only public fields
7247 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7248 Map and array aggregates may also be used. The aggregates must only hold
7249 objects of the listed types or aggregates.")
7250 (license license:asl2.0)))
7252 (define-public java-osgi-resource
7254 (name "java-osgi-resource")
7258 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7259 "org.osgi.resource/"
7260 version "/org.osgi.resource-"
7261 version "-sources.jar"))
7264 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7265 (build-system ant-build-system)
7267 `(#:jar-name "osgi-resource.jar"
7268 #:tests? #f)); no tests
7270 `(("annotation" ,java-osgi-annotation)
7271 ("dto" ,java-osgi-dto)))
7272 (home-page "https://www.osgi.org")
7273 (synopsis "OSGI Resource")
7275 "OSGi, for Open Services Gateway initiative framework, is a module system
7276 and service platform for the Java programming language. This package contains
7277 the definition of common types in osgi packages.")
7278 (license license:asl2.0)))
7280 (define-public java-osgi-namespace-contract
7282 (name "java-osgi-namespace-contract")
7286 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7287 "org.osgi.namespace.contract/"
7288 version "/org.osgi.namespace.contract-"
7289 version "-sources.jar"))
7292 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7293 (build-system ant-build-system)
7295 `(("resource" ,java-osgi-resource)
7296 ("annotation" ,java-osgi-annotation)))
7298 `(#:jar-name "osgi-namespace-contract.jar"
7299 #:tests? #f)); no tests
7300 (home-page "https://www.osgi.org")
7301 (synopsis "Contract Capability and Requirement Namespace")
7303 "OSGi, for Open Services Gateway initiative framework, is a module system
7304 and service platform for the Java programming language. This package contains
7305 the names for the attributes and directives for a namespace with contracts.")
7306 (license license:asl2.0)))
7308 (define-public java-osgi-namespace-extender
7310 (name "java-osgi-namespace-extender")
7314 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7315 "org.osgi.namespace.extender/"
7316 version "/org.osgi.namespace.extender-"
7317 version "-sources.jar"))
7320 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7321 (build-system ant-build-system)
7323 `(("resource" ,java-osgi-resource)
7324 ("annotation" ,java-osgi-annotation)))
7326 `(#:jar-name "osgi-namespace-extendent.jar"
7327 #:tests? #f)); no tests
7328 (home-page "https://www.osgi.org")
7329 (synopsis "Extender Capability and Requirement Namespace")
7331 "OSGi, for Open Services Gateway initiative framework, is a module system
7332 and service platform for the Java programming language. This package contains
7333 the names for the attributes and directives for an extender namespace.")
7334 (license license:asl2.0)))
7336 (define-public java-osgi-namespace-service
7338 (name "java-osgi-namespace-service")
7342 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7343 "org.osgi.namespace.service/"
7344 version "/org.osgi.namespace.service-"
7345 version "-sources.jar"))
7348 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7349 (build-system ant-build-system)
7351 `(("resource" ,java-osgi-resource)
7352 ("annotation" ,java-osgi-annotation)))
7354 `(#:jar-name "osgi-namespace-service.jar"
7355 #:tests? #f)); no tests
7356 (home-page "https://www.osgi.org")
7357 (synopsis "Service Capability and Requirement Namespace")
7359 "OSGi, for Open Services Gateway initiative framework, is a module system
7360 and service platform for the Java programming language. This package contains
7361 the names for the attributes and directives for a service namespace.")
7362 (license license:asl2.0)))
7364 (define-public java-osgi-util-function
7366 (name "java-osgi-util-function")
7370 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7371 "org.osgi.util.function/"
7372 version "/org.osgi.util.function-"
7373 version "-sources.jar"))
7376 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7377 (build-system ant-build-system)
7379 `(#:jar-name "osgi-util-function.jar"
7380 #:tests? #f)); no tests
7382 `(("annotation" ,java-osgi-annotation)))
7383 (home-page "https://www.osgi.org")
7384 (synopsis "OSGI Util Function")
7386 "OSGi, for Open Services Gateway initiative framework, is a module system
7387 and service platform for the Java programming language. This package contains
7388 an interface for a function that accepts a single argument and produces a result.")
7389 (license license:asl2.0)))
7391 (define-public java-osgi-util-promise
7393 (name "java-osgi-util-promise")
7397 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7398 "org.osgi.util.promise/"
7399 version "/org.osgi.util.promise-"
7400 version "-sources.jar"))
7403 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7404 (build-system ant-build-system)
7406 `(#:jar-name "osgi-util-promise.jar"
7407 #:tests? #f)); no tests
7409 `(("annotation" ,java-osgi-annotation)
7410 ("function" ,java-osgi-util-function)))
7411 (home-page "https://www.osgi.org")
7412 (synopsis "Promise of a value")
7414 "OSGi, for Open Services Gateway initiative framework, is a module system
7415 and service platform for the Java programming language. This package contains
7416 an interface and utilitary classes for promises. A Promise represents a future
7417 value. It handles the interactions for asynchronous processing.")
7418 (license license:asl2.0)))
7420 (define-public java-osgi-service-metatype-annotations
7422 (name "java-osgi-service-metatype-annotations")
7426 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7427 "org.osgi.service.metatype.annotations/"
7428 version "/org.osgi.service.metatype.annotations-"
7429 version "-sources.jar"))
7432 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7433 (build-system ant-build-system)
7435 `(#:jar-name "osgi-service-metatype-annotations.jar"
7436 #:tests? #f)); no tests
7438 `(("annotation" ,java-osgi-annotation)))
7439 (home-page "https://www.osgi.org")
7440 (synopsis "Support annotations for metatype")
7442 "OSGi, for Open Services Gateway initiative framework, is a module system
7443 and service platform for the Java programming language. This package contains
7444 the support annotations for metatype.")
7445 (license license:asl2.0)))
7447 (define-public java-osgi-service-repository
7449 (name "java-osgi-service-repository")
7453 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7454 "org.osgi.service.repository/"
7455 version "/org.osgi.service.repository-"
7456 version "-sources.jar"))
7459 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7460 (build-system ant-build-system)
7462 `(#:jar-name "osgi-service-repository.jar"
7463 #:tests? #f)); no tests
7465 `(("annotation" ,java-osgi-annotation)
7466 ("promise" ,java-osgi-util-promise)
7467 ("resource" ,java-osgi-resource)))
7468 (home-page "https://www.osgi.org")
7469 (synopsis "OSGI service repository")
7471 "OSGi, for Open Services Gateway initiative framework, is a module system
7472 and service platform for the Java programming language. This package contains
7473 a repository service that contains resources.")
7474 (license license:asl2.0)))
7476 (define-public java-osgi-framework
7478 (name "java-osgi-framework")
7482 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7483 "org.osgi.framework/" version "/org.osgi.framework-"
7484 version "-sources.jar"))
7487 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7488 (build-system ant-build-system)
7490 `(#:jar-name "osgi-framework.jar"
7491 #:tests? #f)); no tests
7493 `(("annotation" ,java-osgi-annotation)
7494 ("resource" ,java-osgi-resource)
7495 ("dto" ,java-osgi-dto)))
7496 (home-page "https://www.osgi.org")
7497 (synopsis "OSGi framework")
7499 "OSGi, for Open Services Gateway initiative framework, is a module system
7500 and service platform for the Java programming language.")
7501 (license license:asl2.0)))
7503 (define-public java-osgi-service-log
7505 (name "java-osgi-service-log")
7509 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7510 "org.osgi.service.log/"
7511 version "/org.osgi.service.log-"
7512 version "-sources.jar"))
7515 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7516 (build-system ant-build-system)
7518 `(#:jar-name "osgi-service-log.jar"
7519 #:tests? #f)); no tests
7521 `(("java-osgi-framework" ,java-osgi-framework)))
7522 (home-page "https://www.osgi.org")
7523 (synopsis "Provides methods for bundles to write messages to the log")
7525 "OSGi, for Open Services Gateway initiative framework, is a module system
7526 and service platform for the Java programming language. This package contains
7528 (license license:asl2.0)))
7530 (define-public java-osgi-service-jdbc
7532 (name "java-osgi-service-jdbc")
7536 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7537 "org.osgi.service.jdbc/"
7538 version "/org.osgi.service.jdbc-"
7539 version "-sources.jar"))
7542 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7543 (build-system ant-build-system)
7545 `(#:jar-name "osgi-service-jdbc.jar"
7546 #:tests? #f)); no tests
7547 (home-page "https://www.osgi.org")
7548 (synopsis "Factory for JDBC connection factories")
7550 "OSGi, for Open Services Gateway initiative framework, is a module system
7551 and service platform for the Java programming language. This package contains
7552 a factory for JDBC connection factories. There are 3 preferred connection
7553 factories for getting JDBC connections:
7556 @item @code{javax.sql.DataSource};
7557 @item @code{javax.sql.ConnectionPoolDataSource};
7558 @item @code{javax.sql.XADataSource}.
7560 (license license:asl2.0)))
7562 (define-public java-osgi-service-resolver
7564 (name "java-osgi-service-resolver")
7568 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7569 "org.osgi.service.resolver/"
7570 version "/org.osgi.service.resolver-"
7571 version "-sources.jar"))
7574 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7575 (build-system ant-build-system)
7577 `(#:jar-name "osgi-service-resolver.jar"
7578 #:tests? #f)); no tests
7580 `(("annotation" ,java-osgi-annotation)
7581 ("resource" ,java-osgi-resource)))
7582 (home-page "https://www.osgi.org")
7583 (synopsis "OSGI Resolver service")
7585 "OSGi, for Open Services Gateway initiative framework, is a module system
7586 and service platform for the Java programming language. This package contains
7587 a resolver service that resolves the specified resources in the context supplied
7589 (license license:asl2.0)))
7591 (define-public java-osgi-util-tracker
7593 (name "java-osgi-util-tracker")
7597 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7598 "org.osgi.util.tracker/"
7599 version "/org.osgi.util.tracker-"
7600 version "-sources.jar"))
7603 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7604 (build-system ant-build-system)
7606 `(#:jar-name "osgi-util-tracker.jar"
7607 #:tests? #f)); no tests
7609 `(("framework" ,java-osgi-framework)
7610 ("annotation" ,java-osgi-annotation)))
7611 (home-page "https://www.osgi.org")
7612 (synopsis "Bundle tracking")
7614 "OSGi, for Open Services Gateway initiative framework, is a module system
7615 and service platform for the Java programming language. This package contains
7616 bundle tracking utility classes.")
7617 (license license:asl2.0)))
7619 (define-public java-osgi-service-cm
7621 (name "java-osgi-service-cm")
7625 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7626 "org.osgi.service.cm/"
7627 version "/org.osgi.service.cm-"
7628 version "-sources.jar"))
7631 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7632 (build-system ant-build-system)
7634 `(#:jar-name "osgi-service-cm.jar"
7635 #:tests? #f)); no tests
7637 `(("framework" ,java-osgi-framework)
7638 ("annotation" ,java-osgi-annotation)))
7639 (home-page "https://www.osgi.org")
7640 (synopsis "OSGI Configuration Management")
7642 "OSGi, for Open Services Gateway initiative framework, is a module system
7643 and service platform for the Java programming language. This package contains
7644 utility classes for the configuration of services.")
7645 (license license:asl2.0)))
7647 (define-public java-osgi-service-packageadmin
7649 (name "java-osgi-service-packageadmin")
7653 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7654 "org.osgi.service.packageadmin/"
7655 version "/org.osgi.service.packageadmin-"
7656 version "-sources.jar"))
7659 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7660 (build-system ant-build-system)
7662 `(#:jar-name "osgi-service-packageadmin.jar"
7663 #:tests? #f)); no tests
7665 `(("framework" ,java-osgi-framework)))
7666 (home-page "https://www.osgi.org")
7667 (synopsis "OSGI Package Administration")
7669 "OSGi, for Open Services Gateway initiative framework, is a module system
7670 and service platform for the Java programming language. This package contains
7671 the packageadmin service.")
7672 (license license:asl2.0)))
7674 (define-public java-ops4j-base-lang
7676 (name "java-ops4j-base-lang")
7680 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7681 "archive/base-" version ".tar.gz"))
7684 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7685 (build-system ant-build-system)
7687 `(#:jar-name "java-ops4j-base-lang.jar"
7688 #:source-dir "ops4j-base-lang/src/main/java"
7689 #:tests? #f; no tests
7691 (modify-phases %standard-phases
7692 (add-before 'build 'add-test-file
7694 ;; That file is required by a test in ops4j-pax-exam-core-spi
7695 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7696 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7700 "version=" ,version "\n"
7701 "groupId=org.ops4j.base"
7702 "artifactId=ops4j-base-lang\n"))))
7704 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7705 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7706 (description "OPS4J stands for Open Participation Software for Java. This
7707 package contains utilities and extensions related to @code{java.lang}.")
7708 (license license:asl2.0)))
7710 (define-public java-ops4j-base-monitors
7712 (inherit java-ops4j-base-lang)
7713 (name "java-ops4j-base-monitors")
7715 `(#:jar-name "java-ops4j-base-monitors.jar"
7716 #:source-dir "ops4j-base-monitors/src/main/java"
7717 #:tests? #f)); no tests
7719 `(("lang" ,java-ops4j-base-lang)))
7720 (description "OPS4J stands for Open Participation Software for Java. This
7721 package contains utilities and extensions related to monitoring.")))
7723 (define-public java-ops4j-base-io
7725 (inherit java-ops4j-base-lang)
7726 (name "java-ops4j-base-io")
7728 `(#:jar-name "java-ops4j-base-io.jar"
7729 #:source-dir "ops4j-base-io/src/main/java"
7730 #:test-dir "ops4j-base-io/src/test"
7732 (list "**/ListerTest.java")))
7734 `(("lang" ,java-ops4j-base-monitors)
7735 ("lang" ,java-ops4j-base-lang)))
7737 `(("junit" ,java-junit)
7738 ("hamcrest" ,java-hamcrest-core)))
7739 (description "OPS4J stands for Open Participation Software for Java. This
7740 package contains utilities and extensions related to handling streams and files.")))
7742 (define-public java-ops4j-base-util
7744 (inherit java-ops4j-base-lang)
7745 (name "java-ops4j-base-util")
7747 `(#:jar-name "java-ops4j-base-util.jar"
7748 #:source-dir "ops4j-base-util/src/main/java"
7749 #:test-dir "ops4j-base-util/src/test"))
7751 `(("lang" ,java-ops4j-base-lang)))
7753 `(("junit" ,java-junit)))
7754 (description "OPS4J stands for Open Participation Software for Java. This
7755 package contains utilities and extensions related to environment, i18n and
7758 (define-public java-ops4j-base-util-property
7760 (inherit java-ops4j-base-lang)
7761 (name "java-ops4j-base-util-property")
7763 `(#:jar-name "java-ops4j-base-util-property.jar"
7764 #:source-dir "ops4j-base-util-property/src/main/java"
7765 #:tests? #f)); no tests
7767 `(("lang" ,java-ops4j-base-lang)
7768 ("util" ,java-ops4j-base-util)))
7769 (description "OPS4J stands for Open Participation Software for Java. This
7770 package contains utilities and extensions related to resolving properties from
7771 different sources.")))
7773 (define-public java-ops4j-base-store
7775 (inherit java-ops4j-base-lang)
7776 (name "java-ops4j-base-store")
7778 `(#:jar-name "java-ops4j-base-store.jar"
7779 #:source-dir "ops4j-base-store/src/main/java"
7780 #:tests? #f)); no tests
7782 `(("lang" ,java-ops4j-base-lang)
7783 ("slf4j" ,java-slf4j-api)
7784 ("io" ,java-ops4j-base-io)))
7785 (description "OPS4J stands for Open Participation Software for Java. This
7786 package contains utilities for storing and retrieving data from an
7787 @code{InputStream}.")))
7789 (define-public java-ops4j-base-spi
7791 (inherit java-ops4j-base-lang)
7792 (name "java-ops4j-base-spi")
7794 `(#:jar-name "java-ops4j-base-spi.jar"
7795 #:source-dir "ops4j-base-spi/src/main/java"
7796 #:test-dir "ops4j-base-spi/src/test"))
7798 `(("junit" ,java-junit)
7799 ("hamcrest" ,java-hamcrest-core)))
7800 (description "OPS4J stands for Open Participation Software for Java. This
7801 package contains utilities for obtaining services via the Java SE 6
7802 @code{ServiceLoader}.")))
7804 (define-public java-aqute-bnd-annotation
7806 (name "java-aqute-bnd-annotation")
7810 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7811 version ".REL.tar.gz"))
7812 (file-name (string-append name "-" version ".tar.gz"))
7815 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7816 (build-system ant-build-system)
7818 `(#:jar-name "java-aqute-bnd-annotation.jar"
7819 #:source-dir "biz.aQute.bnd.annotation/src"
7820 #:tests? #f)); empty test dir
7821 (home-page "http://bnd.bndtools.org/")
7822 (synopsis "Tools for OSGi")
7823 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7824 headers based on analyzing the class code, it verifies the project settings,
7825 it manages project dependencies, gives diffs jars, and much more.")
7826 (license license:asl2.0)))
7828 (define-public java-aqute-libg
7830 (inherit java-aqute-bnd-annotation)
7831 (name "java-aqute-libg")
7833 `(#:jar-name "java-aqute-libg.jar"
7834 ;; The build fails when source/target more recent than 1.7. This
7835 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7837 ;; It is closed as won't fix. There is no way to change the source
7838 ;; so that it works on 1.8, and still works on 1.6, the upstream
7839 ;; target. It work fine on 1.7, so we use 1.7.
7840 #:make-flags (list "-Dant.build.javac.source=1.7"
7841 "-Dant.build.javac.target=1.7")
7843 (modify-phases %standard-phases
7844 (add-before 'configure 'chdir
7845 ;; Change to aQute.libg directory, so that the relative
7846 ;; paths in the tests aren't broken.
7848 (chdir "aQute.libg")
7850 (add-before 'check 'create-test-directory
7851 ;; Copy the test directory to test/java, since that's where
7852 ;; ant-build-system's default project in build.xml expects to find
7853 ;; the test classes. Leave a copy in the original place to not
7854 ;; break paths in tests.
7857 (copy-recursively "test" "src/test/java")
7860 `(("slf4j" ,java-slf4j-api)
7861 ("osgi-annot" ,java-osgi-annotation)
7862 ("java-osgi-cmpn" ,java-osgi-cmpn)
7863 ("osgi" ,java-osgi-core)))
7865 `(("hamcrest" ,java-hamcrest-core)
7866 ("java-junit" ,java-junit)))))
7868 (define java-aqute-libg-bootstrap
7870 (inherit java-aqute-libg)
7871 (name "java-aqute-libg-bootstrap")
7873 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7874 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7875 ((#:tests? _ #f) #f)))
7877 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7878 ,@(delete `("slf4j" ,java-slf4j-api)
7879 (package-inputs java-aqute-libg))))
7880 (native-inputs '())))
7882 (define-public java-aqute-bndlib
7884 (inherit java-aqute-bnd-annotation)
7885 (name "java-aqute-bndlib")
7887 `(#:jar-name "java-bndlib.jar"
7888 #:source-dir "biz.aQute.bndlib/src"
7889 #:tests? #f)); no tests
7891 `(("slf4j" ,java-slf4j-api)
7892 ("osgi-annot" ,java-osgi-annotation)
7893 ("java-aqute-libg" ,java-aqute-libg)
7894 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7895 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7896 ("java-osgi-service-repository" ,java-osgi-service-repository)
7897 ("java-osgi-service-log" ,java-osgi-service-log)
7898 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7899 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7900 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7901 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7902 ("promise" ,java-osgi-util-promise)
7903 ("osgi" ,java-osgi-core)))))
7905 (define java-aqute-bndlib-bootstrap
7907 (inherit java-aqute-bndlib)
7908 (name "java-aqute-bndlib-bootstrap")
7910 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7911 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7912 ,@(delete `("slf4j" ,java-slf4j-api)
7913 (delete `("java-aqute-libg" ,java-aqute-libg)
7914 (package-inputs java-aqute-bndlib)))))))
7916 (define-public java-ops4j-pax-tinybundles
7918 (name "java-ops4j-pax-tinybundles")
7922 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7923 "archive/tinybundles-" version ".tar.gz"))
7926 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7928 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7929 #:source-dir "src/main/java"
7931 ;; Abstract base classes for other tests
7932 (list "**/BndTest.java" "**/CoreTest.java")
7934 (modify-phases %standard-phases
7935 (add-before 'check 'fix-version
7937 ;; This test has a reference to an old version of bndlib we are not
7938 ;; packaging. It uses the version referenced in pom.xml. We replace
7939 ;; it with our own version.
7940 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7941 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7942 ,(package-version java-aqute-bndlib)))
7945 `(("lang" ,java-ops4j-base-lang)
7946 ("io" ,java-ops4j-base-io)
7947 ("store" ,java-ops4j-base-store)
7948 ("slf4j" ,java-slf4j-api)
7949 ("libg" ,java-aqute-libg)
7950 ("bndlib" ,java-aqute-bndlib)))
7952 `(("junit" ,java-junit)
7953 ("hamcrest" ,java-hamcrest-core)
7954 ("log4j" ,java-log4j-api)
7955 ("bndannotation" ,java-aqute-bnd-annotation)
7956 ("framework" ,java-osgi-framework)))
7957 (build-system ant-build-system)
7958 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7959 (synopsis "Java APIs to create OSGi related artifacts")
7960 (description "Tinybundles is all about creating OSGi related artifacts like
7961 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
7962 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7963 other hand, this library can be a foundation of real end user tools that need
7964 to create those artifacts.")
7965 (license license:asl2.0)))
7967 (define-public java-ops4j-pax-exam-core
7969 (name "java-ops4j-pax-exam-core")
7973 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7974 "archive/exam-reactor-" version ".tar.gz"))
7977 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7979 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7980 #:source-dir "core/pax-exam/src/main/java"
7981 #:test-dir "core/pax-exam/src/test"))
7983 `(("slf4j" ,java-slf4j-api)
7984 ("lang" ,java-ops4j-base-lang)
7985 ("io" ,java-ops4j-base-io)
7986 ("util-property" ,java-ops4j-base-util-property)
7987 ("util-store" ,java-ops4j-base-store)
7988 ("java-osgi-core" ,java-osgi-core)))
7990 `(("junit" ,java-junit)
7991 ("hamcrest" ,java-hamcrest-core)))
7992 (build-system ant-build-system)
7993 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7994 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7995 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7996 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7997 the system under test at the same time.")
7998 (license license:asl2.0)))
8000 (define-public java-ops4j-pax-exam-core-spi
8002 (inherit java-ops4j-pax-exam-core)
8003 (name "java-ops4j-pax-exam-core-spi")
8005 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8006 #:source-dir "src/main/java"
8009 ;; Abstract base class, not a test
8010 "**/BaseStagedReactorTest.java"
8011 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8012 "**/WarBuilderTest.java")
8014 (modify-phases %standard-phases
8015 (add-before 'configure 'chdir
8017 ;; Tests assume we are in this directory
8018 (chdir "core/pax-exam-spi")
8020 (add-before 'check 'fix-tests
8022 ;; One test checks that this file is present.
8023 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8024 (with-output-to-file
8025 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8028 (string-append "artifactId = pax-exam-spi\n"
8029 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8030 ;; Maven puts compilation results in the target directory, while we
8031 ;; put them in the build directory.
8032 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8033 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8034 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8035 (("target") "build"))
8036 ;; One test is expected to fail, but it doesn't throw the expected exception
8037 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8038 (("AssertionError") "IllegalArgumentException"))
8041 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8042 ("lang" ,java-ops4j-base-lang)
8043 ("monitors" ,java-ops4j-base-monitors)
8044 ("store" ,java-ops4j-base-store)
8045 ("io" ,java-ops4j-base-io)
8046 ("spi" ,java-ops4j-base-spi)
8047 ("osgi" ,java-osgi-core)
8048 ("slf4j" ,java-slf4j-api)
8049 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8051 `(("mockito" ,java-mockito-1)
8052 ("junit" ,java-junit)
8053 ("hamcrest" ,java-hamcrest-core)
8054 ("cglib" ,java-cglib)
8055 ("objenesis" ,java-objenesis)
8056 ("asm" ,java-asm)))))
8058 (define-public java-ops4j-pax-exam-core-junit
8060 (inherit java-ops4j-pax-exam-core)
8061 (name "java-ops4j-pax-exam-core-junit")
8063 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8064 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8065 #:tests? #f)); no tests
8067 `(("junit" ,java-junit)
8068 ("slf4j" ,java-slf4j-api)
8069 ("core" ,java-ops4j-pax-exam-core)
8070 ("spi" ,java-ops4j-pax-exam-core-spi)))
8071 (native-inputs '())))
8073 (define-public java-fasterxml-jackson-annotations
8075 (name "java-fasterxml-jackson-annotations")
8079 (uri (string-append "https://github.com/FasterXML/"
8080 "jackson-annotations/archive/"
8081 "jackson-annotations-" version ".tar.gz"))
8084 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8085 (build-system ant-build-system)
8087 `(#:jar-name "jackson-annotations.jar"
8088 #:source-dir "src/main/java"
8089 #:test-dir "src/test"))
8091 `(("junit" ,java-junit)))
8092 (home-page "https://github.com/FasterXML/jackson-annotations")
8093 (synopsis "General purpose annotations for the Jackson Data Processor")
8094 (description "This package contains general purpose annotations for the
8095 Jackson Data Processor, used on value and handler types. The only annotations
8096 not included are ones that require dependency to the Databind package.")
8097 (license license:asl2.0)))
8099 (define-public java-fasterxml-jackson-core
8101 (name "java-fasterxml-jackson-core")
8105 (uri (string-append "https://github.com/FasterXML/"
8106 "jackson-core/archive/"
8107 "jackson-core-" version ".tar.gz"))
8110 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8111 (build-system ant-build-system)
8113 `(#:jar-name "jackson-core.jar"
8114 #:source-dir "src/main/java"
8115 #:test-dir "src/test"
8118 ;; Expected failure. pom.xml excludes these
8120 ;; Base classes that have no constructor for junit
8122 "**/ConcurrencyReadTest.java"
8123 "**/ManualCharAccessTest.java"
8124 "**/ManualCharAccessTest.java"
8125 "**/TrailingCommasTest.java"
8126 "**/AsyncMissingValuesInObjectTest.java"
8127 "**/AsyncMissingValuesInArrayTest.java")
8129 (modify-phases %standard-phases
8130 (add-before 'configure 'generate-PackageVersion.java
8132 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8133 (in (string-append out ".in")))
8136 (("@package@") "com.fasterxml.jackson.core.json")
8137 (("@projectversion@") ,version)
8138 (("@projectgroupid@") "com.fasterxml.jackson.core")
8139 (("@projectartifactid@") "jackson-core")))
8141 (add-before 'build 'copy-resources
8143 (copy-recursively "src/main/resources"
8146 (add-before 'check 'copy-test-resources
8148 (copy-recursively "src/test/resources"
8149 "build/test-classes")
8152 `(("junit" ,java-junit)
8153 ("hamcrest" ,java-hamcrest-core)))
8154 (home-page "https://github.com/FasterXML/jackson-core")
8157 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8159 (define-public java-fasterxml-jackson-databind
8161 (name "java-fasterxml-jackson-databind")
8165 (uri (string-append "https://github.com/FasterXML/"
8166 "jackson-databind/archive/"
8167 "jackson-databind-" version ".tar.gz"))
8170 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8171 (build-system ant-build-system)
8173 `(#:jar-name "jackson-databind.jar"
8174 #:source-dir "src/main/java"
8175 #:tests? #f; requires javax.measures for which I can't find a free implementation
8177 (modify-phases %standard-phases
8178 (add-before 'configure 'generate-PackageVersion.java
8180 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8181 (in (string-append out ".in")))
8184 (("@package@") "com.fasterxml.jackson.databind.cfg")
8185 (("@projectversion@") ,version)
8186 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8187 (("@projectartifactid@") "jackson-databind")))
8189 (add-before 'build 'copy-resources
8191 (copy-recursively "src/main/resources" "build/classes")
8194 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8195 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8196 (home-page "https://github.com/FasterXML/jackson-databind")
8197 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8198 (description "This package contains the general-purpose data-binding
8199 functionality and tree-model for Jackson Data Processor. It builds on core
8200 streaming parser/generator package, and uses Jackson Annotations for
8202 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8204 (define-public java-fasterxml-jackson-modules-base-jaxb
8206 (name "java-fasterxml-jackson-modules-base-jaxb")
8210 (uri (string-append "https://github.com/FasterXML/"
8211 "jackson-modules-base/archive/"
8212 "jackson-modules-base-" version ".tar.gz"))
8215 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8216 (build-system ant-build-system)
8218 `(#:jar-name "jackson-modules-base-jaxb.jar"
8219 #:source-dir "jaxb/src/main/java"
8220 #:test-dir "jaxb/src/test"
8222 ;; Base class for tests
8223 (list "**/BaseJaxbTest.java")
8225 (modify-phases %standard-phases
8226 (add-before 'configure 'generate-PackageVersion.java
8228 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8229 "jackson/module/jaxb/PackageVersion.java"))
8230 (in (string-append out ".in")))
8233 (("@package@") "com.fasterxml.jackson.module.jaxb")
8234 (("@projectversion@") ,version)
8235 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8236 (("@projectartifactid@") "jackson-module-jaxb")))
8238 (add-before 'build 'copy-resources
8240 (copy-recursively "jaxb/src/main/resources" "build/classes")
8243 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8244 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8245 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8247 `(("java-junit" ,java-junit)))
8248 (home-page "https://github.com/FasterXML/jackson-modules-base")
8249 (synopsis "Jaxb annotations jackson module")
8250 (description "This package is the jaxb annotations module for jackson.")
8251 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8253 (define-public java-fasterxml-jackson-modules-base-mrbean
8255 (name "java-fasterxml-jackson-modules-base-mrbean")
8259 (uri (string-append "https://github.com/FasterXML/"
8260 "jackson-modules-base/archive/"
8261 "jackson-modules-base-" version ".tar.gz"))
8264 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8265 (build-system ant-build-system)
8267 `(#:jar-name "jackson-modules-base-mrbean.jar"
8268 #:source-dir "mrbean/src/main/java"
8269 #:test-dir "mrbean/src/test"
8271 ;; Base class for tests
8272 (list "**/BaseTest.java")
8274 (modify-phases %standard-phases
8275 (add-before 'configure 'generate-PackageVersion.java
8277 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8278 "jackson/module/mrbean/PackageVersion.java"))
8279 (in (string-append out ".in")))
8282 (("@package@") "com.fasterxml.jackson.module.mrbean")
8283 (("@projectversion@") ,version)
8284 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8285 (("@projectartifactid@") "jackson-module-mrbean")))
8288 `(("java-asm" ,java-asm)
8289 ("java-fasterxml-jackson-annotations"
8290 ,java-fasterxml-jackson-annotations)
8291 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8292 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8294 `(("java-junit" ,java-junit)))
8295 (home-page "https://github.com/FasterXML/jackson-modules-base")
8296 (synopsis "POJO type materialization for Java")
8297 (description "This package implements POJO type materialization.
8298 Databinders can construct implementation classes for Java interfaces as part
8299 of deserialization.")
8300 (license license:asl2.0)))
8302 (define-public java-snakeyaml
8304 (name "java-snakeyaml")
8308 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8310 (file-name (string-append name "-" version ".tar.gz"))
8313 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8314 (build-system ant-build-system)
8316 `(#:jar-name "java-snakeyaml.jar"
8317 #:source-dir "src/main/java"
8318 ;; Tests require velocity, a cyclic dependency, and
8319 ;; java-spring-framework-context which is not packaged.
8321 (home-page "https://bitbucket.org/asomov/snakeyaml")
8322 (synopsis "YAML processor")
8323 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8324 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8326 (define-public java-fasterxml-jackson-dataformat-yaml
8328 (name "java-fasterxml-jackson-dataformat-yaml")
8332 (uri (string-append "https://github.com/FasterXML/"
8333 "jackson-dataformats-text/archive/"
8334 "jackson-dataformats-text-" version ".tar.gz"))
8337 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8338 (build-system ant-build-system)
8340 `(#:jar-name "jackson-dataformat-yaml.jar"
8341 #:source-dir "yaml/src/main/java"
8342 #:test-dir "yaml/src/test"
8343 #:test-exclude (list "**/failing/**.java")
8345 (modify-phases %standard-phases
8346 (add-before 'configure 'generate-PackageVersion.java
8348 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8349 (in (string-append out ".in")))
8352 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8353 (("@projectversion@") ,version)
8354 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8355 (("@projectartifactid@") "jackson-dataformat-yaml")))
8358 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8359 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8360 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8361 ("java-snakeyaml" ,java-snakeyaml)))
8363 `(("junit" ,java-junit)
8364 ("hamcrest" ,java-hamcrest-core)
8365 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8366 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8367 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8368 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8369 (synopsis "Yaml backend for Jackson")
8370 (description "Dataformat backends are used to support format alternatives
8371 to JSON, supported by default. This is done by sub-classing Jackson core
8373 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8375 (define-public java-stax2-api
8377 (name "java-stax2-api")
8381 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8382 "stax2-api-" version ".tar.gz"))
8385 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8386 (build-system ant-build-system)
8388 `(#:jar-name "java-stax2-api.jar"
8389 #:source-dir "src/main/java"
8390 #:tests? #f)); no tests
8391 (home-page "https://github.com/FasterXML/stax2-api")
8392 (synopsis "Stax2 API")
8393 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8394 significant new functionalities, such as full-featured bi-direction validation
8395 interface and high-performance Typed Access API.")
8396 (license license:bsd-2)))
8398 (define-public java-woodstox-core
8400 (name "java-woodstox-core")
8404 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8405 "woodstox-core-" version ".tar.gz"))
8408 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8409 (build-system ant-build-system)
8411 `(#:jar-name "woodstox.jar"
8413 (list "**/Base*.java" "failing/**")
8415 (modify-phases %standard-phases
8416 (add-before 'build 'remove-msv-dep
8418 ;; we don't need osgi, and it depends on msv
8419 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8420 ;; msv's latest release is from 2011 and we don't need it
8421 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8422 (delete-file-recursively "src/test/java/wstxtest/osgi")
8423 (delete-file-recursively "src/test/java/wstxtest/msv")
8425 (add-before 'build 'copy-resources
8427 (copy-recursively "src/main/resources" "build/classes")
8430 `(("stax2" ,java-stax2-api)))
8432 `(("junit" ,java-junit)))
8433 (home-page "https://github.com/FasterXML/woodstox")
8434 (synopsis "Stax XML API implementation")
8435 (description "Woodstox is a stax XML API implementation.")
8436 (license license:asl2.0)))
8438 (define-public java-fasterxml-jackson-dataformat-xml
8440 (name "java-fasterxml-jackson-dataformat-xml")
8444 (uri (string-append "https://github.com/FasterXML/"
8445 "jackson-dataformat-xml/archive/"
8446 "jackson-dataformat-xml-" version ".tar.gz"))
8449 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8450 (build-system ant-build-system)
8452 `(#:jar-name "jackson-dataformat-xml.jar"
8453 #:source-dir "src/main/java"
8455 (list "**/failing/**")
8457 (modify-phases %standard-phases
8458 (add-before 'configure 'generate-PackageVersion.java
8460 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8461 (in (string-append out ".in")))
8465 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8466 (("@projectversion@") ,version)
8467 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8468 (("@projectartifactid@") "jackson-dataformat-xml")))
8470 (add-before 'build 'copy-resources
8472 (copy-recursively "src/main/resources" "build/classes")
8475 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8476 ("jackson-core" ,java-fasterxml-jackson-core)
8477 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8478 ("jackson-databind" ,java-fasterxml-jackson-databind)
8479 ("stax2-api" ,java-stax2-api)
8480 ("woodstox" ,java-woodstox-core)))
8482 `(("junit" ,java-junit)
8483 ("hamcrest" ,java-hamcrest-core)))
8484 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8485 (synopsis "Read and write XML")
8486 (description "This package contains Jackson extension component for reading
8487 and writing XML encoded data.
8489 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8490 approach (that is, no support is added for \"Schema-first\" approach). Support
8491 for JAXB annotations is provided by JAXB annotation module; this module
8492 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8493 @code{JsonFactory}) as well as small number of higher level overrides needed to
8494 make data-binding work.")
8495 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8497 (define-public java-hdrhistogram
8499 (name "java-hdrhistogram")
8503 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8504 "archive/HdrHistogram-" version ".tar.gz"))
8507 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8508 (build-system ant-build-system)
8510 `(#:jar-name "java-hdrhistogram.jar"
8511 #:source-dir "src/main/java"
8513 (modify-phases %standard-phases
8514 (add-before 'configure 'set-version
8516 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8517 (template (string-append version-java ".template")))
8518 (copy-file template version-java)
8519 (substitute* version-java
8520 (("\\$VERSION\\$") ,version)
8521 (("\\$BUILD_TIME\\$") "0"))
8524 `(("junit" ,java-junit)
8525 ("hamcrest" ,java-hamcrest-core)))
8526 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8527 (synopsis "High dynamic range histogram")
8528 (description "Hdrhistogram allows to create histograms that support
8529 recording and analyzing sampled data value counts across a configurable integer
8530 value range with configurable value precision within the range. Value precision
8531 is expressed as the number of significant digits in the value recording, and
8532 provides control over value quantization behavior across the value range and
8533 the subsequent value resolution at any given level.")
8534 (license license:public-domain)))
8536 (define-public java-cofoja
8538 (name "java-cofoja")
8543 (url "https://github.com/nhatminhle/cofoja.git")
8544 (commit (string-append "v" version))))
8545 (file-name (string-append "java-cofoja-" version "-checkout"))
8548 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8549 (build-system ant-build-system)
8551 `(#:build-target "dist"
8552 #:test-target "test"
8555 (list "-Ddist.dir=dist")
8556 #:modules ((guix build ant-build-system)
8557 (guix build java-utils)
8562 (modify-phases %standard-phases
8563 ;; The bulid system ignores the class path the ant-build-system sets
8564 ;; up and instead expects to find all dependencies in the "lib"
8566 (add-after 'unpack 'create-libdir
8567 (lambda* (#:key inputs #:allow-other-keys)
8571 (let ((target (string-append "lib/" (basename file))))
8572 (unless (file-exists? target)
8573 (symlink file target))))
8574 (append-map (match-lambda
8576 (find-files dir "\\.jar$")))
8579 (replace 'install (install-jars "dist")))))
8581 `(("java-asm" ,java-asm)))
8583 `(("java-junit" ,java-junit)))
8584 (home-page "https://github.com/nhatminhle/cofoja")
8585 (synopsis "Contracts for Java")
8586 (description "Contracts for Java, or Cofoja for short, is a contract
8587 programming framework and test tool for Java, which uses annotation processing
8588 and bytecode instrumentation to provide run-time checking. (In particular,
8589 this is not a static analysis tool.)")
8590 (license license:lgpl3+)))
8592 (define-public java-aopalliance
8594 (name "java-aopalliance")
8598 ;; Note: this git repository is not official, but contains the
8599 ;; source code that is in the CVS repository. Downloading the
8600 ;; tarball from sourceforge is undeterministic, and the cvs download
8603 (url "https://github.com/hoverruan/aopalliance")
8604 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8605 (file-name (string-append name "-" version))
8608 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8609 (build-system ant-build-system)
8611 `(#:jar-name "java-aopalliance.jar"
8613 #:tests? #f; no tests
8614 #:source-dir "aopalliance/src/main"))
8615 (home-page "http://aopalliance.sourceforge.net")
8616 (synopsis "Aspect-Oriented Programming")
8617 (description "The AOP Alliance project is a joint project between several
8618 software engineering people who are interested in Aspect-Oriented Programming
8620 (license license:public-domain)))
8622 (define-public java-javax-inject
8624 (name "java-javax-inject")
8628 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8629 "archive/javax.inject-" version ".tar.gz"))
8632 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8633 (build-system ant-build-system)
8635 `(#:jar-name "java-javax-inject.jar"
8637 #:tests? #f)); no tests
8638 (home-page "http://github.com/javax-inject/javax-inject")
8639 (synopsis "JSR-330: Dependency Injection for Java")
8640 (description "This package specifies a means for obtaining objects in such
8641 a way as to maximize reusability, testability and maintainability compared to
8642 traditional approaches such as constructors, factories, and service locators
8643 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8644 most nontrivial applications.
8646 Many types depend on other types. For example, a @var{Stopwatch} might depend
8647 on a @var{TimeSource}. The types on which a type depends are known as its
8648 dependencies. The process of finding an instance of a dependency to use at run
8649 time is known as resolving the dependency. If no such instance can be found,
8650 the dependency is said to be unsatisfied, and the application is broken.")
8651 (license license:asl2.0)))
8653 (define-public java-guice
8659 (uri (string-append "https://github.com/google/guice/archive/"
8661 (file-name (string-append name "-" version ".tar.gz"))
8662 (modules '((guix build utils)))
8665 (for-each delete-file (find-files "." ".*.jar"))))
8668 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8669 (build-system ant-build-system)
8671 `(#:jar-name "java-guice.jar"
8673 #:tests? #f; FIXME: tests are not in a java sub directory
8674 #:source-dir "core/src"))
8676 `(("guava" ,java-guava)
8677 ("java-cglib" ,java-cglib)
8678 ("java-aopalliance" ,java-aopalliance)
8679 ("java-javax-inject" ,java-javax-inject)
8680 ("java-asm" ,java-asm)))
8681 (home-page "https://github.com/google/guice")
8682 (synopsis "Lightweight dependency injection framework")
8683 (description "Guice is a lightweight dependency injection framework fo
8685 (license license:asl2.0)))
8687 (define-public java-guice-servlet
8689 (inherit java-guice)
8690 (name "java-guice-servlet")
8692 `(#:jar-name "guice-servlet.jar"
8693 #:source-dir "extensions/servlet/src/"
8695 #:tests? #f)); FIXME: not in a java subdir
8697 `(("guice" ,java-guice)
8698 ("servlet" ,java-classpathx-servletapi)
8699 ,@(package-inputs java-guice)))))
8701 (define-public java-assertj
8703 (name "java-assertj")
8707 (uri (string-append "https://github.com/joel-costigliola/"
8708 "assertj-core/archive/"
8709 "assertj-core-" version ".tar.gz"))
8712 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8713 (build-system ant-build-system)
8715 `(#:jar-name "java-assertj.jar"
8717 #:source-dir "src/main/java"
8718 #:tests? #f)); depends on tng-junit which depends on assertj
8720 `(("cglib" ,java-cglib)
8721 ("junit" ,java-junit)
8722 ("hamcrest" ,java-hamcrest-core)))
8724 `(("mockito" ,java-mockito-1)))
8725 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8726 (synopsis "Fluent assertions for java")
8727 (description "AssertJ core is a Java library that provides a fluent
8728 interface for writing assertions. Its main goal is to improve test code
8729 readability and make maintenance of tests easier.")
8730 (license license:asl2.0)))
8732 (define-public java-jboss-javassist
8734 (name "java-jboss-javassist")
8738 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8740 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8744 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8745 (build-system ant-build-system)
8747 `(#:jar-name "java-jboss-javassist.jar"
8749 #:source-dir "src/main"
8750 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8752 (modify-phases %standard-phases
8753 (add-before 'configure 'remove-binary
8755 (delete-file "javassist.jar")
8758 `(("junit" ,java-junit)))
8759 (home-page "https://github.com/jboss-javassist/javassist")
8760 (synopsis "Java bytecode engineering toolkit")
8761 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8762 manipulation simple. It is a class library for editing bytecodes in Java; it
8763 enables Java programs to define a new class at runtime and to modify a class
8764 file when the JVM loads it.")
8765 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8767 (define-public java-jcommander
8769 (name "java-jcommander")
8773 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8775 (file-name (string-append name "-" version ".tar.gz"))
8778 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8779 (build-system ant-build-system)
8781 `(#:jar-name "java-jcommander.jar"
8783 #:tests? #f; requires testng which depends on jcommander
8784 #:source-dir "src/main/java"))
8785 (home-page "http://jcommander.org")
8786 (synopsis "Command line parameters parser")
8787 (description "JCommander is a very small Java framework that makes it
8788 trivial to parse command line parameters. Parameters are declared with
8790 (license license:asl2.0)))
8792 (define-public java-bsh
8798 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8800 (file-name (string-append name "-" version ".tar.gz"))
8803 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8804 (build-system ant-build-system)
8806 `(#:build-target "jarall"
8807 #:test-target "junit-tests-all"
8809 (modify-phases %standard-phases
8811 (lambda* (#:key outputs #:allow-other-keys)
8812 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8814 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8816 (home-page "http://beanshell.org/")
8817 (synopsis "Lightweight Scripting for Java")
8818 (description "BeanShell is a small, free, embeddable Java source
8819 interpreter with object scripting language features, written in Java.
8820 BeanShell dynamically executes standard Java syntax and extends it with common
8821 scripting conveniences such as loose types, commands, and method closures like
8822 those in Perl and JavaScript.")
8823 (license license:asl2.0)))
8825 (define-public java-fest-util
8827 (name "java-fest-util")
8831 (uri (string-append "https://github.com/alexruiz/fest-util/"
8832 "archive/fest-util-" version ".tar.gz"))
8835 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8836 (build-system ant-build-system)
8838 `(#:jar-name "java-fest-util.jar"
8839 #:source-dir "src/main/java"))
8841 `(("junit" ,java-junit)
8842 ("hamcrest" ,java-hamcrest-core)))
8843 (home-page "https://github.com/alexruiz/fest-util")
8844 (synopsis "FEST common utilities")
8845 (description "Common utilities used in all FEST module.")
8846 (license license:asl2.0)))
8848 (define-public java-fest-test
8850 (name "java-fest-test")
8854 (uri (string-append "https://github.com/alexruiz/fest-test/"
8855 "archive/fest-test-" version ".tar.gz"))
8858 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8859 (build-system ant-build-system)
8861 `(#:jar-name "java-fest-test.jar"
8862 #:source-dir "src/main/java"
8863 #:tests? #f)); no tests
8865 `(("junit" ,java-junit)))
8866 (home-page "https://github.com/alexruiz/fest-test")
8867 (synopsis "Common FEST testing infrastructure")
8868 (description "Fest-test contains the common FEST testing infrastructure.")
8869 (license license:asl2.0)))
8871 (define-public java-fest-assert
8873 (name "java-fest-assert")
8877 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8878 "archive/fest-assert-core-" version ".tar.gz"))
8881 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8882 (build-system ant-build-system)
8884 `(#:jar-name "java-fest-assert.jar"
8885 #:source-dir "src/main/java"
8890 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8891 "**/MessageFormatter_format_Test.java"
8892 "**/internal/*/*_assert*_Test.java")))
8894 `(("java-fest-util" ,java-fest-util)))
8896 `(("java-junit" ,java-junit)
8897 ("java-fest-test" ,java-fest-test)
8898 ("java-hamcrest-core" ,java-hamcrest-core)
8899 ("java-mockito" ,java-mockito-1)
8900 ("java-cglib" ,java-cglib)
8901 ("java-objenesis" ,java-objenesis)
8902 ("java-asm" ,java-asm)))
8903 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8904 (synopsis "FEST fluent assertions")
8905 (description "FEST-Assert provides a fluent interface for assertions.")
8906 (license license:asl2.0)))
8908 (define-public java-testng
8910 (name "java-testng")
8915 (url "https://github.com/cbeust/testng.git")
8917 (file-name (string-append name "-" version "-checkout"))
8920 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8921 (build-system ant-build-system)
8923 `(#:jdk ,icedtea-8; java.util.function
8924 #:jar-name "java-testng.jar"
8925 #:source-dir "src/main/java"
8927 (modify-phases %standard-phases
8928 ;; FIXME: I don't know why these tests fail
8929 (add-after 'unpack 'delete-failing-tests
8931 (substitute* "src/test/resources/testng.xml"
8932 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8933 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8935 ;; We don't have groovy
8936 (add-after 'unpack 'delete-groovy-tests
8938 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8939 (substitute* "src/test/resources/testng.xml"
8940 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8942 (add-before 'build 'copy-resources
8944 (copy-recursively "src/main/resources" "build/classes")
8946 (add-before 'check 'copy-test-resources
8948 (copy-recursively "src/test/resources" "build/test-classes")
8952 (invoke "ant" "compile-tests")
8953 ;; we don't have groovy
8954 (substitute* "src/test/resources/testng.xml"
8955 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8956 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8958 ":build/test-classes")
8959 "-Dtest.resources.dir=src/test/resources"
8960 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8962 `(("junit" ,java-junit)
8963 ("java-jsr305" ,java-jsr305)
8964 ("java-bsh" ,java-bsh)
8965 ("java-jcommander" ,java-jcommander)
8966 ("java-guice" ,java-guice)
8967 ("snakeyaml" ,java-snakeyaml)))
8969 `(("guava" ,java-guava)
8970 ("java-javax-inject" ,java-javax-inject)
8971 ("java-hamcrest" ,java-hamcrest-all)
8972 ("java-assertj" ,java-assertj)
8973 ("java-mockito" ,java-mockito-1)
8974 ("cglib" ,java-cglib)
8976 ("aopalliance" ,java-aopalliance)))
8977 (home-page "http://testng.org")
8978 (synopsis "Testing framework")
8979 (description "TestNG is a testing framework inspired from JUnit and NUnit
8980 but introducing some new functionalities that make it more powerful and easier
8982 (license license:asl2.0)))
8984 (define-public java-jnacl
8985 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8989 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8993 (url "https://github.com/neilalexander/jnacl.git")
8995 (file-name (git-file-name name version))
8998 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8999 (build-system ant-build-system)
9001 `(#:jar-name "jnacl.jar"
9002 #:source-dir "src/main/java"
9005 (modify-phases %standard-phases
9006 (add-before 'build 'fix-tests
9008 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9009 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9010 (("assertions.Assertions") "assertions.api.Assertions"))
9014 (invoke "ant" "compile-tests")
9015 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9017 ":build/test-classes")
9018 "org.testng.TestNG" "-testclass"
9019 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9020 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9022 ":build/test-classes")
9023 "org.testng.TestNG" "-testclass"
9024 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9026 `(("java-testng" ,java-testng)
9027 ("java-fest-util" ,java-fest-util)
9028 ("java-fest-assert" ,java-fest-assert)))
9029 (home-page "https://github.com/neilalexander/jnacl")
9030 (synopsis "Java implementation of NaCl")
9031 (description "Pure Java implementation of the NaCl: Networking and
9032 Cryptography library.")
9033 (license license:bsd-2))))
9035 (define-public java-mvel2
9041 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9042 version ".Final.tar.gz"))
9045 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9046 (build-system ant-build-system)
9048 `(#:jar-name "mvel2.jar"
9049 #:source-dir "src/main/java"
9051 (list "**/Abstract*.java"
9052 ;; Base class with no tests
9053 "**/MVELThreadTest.java")
9055 (modify-phases %standard-phases
9056 (add-after 'install 'install-bin
9057 (lambda* (#:key outputs #:allow-other-keys)
9058 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9060 (with-output-to-file (string-append bin "/mvel2")
9064 "#!" (which "bash") "\n"
9065 "if [ \"$#\" -ne \"2\" ]; then\n"
9066 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9069 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9070 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9071 " org.mvel2.sh.Main $1"))))
9072 (chmod (string-append bin "/mvel2") #o755))
9075 `(("junit" ,java-junit)
9076 ("hamcrest" ,java-hamcrest-core)))
9077 (home-page "https://github.com/mvel/mvel")
9078 (synopsis "MVFLEX Expression Language")
9079 (description "MVEL has largely been inspired by Java syntax, but has some
9080 fundamental differences aimed at making it more efficient as an expression
9081 language, such as operators that directly support collection, array and string
9082 matching, as well as regular expressions. MVEL is used to evaluate expressions
9083 written using Java syntax.
9085 In addition to the expression language, MVEL serves as a templating language for
9086 configuration and string construction.")
9087 (license license:asl2.0)))
9089 (define-public java-commons-jexl-2
9091 (name "java-commons-jexl")
9095 (uri (string-append "mirror://apache/commons/jexl/source/"
9096 "commons-jexl-" version "-src.tar.gz"))
9099 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9100 (build-system ant-build-system)
9102 `(#:jar-name "commons-jexl-2.jar"
9104 #:source-dir "src/main/java"
9106 (modify-phases %standard-phases
9107 (add-before 'check 'disable-broken-tests
9108 (lambda* (#:key inputs #:allow-other-keys)
9109 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9110 (substitute* "ArithmeticTest.java"
9111 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9112 (("asserter.assertExpression\\(\"imanull") "//"))
9113 ;; This test fails with "ambiguous method invocation"
9114 (delete-file "CacheTest.java")
9115 ;; This test doesn't have access to the temp directory
9116 (substitute* "ClassCreatorTest.java"
9117 (("java.io.tmpdir") "user.dir"))
9118 ;; This test fails in trying to detect whether it can run.
9119 (substitute* "ClassCreator.java"
9120 (("boolean canRun =.*") "boolean canRun = false;\n"))
9121 ;; ...and these tests depend on it.
9122 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9123 (delete-file "scripting/JexlScriptEngineTest.java"))
9125 (add-before 'build 'run-javacc
9127 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9128 (invoke "java" "jjtree" "Parser.jjt")
9129 (invoke "java" "javacc" "Parser.jj"))
9132 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9134 `(("java-junit" ,java-junit)
9135 ("java-hamcrest-core" ,java-hamcrest-core)
9136 ("javacc" ,javacc-4)))
9137 (home-page "https://commons.apache.org/proper/commons-jexl/")
9138 (synopsis "Java Expression Language ")
9139 (description "JEXL is a library intended to facilitate the implementation
9140 of dynamic and scripting features in applications and frameworks written in
9141 Java. JEXL implements an Expression Language based on some extensions to the
9142 JSTL Expression Language supporting most of the constructs seen in
9143 shell-script or ECMAScript. Its goal is to expose scripting features usable
9144 by technical operatives or consultants working with enterprise platforms.")
9145 (license license:asl2.0)))
9147 (define-public java-lz4
9153 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9155 (file-name (string-append name "-" version ".tar.gz"))
9158 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9159 (build-system ant-build-system)
9161 `(#:jar-name "lz4.jar"
9163 #:source-dir "src/java:src/java-unsafe"
9164 #:tests? #f; FIXME: requires more dependencies
9166 (modify-phases %standard-phases
9167 (add-before 'configure 'generate-source
9169 (with-directory-excursion "src/build/source_templates"
9170 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9173 `(("mvel" ,java-mvel2)))
9174 (home-page "https://jpountz.github.io/lz4-java")
9175 (synopsis "Compression algorithm")
9176 (description "LZ4 - Java is a Java port of the popular lz4 compression
9177 algorithms and xxHash hashing algorithm.")
9178 (license license:asl2.0)))
9180 (define-public java-bouncycastle
9182 (name "java-bouncycastle")
9186 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9187 (substring version 0 1) "v"
9188 (substring version 2 4) ".tar.gz"))
9191 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9192 (modules '((guix build utils)))
9195 (for-each delete-file
9196 (find-files "." "\\.jar$"))
9198 (build-system ant-build-system)
9203 (modify-phases %standard-phases
9206 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9207 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9208 ;; FIXME: the tests freeze.
9211 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9213 (install-jars "build/artifacts/jdk1.5/jars")))))
9215 `(("java-javax-mail" ,java-javax-mail)))
9218 ("junit" ,java-junit)
9219 ("java-native-access" ,java-native-access)
9220 ("java-native-access-platform" ,java-native-access-platform)))
9221 (home-page "https://www.bouncycastle.org")
9222 (synopsis "Cryptographic library")
9223 (description "Bouncy Castle is a cryptographic library for the Java
9224 programming language.")
9225 (license license:expat)))
9227 (define-public java-lmax-disruptor
9229 (name "java-lmax-disruptor")
9233 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9234 "archive/" version ".tar.gz"))
9235 (file-name (string-append name "-" version ".tar.gz"))
9238 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9239 (build-system ant-build-system)
9241 `(#:jar-name "java-lmax-disruptor.jar"
9243 #:tests? #f)); tests hang
9245 `(("junit" ,java-junit)
9246 ("java-hdrhistogram" ,java-hdrhistogram)
9247 ("java-jmock" ,java-jmock)
9248 ("java-jmock-legacy" ,java-jmock-legacy)
9249 ("java-jmock-junit4" ,java-jmock-junit4)
9250 ("java-hamcrest-all" ,java-hamcrest-all)))
9252 `(("cglib" ,java-cglib)
9253 ("objenesis" ,java-objenesis)
9255 (home-page "https://www.lmax.com/disruptor")
9256 (synopsis "High performance inter-thread communication")
9257 (description "LMAX Disruptor is a software pattern and software component
9258 for high performance inter-thread communication that avoids the need for
9259 message queues or resource locking.")
9260 (license license:asl2.0)))
9262 (define-public java-commons-bcel
9264 (name "java-commons-bcel")
9268 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9269 version "-src.tar.gz"))
9272 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9273 (build-system ant-build-system)
9275 `(#:jar-name "bcel.jar"
9277 #:source-dir "src/main/java"
9278 #:test-dir "src/test/java"
9279 ;; FIXME: Tests require the unpackaged jna.
9281 (home-page "https://commons.apache.org/proper/commons-bcel/")
9282 (synopsis "Byte code engineering library")
9283 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9284 intended to give users a convenient way to analyze, create, and
9285 manipulate (binary) Java class files. Classes are represented by objects
9286 which contain all the symbolic information of the given class: methods, fields
9287 and byte code instructions, in particular.
9289 Such objects can be read from an existing file, be transformed by a
9290 program (e.g. a class loader at run-time) and written to a file again. An
9291 even more interesting application is the creation of classes from scratch at
9292 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9293 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9294 of Java @code{.class} files.")
9295 (license license:asl2.0)))
9297 (define-public java-xerial-core
9299 (name "java-xerial-core")
9303 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9305 (file-name (string-append name "-" version ".tar.gz"))
9308 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9309 (build-system ant-build-system)
9311 `(#:jar-name "xerial-core.jar"
9312 #:source-dir "xerial-core/src/main/java"
9313 #:test-dir "xerial-core/src/test"
9315 (modify-phases %standard-phases
9316 (add-before 'build 'copy-resources
9318 (copy-recursively "xerial-core/src/main/resources"
9322 `(("junit" ,java-junit)
9323 ("hamcrest" ,java-hamcrest-core)))
9324 (home-page "https://github.com/xerial/xerial-java")
9325 (synopsis "Data management libraries for Java")
9326 (description "Xerial is a set of data management libraries for the Java
9327 programming language. The ultimate goal of the Xerial project is to manage
9328 everything as database, including class objects, text format data, data
9330 (license license:asl2.0)))
9332 (define-public java-powermock-reflect
9334 (name "java-powermock-reflect")
9338 (uri (string-append "https://github.com/powermock/powermock/"
9339 "archive/powermock-" version ".tar.gz"))
9340 (file-name (string-append name "-" version ".tar.gz"))
9343 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9345 (search-patches "java-powermock-fix-java-files.patch"))))
9346 (build-system ant-build-system)
9348 `(#:jar-name "java-powermock-reflect.jar"
9350 #:source-dir "powermock-reflect/src/main/java"
9351 #:test-dir "powermock-reflect/src/test"))
9353 `(("java-objenesis" ,java-objenesis)))
9355 `(("junit" ,java-junit)
9356 ("cglib" ,java-cglib)
9358 ("hamcrest" ,java-hamcrest-core)
9359 ("assertj" ,java-assertj)))
9360 (home-page "https://github.com/powermock/powermock")
9361 (synopsis "Mock library extension framework")
9362 (description "PowerMock is a framework that extends other mock libraries
9363 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9364 classloader and bytecode manipulation to enable mocking of static methods,
9365 constructors, final classes and methods, private methods, removal of static
9366 initializers and more. By using a custom classloader no changes need to be
9367 done to the IDE or continuous integration servers which simplifies adoption.")
9368 (license license:asl2.0)))
9370 (define-public java-powermock-core
9372 (inherit java-powermock-reflect)
9373 (name "java-powermock-core")
9375 `(#:jar-name "java-powermock-core.jar"
9376 #:source-dir "powermock-core/src/main/java"
9377 #:test-dir "powermock-core/src/test"
9378 #:tests? #f; requires powermock-api
9381 (modify-phases %standard-phases
9382 (add-before 'build 'copy-resources
9384 (copy-recursively "powermock-core/src/main/resources"
9388 `(("reflect" ,java-powermock-reflect)
9389 ("javassist" ,java-jboss-javassist)))
9391 `(("junit" ,java-junit)
9392 ("assertj" ,java-assertj)
9393 ("mockito" ,java-mockito-1)))))
9395 (define-public java-powermock-api-support
9397 (inherit java-powermock-reflect)
9398 (name "java-powermock-api-support")
9399 (build-system ant-build-system)
9401 `(#:jar-name "java-powermock-api-support.jar"
9403 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9404 #:tests? #f)); no tests
9406 `(("core" ,java-powermock-core)
9407 ("reflect" ,java-powermock-reflect)))))
9409 (define-public java-powermock-modules-junit4-common
9411 (inherit java-powermock-reflect)
9412 (name "java-powermock-modules-junit4-common")
9413 (build-system ant-build-system)
9415 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9417 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9418 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9420 `(("core" ,java-powermock-core)
9421 ("easymock" ,java-easymock)
9422 ("reflect" ,java-powermock-reflect)
9423 ("hamcrest" ,java-hamcrest-core)
9424 ("cglib" ,java-cglib)))))
9426 (define-public java-powermock-modules-junit4
9428 (inherit java-powermock-reflect)
9429 (name "java-powermock-modules-junit4")
9430 (build-system ant-build-system)
9432 `(#:jar-name "java-powermock-modules-junit4.jar"
9434 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9435 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9437 (modify-phases %standard-phases
9438 (add-before 'build 'fix-junit-detection
9440 ;; Our junit version is 4.12-SNAPSHOT
9441 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9442 "PowerMockJUnit4MethodValidator.java")
9443 (("4.12") "4.12-SNAPSHOT"))
9446 `(("core" ,java-powermock-core)
9447 ("reflect" ,java-powermock-reflect)
9448 ("common" ,java-powermock-modules-junit4-common)
9449 ("cglib" ,java-cglib)))
9451 `(("easymock" ,java-easymock)
9452 ("hamcrest" ,java-hamcrest-core)
9453 ("objenesis" ,java-objenesis)
9455 ("junit" ,java-junit)))))
9457 (define-public java-powermock-api-easymock
9459 (inherit java-powermock-reflect)
9460 (name "java-powermock-api-easymock")
9461 (build-system ant-build-system)
9463 `(#:jar-name "java-powermock-api-easymock.jar"
9465 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9466 #:tests? #f; no tests
9468 (modify-phases %standard-phases
9469 (add-before 'build 'fix-file
9471 ;; FIXME: This looks wrong, but it fixes a build error.
9472 (with-directory-excursion "powermock-api/powermock-api-easymock"
9473 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9474 (("classLoader instanceof MockClassLoader") "false")
9475 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9478 `(("core" ,java-powermock-core)
9479 ("easymock" ,java-easymock)
9480 ("reflect" ,java-powermock-reflect)
9481 ("support" ,java-powermock-api-support)
9482 ("cglib" ,java-cglib)))))
9484 (define-public java-jboss-jms-api-spec
9486 (name "java-jboss-jms-api-spec")
9490 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9491 "archive/jboss-jms-api_" version
9492 "_spec-1.0.1.Final.tar.gz"))
9495 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9496 (build-system ant-build-system)
9498 `(#:jar-name "java-jboss-jms-api_spec.jar"
9501 #:tests? #f)); no tests
9502 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9503 (synopsis "Java Message Service API specification")
9504 (description "Java Message Service (JMS) API is used to send messages
9505 messages between two or more clients. It is a messaging standard that allows
9506 application components to create, send, receive, and read messages.")
9507 ; either gpl2 only with GPL Classpath Exception, or cddl.
9508 (license (list license:gpl2 license:cddl1.0))))
9510 (define-public java-mail
9516 (uri (string-append "https://github.com/javaee/javamail/archive/"
9517 "JAVAMAIL-1_6_0.tar.gz"))
9520 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9521 (build-system ant-build-system)
9523 `(#:jar-name "java-mail.jar"
9525 #:source-dir "mail/src/main/java"
9526 #:test-dir "mail/src/test"
9528 (list "**/CollectorFormatterTest.java"
9529 "**/CompactFormatterTest.java"
9530 "**/DurationFilterTest.java"
9531 "**/MailHandlerTest.java"
9532 "**/GetLocalAddressTest.java"
9533 ;; FIXME: both end with:
9534 ;; java.lang.ClassNotFoundException:
9535 ;; javax.mail.internet.MimeMultipartParseTest
9536 "**/MimeMultipartParseTest.java"
9537 "**/SearchTermSerializationTest.java")
9539 (modify-phases %standard-phases
9540 (add-before 'configure 'move-version.java
9542 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9543 "mail/src/main/java/javax/mail/Version.java")
9545 (add-before 'build 'copy-resources
9547 (copy-recursively "mail/src/main/resources/META-INF"
9548 "build/classes/META-INF")
9551 `(("junit" ,java-junit)
9552 ("hamcrest" ,java-hamcrest-core)))
9553 (home-page "https://javaee.github.io/javamail/")
9554 (synopsis "Mail-related functionnalities in Java")
9555 (description "The JavaMail API provides a platform-independent and
9556 protocol-independent framework to build mail and messaging applications.")
9557 ;; General Public License Version 2 only ("GPL") or the Common Development
9558 ;; and Distribution License("CDDL")
9559 (license (list license:cddl1.1
9560 license:gpl2)))); with classpath exception
9562 (define-public java-jeromq
9564 (name "java-jeromq")
9569 (url "https://github.com/zeromq/jeromq.git")
9570 (commit (string-append "v" version))))
9571 (file-name (string-append name "-" version "-checkout"))
9574 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9575 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9576 (build-system ant-build-system)
9578 `(#:jar-name "java-jeromq.jar"
9579 #:source-dir "src/main/java"
9585 "**/ZBeaconTest.java"
9587 "**/DealerSpecTest.java"
9588 "**/CustomDecoderTest.java"
9589 "**/CustomEncoderTest.java"
9590 "**/ConnectRidTest.java"
9591 "**/ReqSpecTest.java"
9592 "**/PushPullSpecTest.java"
9593 "**/PubSubHwmTest.java"
9594 "**/RouterSpecTest.java"
9595 "**/ProxyTest.java")))
9597 `(("java-jnacl" ,java-jnacl)))
9599 `(("java-hamcrest-core" ,java-hamcrest-core)
9600 ("junit" ,java-junit)))
9601 (home-page "http://zeromq.org/bindings:java")
9602 (synopsis "Java binding for 0MQ")
9603 (description "Jeromq provides the java bindings for 0MQ.")
9604 (license license:mpl2.0)))
9606 (define-public java-kafka-clients
9608 (name "java-kafka-clients")
9612 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9613 version "-src.tgz"))
9616 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9617 (build-system ant-build-system)
9619 `(#:jar-name "java-kafka-clients.jar"
9621 #:source-dir "clients/src/main/java"
9622 #:test-dir "clients/src/test"
9625 ;; This file does not contain a class
9626 "**/IntegrationTest.java"
9628 "**/ClientUtilsTest.java"
9629 ;; End with errors that seem related to our powermock
9630 "**/KafkaProducerTest.java"
9631 "**/BufferPoolTest.java")))
9633 `(("java-slf4j-api" ,java-slf4j-api)
9634 ("java-lz4" ,java-lz4)))
9636 `(("junit" ,java-junit)
9637 ("hamcrest" ,java-hamcrest-all)
9638 ("objenesis" ,java-objenesis)
9640 ("cglib" ,java-cglib)
9641 ("javassist" ,java-jboss-javassist)
9642 ("snappy" ,java-snappy)
9643 ("easymock" ,java-easymock)
9644 ("powermock" ,java-powermock-core)
9645 ("powermock-easymock" ,java-powermock-api-easymock)
9646 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9647 ("powermock-junit4" ,java-powermock-modules-junit4)
9648 ("powermock-support" ,java-powermock-api-support)
9649 ("java-bouncycastle" ,java-bouncycastle)))
9650 (home-page "https://kafka.apache.org")
9651 (synopsis "Distributed streaming platform")
9652 (description "Kafka is a distributed streaming platform, which means:
9654 @item it can publish and subscribe to streams of records;
9655 @item it can store streams of records in a fault-tolerant way;
9656 @item it can process streams of records as they occur.
9658 ;; Either cddl or gpl2 only.
9659 (license (list license:cddl1.1; actually cddl1.1
9660 license:gpl2)))); with classpath exception
9662 (define-public java-jdom
9668 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9672 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9673 (build-system ant-build-system)
9675 `(#:build-target "package"
9676 #:tests? #f; tests are run as part of the build process
9678 (modify-phases %standard-phases
9680 (install-jars "build")))))
9681 (home-page "http://jdom.org/")
9682 (synopsis "Access, manipulate, and output XML data")
9683 (description "Java-based solution for accessing, manipulating, and
9684 outputting XML data from Java code.")
9685 (license license:bsd-4)))
9687 (define-public java-geronimo-xbean-reflect
9689 (name "java-geronimo-xbean-reflect")
9694 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9695 (revision 1807396)))
9696 (file-name (string-append name "-" version))
9699 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9700 (build-system ant-build-system)
9702 `(#:jar-name "geronimo-xbean-reflect.jar"
9703 #:source-dir "xbean-reflect/src/main/java"
9704 #:test-dir "xbean-reflect/src/test"
9707 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9708 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9709 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9711 (modify-phases %standard-phases
9712 (add-before 'build 'fix-source
9714 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9715 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9716 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9717 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9721 ("log4j" ,java-log4j-api)
9722 ("log4j-1.2" ,java-log4j-1.2-api)
9723 ("log4j-core" ,java-log4j-core)
9724 ("logging" ,java-commons-logging-minimal)))
9726 `(("junit" ,java-junit)))
9727 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9728 (synopsis "Dependency injection helper")
9729 (description "Xbean-reflect provides very flexible ways to create objects
9730 and graphs of objects for dependency injection frameworks")
9731 (license license:asl2.0)))
9733 (define-public java-geronimo-xbean-bundleutils
9735 (inherit java-geronimo-xbean-reflect)
9736 (name "java-geronimo-xbean-bundleutils")
9738 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9739 #:source-dir "xbean-bundleutils/src/main/java"
9740 #:test-dir "xbean-bundleutils/src/test"
9742 (modify-phases %standard-phases
9743 (add-before 'build 'fix-java
9745 ;; We use a more recent version of osgi, so this file requires
9746 ;; more interface method implementations.
9747 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9748 (("import org.osgi.framework.ServiceRegistration;")
9749 "import org.osgi.framework.ServiceRegistration;
9750 import org.osgi.framework.ServiceFactory;
9751 import java.util.Collection;
9752 import org.osgi.framework.ServiceObjects;")
9753 (("public Bundle getBundle\\(\\)")
9755 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9756 throw new UnsupportedOperationException();
9759 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9760 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9761 throw new UnsupportedOperationException();
9763 public Bundle getBundle()"))
9766 `(("java-slf4j" ,java-slf4j-api)
9767 ("java-asm" ,java-asm)
9768 ("java-osgi-framework" ,java-osgi-framework)
9769 ("java-eclipse-osgi" ,java-eclipse-osgi)
9770 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9772 (define-public java-geronimo-xbean-asm-util
9774 (inherit java-geronimo-xbean-reflect)
9775 (name "java-geronimo-xbean-asm-util")
9777 `(#:jar-name "geronimo-xbean-asm-util.jar"
9778 #:source-dir "xbean-asm-util/src/main/java"
9779 #:tests? #f)); no tests
9781 `(("java-asm" ,java-asm)))
9782 (native-inputs '())))
9784 (define-public java-geronimo-xbean-finder
9786 (inherit java-geronimo-xbean-reflect)
9787 (name "java-geronimo-xbean-finder")
9789 `(#:jar-name "geronimo-xbean-finder.jar"
9790 #:source-dir "xbean-finder/src/main/java"
9791 #:test-dir "xbean-finder/src/test"))
9793 `(("java-slf4j-api" ,java-slf4j-api)
9794 ("java-asm" ,java-asm)
9795 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9796 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9797 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9798 ("java-osgi-framework" ,java-osgi-framework)))
9800 `(("java-junit" ,java-junit)
9801 ("java-hamcrest-core" ,java-hamcrest-core)))))
9803 (define-public java-gson
9809 (uri (string-append "https://github.com/google/gson/archive/"
9810 "gson-parent-" version ".tar.gz"))
9813 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9814 (build-system ant-build-system)
9816 `(#:jar-name "gson.jar"
9817 #:source-dir "gson/src/main/java"
9818 #:test-dir "gson/src/test"))
9820 `(("java-junit" ,java-junit)
9821 ("java-hamcrest-core" ,java-hamcrest-core)))
9822 (home-page "https://github.com/google/gson")
9823 (synopsis "Java serialization/deserialization library from/to JSON")
9824 (description "Gson is a Java library that can be used to convert Java
9825 Objects into their JSON representation. It can also be used to convert a JSON
9826 string to an equivalent Java object. Gson can work with arbitrary Java objects
9827 including pre-existing objects that you do not have source-code of.")
9828 (license license:asl2.0)))
9830 (define-public java-hawtjni
9832 (name "java-hawtjni")
9836 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9837 "hawtjni-project-" version ".tar.gz"))
9840 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9841 (build-system ant-build-system)
9843 `(#:jar-name "hawtjni.jar"
9844 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9845 #:tests? #f; no tests
9847 (modify-phases %standard-phases
9848 (add-before 'build 'build-native
9849 (lambda* (#:key inputs #:allow-other-keys)
9850 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9851 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9852 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9853 "-fPIC" "-O2" include)
9854 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9855 "-fPIC" "-O2" include)
9856 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9857 "hawtjni.o" "hawtjni-callback.o")))
9859 (add-after 'install 'install-native
9860 (lambda* (#:key outputs #:allow-other-keys)
9861 (let* ((out (assoc-ref outputs "out"))
9862 (lib (string-append out "/lib"))
9863 (inc (string-append out "/include")))
9864 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9865 (install-file "libhawtjni.so" lib)
9866 (install-file "hawtjni.h" inc)))
9869 `(("java-commons-cli" ,java-commons-cli)
9870 ("java-asm" ,java-asm)
9871 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9872 (home-page "https://fusesource.github.io/hawtjni/")
9873 (synopsis "JNI code generator")
9874 (description "HawtJNI is a code generator that produces the JNI code needed
9875 to implement Java native methods. It is based on the jnigen code generator
9876 that is part of the SWT Tools project.")
9877 (license license:asl2.0)))
9879 (define-public java-jansi-native
9881 (name "java-jansi-native")
9885 (uri (string-append "https://github.com/fusesource/jansi-native/"
9886 "archive/jansi-native-" version ".tar.gz"))
9889 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9890 (build-system ant-build-system)
9892 `(#:jar-name "jansi-native.jar"
9893 #:source-dir "src/main/java"
9894 #:tests? #f; no tests
9896 (modify-phases %standard-phases
9897 (add-before 'build 'build-native
9898 (lambda* (#:key inputs #:allow-other-keys)
9899 ;; there are more required files for windows in windows/
9900 (with-directory-excursion "src/main/native-package/src"
9901 (substitute* "jansi_ttyname.c"
9902 (("#include \"jansi_.*") ""))
9903 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9904 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9906 (string-append "-I" (assoc-ref inputs "jdk")
9909 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9910 (add-before 'build 'install-native
9912 (let ((dir (string-append "build/classes/META-INF/native/"
9913 ,(match (%current-system)
9914 ((or "i686-linux" "armhf-linux")
9916 ((or "x86_64-linux" "aarch64-linux"
9919 (install-file "src/main/native-package/src/libjansi.so" dir))
9921 (add-after 'install 'install-native
9922 (lambda* (#:key outputs #:allow-other-keys)
9923 (install-file "src/main/native-package/src/jansi.h"
9924 (string-append (assoc-ref outputs "out") "/include"))
9927 `(("java-hawtjni" ,java-hawtjni)))
9928 (home-page "https://fusesource.github.io/jansi/")
9929 (synopsis "Native library for jansi")
9930 (description "This package provides the native library for jansi, a small
9931 Java library that allows you to use ANSI escape sequences to format your
9933 (license license:asl2.0)))
9935 (define-public java-jansi
9941 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9942 "jansi-project-" version ".tar.gz"))
9945 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9946 (build-system ant-build-system)
9948 `(#:jar-name "jansi.jar"
9949 #:source-dir "jansi/src/main/java"
9950 #:test-dir "jansi/src/test"
9952 (modify-phases %standard-phases
9953 (add-after 'check 'clear-term
9955 (invoke "echo" "-e" "\\e[0m"))))))
9957 `(("java-jansi-native" ,java-jansi-native)))
9959 `(("java-junit" ,java-junit)
9960 ("java-hamcrest-core" ,java-hamcrest-core)))
9961 (home-page "https://fusesource.github.io/jansi/")
9962 (synopsis "Portable ANSI escape sequences")
9963 (description "Jansi is a Java library that allows you to use ANSI escape
9964 sequences to format your console output which works on every platform.")
9965 (license license:asl2.0)))
9967 (define-public java-jboss-el-api-spec
9969 (name "java-jboss-el-api-spec")
9973 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9974 "archive/jboss-el-api_" version
9975 "_spec-1.0.7.Final.tar.gz"))
9978 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9979 (build-system ant-build-system)
9981 `(#:jar-name "java-jboss-el-api_spec.jar"
9984 `(("java-junit" ,java-junit)))
9985 (home-page "https://github.com/jboss/jboss-el-api_spec")
9986 (synopsis "JSR-341 expression language 3.0 API")
9987 (description "This package contains an implementation of the JSR-341
9988 specification for the expression language 3.0. It implements an expression
9989 language inspired by ECMAScript and XPath. This language is used with
9990 JavaServer Pages (JSP).")
9991 ;; Either GPL2 only or CDDL.
9992 (license (list license:gpl2 license:cddl1.1))))
9994 (define-public java-jboss-interceptors-api-spec
9996 (name "java-jboss-interceptors-api-spec")
10000 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10001 "archive/jboss-interceptors-api_" version
10002 "_spec-1.0.0.Final.tar.gz"))
10005 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10006 (build-system ant-build-system)
10008 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10011 #:tests? #f)); no tests
10012 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10013 (synopsis "Interceptors 1.2 API classes from JSR 318")
10014 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10015 API. Interceptors are used to interpose on business method invocations and
10017 ;; Either GPL2 only or CDDL.
10018 (license (list license:gpl2 license:cddl1.1))))
10020 (define-public java-cdi-api
10022 (name "java-cdi-api")
10026 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10027 version ".tar.gz"))
10028 (file-name (string-append name "-" version ".tar.gz"))
10031 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10032 (build-system ant-build-system)
10034 `(#:source-dir "api/src/main/java"
10035 #:jar-name "java-cdi-api.jar"
10036 #:test-dir "api/src/test"
10038 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10040 `(("java-javax-inject" ,java-javax-inject)
10041 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10042 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10044 `(("java-testng" ,java-testng)
10045 ("java-hamcrest-core" ,java-hamcrest-core)))
10046 (home-page "http://cdi-spec.org/")
10047 (synopsis "Contexts and Dependency Injection APIs")
10048 (description "Java-cdi-api contains the required APIs for Contexts and
10049 Dependency Injection (CDI).")
10050 (license license:asl2.0)))
10052 (define-public java-joda-convert
10054 (name "java-joda-convert")
10058 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10059 version ".tar.gz"))
10060 (file-name (string-append name "-" version ".tar.gz"))
10063 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10064 (build-system ant-build-system)
10066 `(#:jar-name (string-append ,name "-" ,version ".jar")
10067 #:source-dir "src/main/java"
10068 #:test-include (list "**/Test*.java")
10069 ;; Contains only interfaces and base classes (no test)
10070 #:test-exclude (list "**/test*/**.java")))
10072 `(("java-guava" ,java-guava)))
10074 `(("java-junit" ,java-junit)
10075 ("java-hamcrest-core" ,java-hamcrest-core)))
10076 (home-page "http://www.joda.org/joda-convert/")
10077 (synopsis "Conversion between Objects and Strings")
10078 (description "Joda-Convert provides a small set of classes to aid
10079 conversion between Objects and Strings. It is not intended to tackle the
10080 wider problem of Object to Object transformation.")
10081 (license license:asl2.0)))
10083 (define-public java-joda-time
10085 (name "java-joda-time")
10089 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10090 version ".tar.gz"))
10091 (file-name (string-append name "-" version ".tar.gz"))
10094 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10095 (build-system ant-build-system)
10097 `(#:jar-name "java-joda-time.jar"
10098 #:source-dir "src/main/java"
10099 #:test-include (list "**/Test*.java")
10100 ;; There is no runnable test in these files
10101 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10103 (modify-phases %standard-phases
10104 (add-after 'build 'build-resources
10106 (mkdir-p "build/classes/org/joda/time/tz/data")
10107 (mkdir-p "build/classes/org/joda/time/format")
10108 ;; This will produce the following exception:
10109 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10110 ;; which is normal, because it doesn't exist yet. It still generates
10111 ;; the same file as in the binary one can find on maven.
10112 (invoke "java" "-cp"
10113 (string-append "build/classes:" (getenv "CLASSPATH"))
10114 "org.joda.time.tz.ZoneInfoCompiler"
10115 "-src" "src/main/java/org/joda/time/tz/src"
10116 "-dst" "build/classes/org/joda/time/tz/data"
10117 "africa" "antarctica" "asia" "australasia"
10118 "europe" "northamerica" "southamerica"
10119 "pacificnew" "etcetera" "backward" "systemv")
10120 (for-each (lambda (f)
10121 (copy-file f (string-append
10122 "build/classes/org/joda/time/format/"
10124 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10126 (add-before 'install 'regenerate-jar
10128 ;; We need to regenerate the jar file to add generated data.
10129 (delete-file "build/jar/java-joda-time.jar")
10130 (invoke "ant" "jar")))
10131 (add-before 'check 'copy-test-resources
10133 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10134 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10135 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10136 (copy-recursively "src/test/resources" "build/test-classes")
10139 `(("java-joda-convert" ,java-joda-convert)))
10141 `(("java-junit" ,java-junit)
10142 ("java-hamcrest-core" ,java-hamcrest-core)
10143 ("tzdata" ,tzdata)))
10144 (home-page "http://www.joda.org/joda-time/")
10145 (synopsis "Replacement for the Java date and time classes")
10146 (description "Joda-Time is a replacement for the Java date and time
10147 classes prior to Java SE 8.")
10148 (license license:asl2.0)))
10150 (define-public java-xerces
10152 (name "java-xerces")
10157 (uri (string-append "mirror://apache/xerces/j/source/"
10158 "Xerces-J-src." version ".tar.gz"))
10160 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10161 (patches (search-patches
10162 "java-xerces-xjavac_taskdef.patch"
10163 "java-xerces-build_dont_unzip.patch"
10164 "java-xerces-bootclasspath.patch"))))
10165 (build-system ant-build-system)
10167 `(#:tests? #f;; Test files are not present
10168 #:test-target "test"
10171 (modify-phases %standard-phases
10172 (add-after 'unpack 'create-build.properties
10173 (lambda* (#:key inputs #:allow-other-keys)
10174 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10175 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10176 (with-output-to-file "build.properties"
10179 "jar.jaxp = ~a/share/java/jaxp.jar~@
10180 jar.apis-ext = ~a/share/java/jaxp.jar~@
10181 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10182 jaxp jaxp resolver)))
10183 ;; Make xerces use our version of jaxp in tests
10184 (substitute* "build.xml"
10186 (string-append jaxp "/share/java/jaxp.jar"))
10187 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10190 (replace 'install (install-jars "build")))))
10192 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10193 ("java-jaxp" ,java-jaxp)))
10194 (home-page "https://xerces.apache.org/xerces2-j/")
10195 (synopsis "Validating XML parser for Java with DOM level 3 support")
10196 (description "The Xerces2 Java parser is the reference implementation of
10197 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10200 Xerces2-J supports the following standards and APIs:
10203 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10204 @item Namespaces in XML Recommendation
10205 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10206 Range Recommendations
10207 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10208 @item Java APIs for XML Processing (JAXP) 1.2.01
10209 @item XML Schema 1.0 Structures and Datatypes Recommendations
10210 @item Experimental implementation of the Document Object Model (DOM) Level 3
10211 Core and Load/Save Working Drafts
10212 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10213 Candidate Recommendation
10216 Xerces is now able to parse documents written according to the XML 1.1
10217 Candidate Recommendation, except that it does not yet provide an option to
10218 enable normalization checking as described in section 2.13 of this
10219 specification. It also handles namespaces according to the XML Namespaces 1.1
10220 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10221 the DOM level 3 load/save API's are in use.")
10222 (license license:asl2.0)))
10224 (define-public java-jakarta-regexp
10226 (name "java-jakarta-regexp")
10231 (uri (string-append
10232 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10233 version ".tar.gz"))
10236 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10237 (build-system ant-build-system)
10239 `(#:test-target "test"
10241 (modify-phases %standard-phases
10243 (lambda* (#:key outputs #:allow-other-keys)
10244 (let* ((out (assoc-ref outputs "out"))
10245 (out-share (string-append out "/share/java")))
10246 (mkdir-p out-share)
10247 (for-each (lambda (name)
10248 (install-file name out-share))
10249 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10251 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10252 (synopsis "Regular expression parser generator for Java.")
10253 (description "@code{jakarta-regexp} is an old regular expression parser
10254 generator for Java.")
10255 (license license:asl2.0)))
10257 (define-public java-jline
10259 (name "java-jline")
10263 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10264 version ".tar.gz"))
10267 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10268 (build-system ant-build-system)
10270 `(#:jar-name "jline.jar"
10271 #:source-dir "src/main/java"
10272 #:test-dir "src/test"
10274 (modify-phases %standard-phases
10275 (add-before 'build 'copy-resources
10277 (copy-recursively "src/main/resources" "build/classes")
10280 `(("java-junit" ,java-junit)))
10281 (home-page "https://jline.github.io")
10282 (synopsis "Console input handling library")
10283 (description "JLine is a Java library for handling console input. It is
10284 similar in functionality to BSD editline and GNU readline but with additional
10285 features that bring it on par with the Z shell line editor.")
10286 (license license:bsd-3)))
10288 (define-public java-jline-2
10290 (inherit java-jline)
10294 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10295 version ".tar.gz"))
10298 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10301 ,@(package-arguments java-jline)))
10303 `(("java-jansi" ,java-jansi)
10304 ("java-jansi-native" ,java-jansi-native)))
10306 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10307 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10308 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10309 ("java-powermock-api-support" ,java-powermock-api-support)
10310 ("java-powermock-core" ,java-powermock-core)
10311 ("java-powermock-reflect" ,java-powermock-reflect)
10312 ("java-easymock" ,java-easymock)
10313 ("java-jboss-javassist" ,java-jboss-javassist)
10314 ("java-objenesis" ,java-objenesis)
10315 ("java-asm" ,java-asm)
10316 ("java-hamcrest-core" ,java-hamcrest-core)
10317 ("java-cglib" ,java-cglib)
10318 ("java-junit" ,java-junit)
10319 ("java-hawtjni" ,java-hawtjni)))))
10321 (define-public java-xmlunit
10323 (name "java-xmlunit")
10327 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10328 version ".tar.gz"))
10329 (file-name (string-append name "-" version ".tar.gz"))
10332 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10333 (build-system ant-build-system)
10335 `(#:jar-name "java-xmlunit.jar"
10336 #:source-dir "xmlunit-core/src/main/java"
10337 #:test-dir "xmlunit-core/src/test"
10339 (modify-phases %standard-phases
10340 (add-before 'check 'copy-test-resources
10341 (lambda* (#:key inputs #:allow-other-keys)
10342 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10345 `(("java-junit" ,java-junit)
10346 ("java-mockito-1" ,java-mockito-1)
10347 ("java-hamcrest-all" ,java-hamcrest-all)
10348 ("java-objenesis" ,java-objenesis)
10349 ("java-asm" ,java-asm)
10350 ("java-cglib" ,java-cglib)
10354 (uri (git-reference
10355 (url "https://github.com/xmlunit/test-resources.git")
10356 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10357 (file-name "java-xmlunit-test-resources")
10360 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10361 (home-page "http://www.xmlunit.org/")
10362 (synopsis "XML output testing")
10363 (description "XMLUnit provides you with the tools to verify the XML you
10364 emit is the one you want to create. It provides helpers to validate against
10365 an XML Schema, assert the values of XPath queries or compare XML documents
10366 against expected outcomes.")
10367 (license license:asl2.0)))
10369 (define-public java-xmlunit-legacy
10371 (inherit java-xmlunit)
10372 (name "java-xmlunit-legacy")
10374 `(#:jar-name "java-xmlunit-legacy.jar"
10375 #:source-dir "xmlunit-legacy/src/main/java"
10376 #:test-dir "xmlunit-legacy/src/test"))
10378 `(("java-xmlunit" ,java-xmlunit)
10379 ("java-junit" ,java-junit)))
10381 `(("java-mockito-1" ,java-mockito-1)))))
10383 (define-public java-xmlunit-matchers
10385 (inherit java-xmlunit)
10386 (name "java-xmlunit-matchers")
10388 `(#:jar-name "java-xmlunit-matchers.jar"
10389 #:source-dir "xmlunit-matchers/src/main/java"
10390 #:test-dir "xmlunit-matchers/src/test"
10392 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10393 (list "**/ValidationMatcherTest.java")
10395 (modify-phases %standard-phases
10396 (add-before 'build 'copy-test-class
10398 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10399 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10401 (add-before 'build 'fix-test-resources-path
10403 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10404 (("../test-resources") "test-resources"))
10406 (add-before 'check 'copy-test-resources
10407 (lambda* (#:key inputs #:allow-other-keys)
10408 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10411 `(("java-xmlunit" ,java-xmlunit)
10412 ("java-junit" ,java-junit)))))
10414 (define-public java-openchart2
10416 (name "java-openchart2")
10420 (uri (string-append "http://download.approximatrix.com/openchart2/"
10421 "openchart2-" version ".source.zip"))
10424 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10425 (build-system ant-build-system)
10427 `(#:test-target "test"
10429 (modify-phases %standard-phases
10430 (add-after 'unpack 'fix-junit-errors
10432 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10433 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10434 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10435 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10436 "model/DefaultChartDataModelConstraintsTest.java"
10437 "model/MultiScatterDataModelConstraintsTest.java"
10438 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10439 (("(assertEquals[^;]+);" before _)
10440 (string-append (string-drop-right before 2) ", 1E-6);"))))
10442 (replace 'install (install-jars ".")))))
10445 ("java-junit" ,java-junit)
10446 ("java-hamcrest-core" ,java-hamcrest-core)))
10447 (home-page "http://approximatrix.com/products/openchart2/")
10448 (synopsis "Simple plotting for Java")
10449 (description "Openchart2 provides a simple, yet powerful, interface for
10450 Java programmers to create two-dimensional charts and plots. The library
10451 features an assortment of graph styles, including advanced scatter plots, bar
10452 graphs, and pie charts.")
10453 (license license:lgpl2.1+)))
10455 (define-public java-commons-httpclient
10457 (name "java-commons-httpclient")
10461 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10462 "commons-httpclient/source/commons-httpclient-"
10463 version "-src.tar.gz"))
10466 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10467 (build-system ant-build-system)
10469 `(#:build-target "compile"
10470 #:test-target "test"
10471 #:tests? #f; requires junit-textui (junit 3)
10473 (modify-phases %standard-phases
10474 (add-before 'build 'fix-accent
10476 (for-each (lambda (file)
10477 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10479 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10480 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10481 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10482 "src/test/org/apache/commons/httpclient/TestHttps.java"
10483 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10486 (lambda* (#:key outputs #:allow-other-keys)
10487 (invoke "ant" "dist"
10488 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10492 `(("java-commons-logging" ,java-commons-logging-minimal)
10493 ("java-commons-codec" ,java-commons-codec)))
10494 (home-page "https://hc.apache.org")
10495 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10496 (description "This package contains an HTTP/1.1 compliant HTTP agent
10497 implementation. It also provides reusable components for client-side
10498 authentication, HTTP state management, and HTTP connection management.")
10499 (license license:asl2.0)))
10501 (define-public java-commons-vfs
10503 (name "java-commons-vfs")
10507 (uri (string-append "mirror://apache/commons/vfs/source/"
10508 "commons-vfs2-distribution-" version "-src.tar.gz"))
10509 (file-name (string-append name "-" version ".tar.gz"))
10512 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10513 (modules '((guix build utils)))
10516 (for-each delete-file
10517 (find-files "." "\\.jar$"))
10519 (build-system ant-build-system)
10521 `(#:jar-name "commons-vfs.jar"
10522 #:source-dir "commons-vfs2/src/main/java"
10523 #:test-dir "commons-vfs2/src/test"
10524 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10527 (modify-phases %standard-phases
10528 (add-before 'build 'remove-hadoop-and-webdav
10529 ; Remove these files as they are not required and depend on difficult
10532 (for-each delete-file-recursively
10533 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10534 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10537 `(("java-commons-collections4" ,java-commons-collections4)
10538 ("java-commons-compress" ,java-commons-compress)
10539 ("java-commons-httpclient" ,java-commons-httpclient)
10540 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10541 ("java-commons-net" ,java-commons-net)
10542 ("java-jsch" ,java-jsch)))
10543 (home-page "http://commons.apache.org/proper/commons-vfs/")
10544 (synopsis "Java file system library")
10545 (description "Commons VFS provides a single API for accessing various
10546 different file systems. It presents a uniform view of the files from various
10547 different sources, such as the files on local disk, on an HTTP server, or
10548 inside a Zip archive.")
10549 (license license:asl2.0)))
10551 (define-public java-jakarta-oro
10553 (name "java-jakarta-oro")
10557 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10558 "jakarta-oro-" version ".tar.gz"))
10561 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10562 (modules '((guix build utils)))
10565 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10567 (build-system ant-build-system)
10569 `(#:build-target "package"
10570 #:tests? #f; tests are run as part of the build process
10572 (modify-phases %standard-phases
10574 (install-jars ,(string-append "jakarta-oro-" version))))))
10575 (home-page "https://jakarta.apache.org/oro/")
10576 (synopsis "Text-processing for Java")
10577 (description "The Jakarta-ORO Java classes are a set of text-processing
10578 Java classes that provide Perl5 compatible regular expressions, AWK-like
10579 regular expressions, glob expressions, and utility classes for performing
10580 substitutions, splits, filtering filenames, etc. This library is the successor
10581 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10583 (license license:asl1.1)))
10585 (define-public java-native-access
10587 (name "java-native-access")
10591 (uri (string-append "https://github.com/java-native-access/jna/"
10592 "archive/" version ".tar.gz"))
10593 (file-name (string-append name "-" version ".tar.gz"))
10596 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10597 (modules '((guix build utils)))
10600 (for-each delete-file (find-files "." ".*.jar"))
10601 (delete-file-recursively "native/libffi")
10602 (delete-file-recursively "dist")
10604 (build-system ant-build-system)
10606 `(#:tests? #f; FIXME: tests require reflections.jar
10607 #:test-target "test"
10608 #:make-flags (list "-Ddynlink.native=true")
10610 (modify-phases %standard-phases
10611 (add-before 'build 'fix-build.xml
10612 (lambda* (#:key inputs #:allow-other-keys)
10613 (substitute* "build.xml"
10614 ;; Since we removed the bundled ant.jar, give the correct path
10615 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10616 ;; We removed generated native libraries. We can only rebuild one
10617 ;; so don't fail if we can't find a native library for another architecture.
10618 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10619 ;; Copy test dependencies
10620 (copy-file (string-append (assoc-ref inputs "java-junit")
10621 "/share/java/junit.jar")
10623 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10624 "/share/java/hamcrest-core.jar")
10625 "lib/hamcrest-core.jar")
10626 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10628 (add-before 'build 'build-native
10630 (invoke "ant" "-Ddynlink.native=true" "native")
10633 (install-jars "build")))))
10635 `(("libffi" ,libffi)
10639 `(("java-junit" ,java-junit)
10640 ("java-hamcrest-core" ,java-hamcrest-core)))
10641 (home-page "https://github.com/java-native-access/jna")
10642 (synopsis "Access to native shared libraries from Java")
10643 (description "JNA provides Java programs easy access to native shared
10644 libraries without writing anything but Java code - no JNI or native code is
10645 required. JNA allows you to call directly into native functions using natural
10646 Java method invocation.")
10647 ;; Java Native Access project (JNA) is dual-licensed under 2
10648 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10651 license:lgpl2.1+))))
10653 (define-public java-native-access-platform
10655 (inherit java-native-access)
10656 (name "java-native-access-platform")
10658 `(#:test-target "test"
10659 #:tests? #f; require jna-test.jar
10661 (modify-phases %standard-phases
10662 (add-before 'build 'chdir
10664 (chdir "contrib/platform")
10666 (add-after 'chdir 'fix-ant
10667 (lambda* (#:key inputs #:allow-other-keys)
10668 (substitute* "nbproject/project.properties"
10669 (("../../build/jna.jar")
10670 (string-append (assoc-ref inputs "java-native-access")
10671 "/share/java/jna.jar"))
10672 (("../../lib/hamcrest-core-.*.jar")
10673 (string-append (assoc-ref inputs "java-hamcrest-core")
10674 "/share/java/hamcrest-core.jar"))
10675 (("../../lib/junit.jar")
10676 (string-append (assoc-ref inputs "java-junit")
10677 "/share/java/junit.jar")))
10680 (install-jars "dist")))))
10682 `(("java-native-access" ,java-native-access)))
10683 (synopsis "Cross-platform mappings for jna")
10684 (description "java-native-access-platfrom has cross-platform mappings
10685 and mappings for a number of commonly used platform functions, including a
10686 large number of Win32 mappings as well as a set of utility classes that
10687 simplify native access.")))
10689 (define-public java-jsch-agentproxy-core
10691 (name "java-jsch-agentproxy-core")
10695 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10696 version ".tar.gz"))
10697 (file-name (string-append name "-" version ".tar.gz"))
10700 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10701 (build-system ant-build-system)
10703 `(#:jar-name "jsch-agentproxy-core.jar"
10704 #:source-dir "jsch-agent-proxy-core/src/main/java"
10705 #:tests? #f)); no tests
10706 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10707 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10708 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10709 and Pageant included Putty. It will be easily integrated into JSch, and users
10710 will be allowed to use these programs for authentication.")
10711 (license license:bsd-3)))
10713 (define-public java-jsch-agentproxy-sshagent
10715 (inherit java-jsch-agentproxy-core)
10716 (name "java-jsch-agentproxy-sshagent")
10718 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10719 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10720 #:tests? #f)); no tests
10722 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10723 (synopsis "Proxy to ssh-agent")
10724 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10725 and Pageant included in Putty. This component contains the code for a proxy to
10728 (define-public java-jsch-agentproxy-usocket-jna
10730 (inherit java-jsch-agentproxy-core)
10731 (name "java-jsch-agentproxy-usocket-jna")
10733 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10734 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10735 #:tests? #f)); no tests
10737 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10738 ("java-native-access" ,java-native-access)))
10739 (synopsis "USocketFactory implementation using JNA")
10740 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10741 and Pageant included in Putty. This component contains an implementation of
10742 USocketFactory using @dfn{JNA} (Java Native Access).")))
10744 (define-public java-jsch-agentproxy-pageant
10746 (inherit java-jsch-agentproxy-core)
10747 (name "java-jsch-agentproxy-pageant")
10749 `(#:jar-name "jsch-agentproxy-pageant.jar"
10750 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10751 #:tests? #f)); no tests
10753 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10754 ("java-native-access" ,java-native-access)
10755 ("java-native-access-platform" ,java-native-access-platform)))
10756 (synopsis "Proxy to pageant")
10757 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10758 and Pageant included in Putty. This component contains the code for a proxy to
10761 (define-public java-jsch-agentproxy-usocket-nc
10763 (inherit java-jsch-agentproxy-core)
10764 (name "java-jsch-agentproxy-usocket-nc")
10766 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10767 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10768 #:tests? #f)); no tests
10770 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10771 (synopsis "USocketFactory implementation using netcat")
10772 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10773 and Pageant included in Putty. This component contains an implementation of
10774 USocketFactory using netcat.")))
10776 (define-public java-jsch-agentproxy-connector-factory
10778 (inherit java-jsch-agentproxy-core)
10779 (name "java-jsch-agentproxy-connector-factory")
10781 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10782 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10783 #:tests? #f)); no tests
10785 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10786 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10787 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10788 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10789 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10790 (synopsis "Connector factory for jsch agent proxy")
10791 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10792 and Pageant included in Putty. This component contains a connector factory.")))
10794 (define-public java-jsch-agentproxy-jsch
10796 (inherit java-jsch-agentproxy-core)
10797 (name "java-jsch-agentproxy-jsch")
10799 `(#:jar-name "jsch-agentproxy-jsch.jar"
10800 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10801 #:tests? #f)); no tests
10803 `(("java-jsch" ,java-jsch)
10804 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10805 (synopsis "JSch integration library for agentproxy")
10806 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10807 and Pageant included in Putty. This component contains a library to use
10808 jsch-agent-proxy with JSch.")))
10810 (define-public java-apache-ivy
10812 (name "java-apache-ivy")
10816 (uri (string-append "mirror://apache//ant/ivy/" version
10817 "/apache-ivy-" version "-src.tar.gz"))
10820 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10823 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10824 (build-system ant-build-system)
10826 `(#:jar-name "ivy.jar"
10829 (modify-phases %standard-phases
10830 (add-before 'build 'remove-example
10832 (delete-file-recursively "src/example")
10834 (add-before 'build 'copy-resources
10836 (with-directory-excursion "src/java"
10837 (for-each (lambda (file)
10838 (install-file file (string-append "../../build/classes/" (dirname file))))
10840 (find-files "." ".*.css")
10841 (find-files "." ".*.ent")
10842 (find-files "." ".*.html")
10843 (find-files "." ".*.properties")
10844 (find-files "." ".*.xsd")
10845 (find-files "." ".*.xsl")
10846 (find-files "." ".*.xml"))))
10848 (add-before 'build 'fix-vfs
10851 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10852 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10853 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10855 (add-before 'install 'copy-manifest
10857 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10859 (add-before 'install 'repack
10861 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10862 "-C" "build/classes" ".")))
10863 (add-after 'install 'install-bin
10864 (lambda* (#:key outputs #:allow-other-keys)
10865 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10866 (ivy (string-append bin "/ivy"))
10867 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10869 (with-output-to-file ivy
10871 (display (string-append
10872 "#!" (which "sh") "\n"
10873 "if [[ -z $CLASSPATH ]]; then\n"
10874 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10876 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10878 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10882 `(("java-bouncycastle" ,java-bouncycastle)
10883 ("java-commons-cli" ,java-commons-cli)
10884 ("java-commons-collections" ,java-commons-collections)
10885 ("java-commons-httpclient" ,java-commons-httpclient)
10886 ("java-commons-lang" ,java-commons-lang)
10887 ("java-commons-vfs" ,java-commons-vfs)
10888 ("java-jakarta-oro" ,java-jakarta-oro)
10889 ("java-jsch" ,java-jsch)
10890 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10891 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10892 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10893 ("java-junit" ,java-junit)))
10894 (home-page "https://ant.apache.org/ivy")
10895 (synopsis "Dependency manager for the Java programming language")
10896 (description "Ivy is a tool for managing (recording, tracking, resolving
10897 and reporting) project dependencies. It is characterized by the following:
10900 @item flexibility and configurability - Ivy is essentially process agnostic
10901 and is not tied to any methodology or structure. Instead it provides the
10902 necessary flexibility and configurability to be adapted to a broad range
10903 of dependency management and build processes.
10904 @item tight integration with Apache Ant - while available as a standalone tool,
10905 Ivy works particularly well with Apache Ant providing a number of
10906 powerful Ant tasks ranging from dependency resolution to dependency
10907 reporting and publication.
10909 (license license:asl2.0)))
10911 (define-public java-eclipse-sisu-inject
10913 (name "java-eclipse-sisu-inject")
10917 (uri (git-reference
10918 (url "https://github.com/eclipse/sisu.inject/")
10919 (commit "releases/0.3.3")))
10920 (file-name (git-file-name name version))
10923 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
10924 (build-system ant-build-system)
10926 `(#:jar-name "eclipse-sisu-inject.jar"
10927 #:source-dir "org.eclipse.sisu.inject/src"
10929 #:tests? #f)); no tests
10931 `(("java-guice" ,java-guice)
10932 ("java-guice-servlet" ,java-guice-servlet)
10933 ("java-javax-inject" ,java-javax-inject)
10934 ("java-javaee-servletapi" ,java-javaee-servletapi)
10935 ("java-junit" ,java-junit)
10936 ("java-slf4j-api" ,java-slf4j-api)
10937 ("java-jsr305" ,java-jsr305)
10938 ("java-jsr250" ,java-jsr250)
10939 ("java-cdi-api" ,java-cdi-api)
10940 ("java-osgi-framework" ,java-osgi-framework)
10941 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10942 ("java-testng" ,java-testng)))
10943 (home-page "https://www.eclipse.org/sisu/")
10944 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10945 (description "Sisu is a modular JSR330-based container that supports
10946 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10947 Google-Guice to perform dependency injection and provide the core JSR330
10948 support, but removes the need to write explicit bindings in Guice modules.
10949 Integration with other containers via the Eclipse Extension Registry and the
10950 OSGi Service Registry is a goal of this project.")
10951 (license license:epl1.0)))
10953 (define-public java-eclipse-sisu-plexus
10955 (name "java-eclipse-sisu-plexus")
10959 (uri (git-reference
10960 (url "https://github.com/eclipse/sisu.plexus.git")
10961 (commit (string-append "releases/" version))))
10962 (file-name (git-file-name name version))
10965 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
10966 (modules '((guix build utils)))
10969 (for-each delete-file (find-files "." ".*.jar"))
10970 (rename-file "org.eclipse.sisu.plexus.tests/src"
10971 "org.eclipse.sisu.plexus.tests/java")
10973 (build-system ant-build-system)
10975 `(#:jar-name "eclipse-sisu-plexus.jar"
10976 #:source-dir "org.eclipse.sisu.plexus/src"
10977 #:test-dir "org.eclipse.sisu.plexus.tests"
10980 ;; This test fails probably because we can't generate the necessary
10982 "**/PlexusLoggingTest.*"
10983 ;; FIXME: This test fails because of some injection error
10984 "**/PlexusRequirementTest.*")
10987 (modify-phases %standard-phases
10988 (add-before 'build 'copy-resources
10990 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10991 "build/classes/META-INF/plexus")
10993 (add-before 'check 'build-test-jar
10995 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10997 (with-directory-excursion "java"
10998 (apply invoke "javac" "-cp"
10999 (string-append (getenv "CLASSPATH")
11000 ":../../../../../build/classes")
11001 (find-files "." ".*.java"))
11002 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11003 (find-files "." ".*.jar")))
11004 (mkdir-p "build/META-INF/plexus")
11005 (copy-file "resources/META-INF/plexus/components.xml"
11006 "build/META-INF/plexus/components.xml")
11007 (with-directory-excursion "build"
11008 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11009 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11010 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11011 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11012 (("resources/component-jar")
11013 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11016 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11017 ("java-plexus-util" ,java-plexus-utils)
11018 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11019 ("java-osgi-framework" ,java-osgi-framework)
11020 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11021 ("java-guice" ,java-guice)
11022 ("java-javax-inject" ,java-javax-inject)
11023 ("java-slf4j-api" ,java-slf4j-api)
11024 ("java-junit" ,java-junit)))
11026 `(("java-guava" ,java-guava)
11027 ("java-aopalliance" ,java-aopalliance)
11028 ("java-cglib" ,java-cglib)
11029 ("java-asm" ,java-asm)))
11030 (home-page "https://www.eclipse.org/sisu/")
11031 (synopsis "Plexus support for the sisu container")
11032 (description "Sisu is a modular JSR330-based container that supports
11033 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11034 adds Plexus support to the Sisu-Inject container.")
11035 (license license:epl1.0)))
11037 (define-public java-commons-compiler
11039 (name "java-commons-compiler")
11043 (uri (git-reference
11044 (url "https://github.com/janino-compiler/janino")
11045 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11046 (file-name (string-append name "-" version))
11049 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11050 (modules '((guix build utils)))
11053 (for-each delete-file
11054 (find-files "." "\\.jar$"))
11056 (build-system ant-build-system)
11058 `(#:jar-name "commons-compiler.jar"
11059 #:source-dir "commons-compiler/src/main"
11060 #:tests? #f)); no tests
11061 (home-page "https://github.com/janino-compiler/janino")
11062 (synopsis "Java compiler")
11063 (description "Commons-compiler contains an API for janino, including the
11064 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11065 and @code{ISimpleCompiler} interfaces.")
11066 (license license:bsd-3)))
11068 (define-public java-janino
11070 (inherit java-commons-compiler)
11071 (name "java-janino")
11073 `(#:jar-name "janino.jar"
11074 #:source-dir "src/main/java"
11076 (modify-phases %standard-phases
11077 (add-before 'configure 'chdir
11082 `(("java-commons-compiler" ,java-commons-compiler)))
11084 `(("java-junit" ,java-junit)
11085 ("java-hamcrest-core" ,java-hamcrest-core)))
11086 (description "Janino is a Java compiler. Janino can compile a set of
11087 source files to a set of class files like @code{javac}, but also compile a
11088 Java expression, block, class body or source file in memory, load the bytecode
11089 and execute it directly in the same JVM. @code{janino} can also be used for
11090 static code analysis or code manipulation.")))
11092 (define-public java-logback-core
11094 (name "java-logback-core")
11098 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11099 version ".tar.gz"))
11100 (file-name (string-append name "-" version ".tar.gz"))
11103 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11104 (modules '((guix build utils)))
11107 (delete-file-recursively "logback-access/lib")
11109 (build-system ant-build-system)
11111 `(#:jar-name "logback.jar"
11112 #:source-dir "src/main/java"
11113 #:test-dir "src/test"
11115 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11116 ;; which creates FastClasses
11117 (list "**/AllCoreTest.*"
11118 "**/AutoFlushingObjectWriterTest.*"
11120 "**/ResilientOutputStreamTest.*"
11121 ;; And we still don't want to run abstract classes
11124 (modify-phases %standard-phases
11125 (add-before 'configure 'chdir
11127 (chdir "logback-core")
11130 `(("java-javax-mail" ,java-javax-mail)
11131 ("servlet" ,java-javaee-servletapi)
11132 ("java-commons-compiler" ,java-commons-compiler)
11133 ("java-janino" ,java-janino)))
11135 `(("java-junit" ,java-junit)
11136 ("java-hamcrest-core" ,java-hamcrest-core)
11137 ("java-mockito-1" ,java-mockito-1)
11138 ("java-cglib" ,java-cglib)
11139 ("java-asm" ,java-asm)
11140 ("java-objenesis" ,java-objenesis)
11141 ("java-joda-time" ,java-joda-time)))
11142 (home-page "https://logback.qos.ch")
11143 (synopsis "Logging for java")
11144 (description "Logback is intended as a successor to the popular log4j project.
11145 This module lays the groundwork for the other two modules.")
11146 ;; Either epl1.0 or lgpl2.1
11147 (license (list license:epl1.0
11148 license:lgpl2.1))))
11150 (define-public java-logback-classic
11152 (inherit java-logback-core)
11153 (name "java-logback-classic")
11155 `(#:jar-name "logback-classic.jar"
11156 #:source-dir "src/main/java"
11157 #:test-dir "src/test"
11158 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11161 (modify-phases %standard-phases
11162 (add-before 'configure 'chdir
11164 (chdir "logback-classic")
11167 (lambda* (#:key inputs #:allow-other-keys)
11168 (mkdir-p "build/classes")
11169 (setenv "CLASSPATH"
11171 (apply append (map (lambda (input)
11172 (find-files (assoc-ref inputs input)
11174 '("java-logback-core" "java-slf4j-api"
11175 "java-commons-compiler" "servlet"
11178 (apply invoke "groovyc" "-d" "build/classes" "-j"
11179 (find-files "src/main/" ".*\\.(groovy|java)$"))
11180 (invoke "ant" "jar")
11183 `(("java-logback-core" ,java-logback-core)
11184 ("java-slf4j-api" ,java-slf4j-api)
11185 ,@(package-inputs java-logback-core)))
11187 `(("groovy" ,groovy)))
11188 (description "Logback is intended as a successor to the popular log4j project.
11189 This module can be assimilated to a significantly improved version of log4j.
11190 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11191 can readily switch back and forth between logback and other logging frameworks
11192 such as log4j or @code{java.util.logging} (JUL).")))
11194 (define-public java-qdox
11197 ; Newer version exists, but this version is required by java-plexus-component-metadata
11201 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
11202 ;; Older releases at https://github.com/codehaus/qdox/
11203 ;; Note: The release at maven is pre-generated. The release at
11204 ;; github requires jflex.
11205 (uri (string-append "http://central.maven.org/maven2/"
11206 "com/thoughtworks/qdox/qdox/" version
11207 "/qdox-" version "-sources.jar"))
11210 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
11211 (build-system ant-build-system)
11213 `(#:jar-name "qdox.jar"
11214 #:tests? #f)); no tests
11215 (home-page "http://qdox.codehaus.org/")
11216 (synopsis "Parse definitions from Java source files")
11217 (description "QDox is a high speed, small footprint parser for extracting
11218 class/interface/method definitions from source files complete with JavaDoc
11219 @code{@@tags}. It is designed to be used by active code generators or
11220 documentation tools.")
11221 (license license:asl2.0)))
11223 (define-public java-jgit
11226 (version "4.7.0.201704051617-r")
11229 (uri (string-append "https://repo1.maven.org/maven2/"
11230 "org/eclipse/jgit/org.eclipse.jgit/"
11231 version "/org.eclipse.jgit-"
11232 version "-sources.jar"))
11235 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11236 (build-system ant-build-system)
11238 `(#:tests? #f ; There are no tests to run.
11239 #:jar-name "jgit.jar"
11240 ;; JGit must be built with a JDK supporting Java 8.
11242 ;; Target our older default JDK.
11243 #:make-flags (list "-Dtarget=1.7")
11245 (modify-phases %standard-phases
11246 ;; The jar file generated by the default build.xml does not include
11247 ;; the text properties files, so we need to add them.
11248 (add-after 'build 'add-properties
11249 (lambda* (#:key jar-name #:allow-other-keys)
11250 (with-directory-excursion "src"
11251 (apply invoke "jar" "-uf"
11252 (string-append "../build/jar/" jar-name)
11253 (find-files "." "\\.properties$")))
11256 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11257 ("java-javaewah" ,java-javaewah)
11258 ("java-jsch" ,java-jsch)
11259 ("java-slf4j-api" ,java-slf4j-api)))
11260 (home-page "https://eclipse.org/jgit/")
11261 (synopsis "Java library implementing the Git version control system")
11262 (description "JGit is a lightweight, pure Java library implementing the
11263 Git version control system, providing repository access routines, support for
11264 network protocols, and core version control algorithms.")
11265 (license license:edl1.0)))
11267 ;; For axoloti. This package can still be built with icedtea-7, which is
11268 ;; currently used as the default JDK.
11269 (define-public java-jgit-4.2
11270 (package (inherit java-jgit)
11271 (version "4.2.0.201601211800-r")
11274 (uri (string-append "https://repo1.maven.org/maven2/"
11275 "org/eclipse/jgit/org.eclipse.jgit/"
11276 version "/org.eclipse.jgit-"
11277 version "-sources.jar"))
11280 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11281 (build-system ant-build-system)
11283 (substitute-keyword-arguments (package-arguments java-jgit)
11284 ;; Build for default JDK.
11285 ((#:jdk _) icedtea-7)
11287 `(modify-phases ,phases
11288 (add-after 'unpack 'use-latest-javaewah-API
11290 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11291 (("wordinbits") "WORD_IN_BITS"))
11294 `(("java-javaewah" ,java-javaewah)
11295 ("java-jsch" ,java-jsch)
11296 ("java-slf4j-api" ,java-slf4j-api)))))
11298 (define-public abcl
11305 (uri (string-append "https://abcl.org/releases/"
11306 version "/abcl-src-" version ".tar.gz"))
11309 "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj"))
11312 "abcl-fix-build-xml.patch"))))
11313 (build-system ant-build-system)
11315 `(("java-junit" ,java-junit)))
11317 `(#:build-target "abcl.jar"
11318 #:test-target "abcl.test"
11320 (modify-phases %standard-phases
11322 (lambda* (#:key outputs #:allow-other-keys)
11323 (let ((share (string-append (assoc-ref outputs "out")
11325 (bin (string-append (assoc-ref outputs "out")
11328 (install-file "dist/abcl.jar" share)
11329 (install-file "dist/abcl-contrib.jar" share)
11331 (with-output-to-file (string-append bin "abcl")
11333 (let ((classpath (string-append
11336 share "abcl-contrib.jar")))
11337 (display (string-append
11338 "#!" (which "sh") "\n"
11339 "if [[ -z $CLASSPATH ]]; then\n"
11340 " cp=\"" classpath "\"\n"
11342 " cp=\"" classpath ":$CLASSPATH\"\n"
11344 "exec " (which "java")
11345 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11346 (chmod (string-append bin "abcl") #o755)
11348 (home-page "https://abcl.org/")
11349 (synopsis "Common Lisp Implementation on the JVM")
11351 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11352 Lisp language featuring both an interpreter and a compiler, running in the
11353 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11354 in any Java application. Additionally, it can be used to implement (parts of)
11355 the application using Java to Lisp integration APIs.")
11356 (license (list license:gpl2+
11357 ;; named-readtables is released under 3 clause BSD
11359 ;; jfli is released under CPL 1.0
11362 (define-public java-jsonp-api
11364 (name "java-jsonp-api")
11368 (uri (git-reference
11369 (url "https://github.com/eclipse-ee4j/jsonp")
11370 (commit (string-append version "-RELEASE"))))
11371 (file-name (git-file-name name version))
11374 "0nxq16lrx7i87hgyj5rzcwilvr67h0i299gygfn8f5vs4n7n59vy"))))
11375 (build-system ant-build-system)
11377 `(#:jar-name "jsonp-api.jar"
11379 #:source-dir "api/src/main/java"
11380 #:test-dir "api/src/test"))
11381 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11382 (synopsis "JSON Processing in Java")
11383 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11384 parse, generate, transform and query) JSON messages. It produces and
11385 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11386 and allows to build a Java object model for JSON text using API classes
11387 (similar to DOM API for XML).")
11388 ;; either gpl2 only with classpath exception, or epl2.0.
11389 (license (list license:gpl2
11392 (define-public java-jsonp-impl
11394 (inherit java-jsonp-api)
11395 (name "java-jsonp-impl")
11397 `(#:jar-name "jsonp-impl.jar"
11399 #:source-dir "impl/src/main/java"
11400 #:test-dir "impl/src/test"))
11402 `(("java-jsonp-api" ,java-jsonp-api)))
11403 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11404 parse, generate, transform and query) JSON messages. This package contains
11405 a reference implementation of that API.")))
11407 (define-public java-xmp
11413 (uri (string-append "http://download.macromedia.com/pub/developer"
11414 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11417 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11418 (build-system ant-build-system)
11420 `(#:build-target "build"
11421 #:tests? #f; no tests
11423 (modify-phases %standard-phases
11424 (add-after 'unpack 'chdir
11428 (add-before 'build 'fix-timestamp
11430 (substitute* "build.xml"
11431 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11434 (install-jars "."))
11435 (add-after 'install 'install-doc
11436 (lambda* (#:key outputs #:allow-other-keys)
11439 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11442 `(("unzip" ,unzip)))
11443 (home-page "https://www.adobe.com/devnet/xmp.html")
11444 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11445 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11446 technology that allows you to embed data about a file, known as metadata,
11447 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11448 library and the API is similar.")
11449 (license license:bsd-3)))
11451 (define-public java-metadata-extractor
11453 (name "java-metadata-extractor")
11457 (uri (git-reference
11458 (url "https://github.com/drewnoakes/metadata-extractor")
11460 (file-name (git-file-name name version))
11463 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11464 (build-system ant-build-system)
11466 `(#:jar-name "metadata-extractor.jar"
11467 #:source-dir "Source"
11470 (modify-phases %standard-phases
11471 (add-before 'check 'fix-test-dir
11473 (substitute* "build.xml"
11474 (("/java\">") "\">"))
11477 `(("java-xmp" ,java-xmp)))
11479 `(("java-hamcrest-core" ,java-hamcrest-core)
11480 ("java-junit" ,java-junit)))
11481 (home-page "https://github.com/drewnoakes/metadata-extractor")
11482 (synopsis "Extract metadata from image and video files")
11483 (description "Metadata-extractor is a straightforward Java library for
11484 reading metadata from image files. It is able to read metadata in Exif,
11485 IPTC, XMP, ICC and more formats.")
11486 (license license:asl2.0)))
11488 (define-public java-svg-salamander
11490 (name "java-svg-salamander")
11494 (uri (git-reference
11495 (url "https://github.com/blackears/svgSalamander")
11496 (commit (string-append "v" version))))
11497 (file-name (git-file-name name version))
11500 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11501 (modules '((guix build utils)))
11503 `(for-each delete-file (find-files "." ".*.jar")))
11505 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11506 (build-system ant-build-system)
11508 `(#:tests? #f; no tests
11510 (modify-phases %standard-phases
11511 (add-after 'unpack 'chdir
11515 (add-before 'build 'copy-jars
11516 (lambda* (#:key inputs #:allow-other-keys)
11517 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11518 "../libraries/javacc.jar")
11519 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11520 "../libraries/ant.jar")
11523 (install-jars "dist")))))
11525 `(("javacc" ,javacc)))
11526 (home-page "https://github.com/blackears/svgSalamander")
11527 (synopsis "SVG engine for Java")
11528 (description "SVG Salamander is an SVG engine for Java that's designed
11529 to be small, fast, and allow programmers to use it with a minimum of fuss.
11530 It's in particular targeted for making it easy to integrate SVG into Java
11531 games and making it much easier for artists to design 2D game content - from
11532 rich interactive menus to charts and graphcs to complex animations.")
11533 (license license:bsd-2)))