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 javacc-4
2406 (url "https://github.com/javacc/javacc.git")
2407 (commit "release_41")))
2408 (file-name (string-append "javacc-" version "-checkout"))
2411 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2412 (modules '((guix build utils)))
2413 ;; delete bundled jars
2414 (snippet '(begin (delete-file-recursively "lib") #t))))
2415 (build-system ant-build-system)
2417 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2422 (modify-phases %standard-phases
2423 ;; Delete tests to avoid build failure (we don't run them anyway).
2424 (add-after 'unpack 'delete-tests
2426 (for-each delete-file
2427 '("src/org/javacc/JavaCCTestCase.java"
2428 "src/org/javacc/parser/ExpansionTest.java"
2429 "src/org/javacc/parser/OptionsTest.java"
2430 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2431 (for-each delete-file-recursively
2432 '("src/org/javacc/parser/test"
2433 "src/org/javacc/jjdoc/test"))
2435 (replace 'install (install-jars "bin/lib")))))
2436 (home-page "https://javacc.org/")
2437 (synopsis "Java parser generator")
2438 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2439 generator for use with Java applications. A parser generator is a tool that
2440 reads a grammar specification and converts it to a Java program that can
2441 recognize matches to the grammar. In addition to the parser generator itself,
2442 JavaCC provides other standard capabilities related to parser generation such
2443 as tree building (via a tool called JJTree included with JavaCC), actions,
2445 (license license:bsd-3)))
2447 (define-public javacc
2455 (url "https://github.com/javacc/javacc.git")
2457 (file-name (git-file-name "javacc" version))
2459 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2460 (modules '((guix build utils)))
2461 ;; Delete bundled jars.
2462 (snippet '(begin (for-each delete-file-recursively
2463 '("bootstrap" "lib"))
2466 `(#:make-flags ; bootstrap from javacc-4
2467 (list (string-append "-Dbootstrap-jar="
2468 (assoc-ref %build-inputs "javacc")
2469 "/share/java/javacc.jar"))
2470 #:test-target "test"
2472 (modify-phases %standard-phases
2473 (replace 'install (install-jars "target"))
2474 (add-after 'install 'install-bin
2475 (lambda* (#:key outputs inputs #:allow-other-keys)
2476 (let* ((out (assoc-ref outputs "out"))
2477 (dir (string-append out "/share/java"))
2478 (bin (string-append out "/bin"))
2479 (javacc (string-append bin "/javacc")))
2481 (with-output-to-file javacc
2484 (string-append "#!/bin/sh\n"
2485 (assoc-ref inputs "jdk") "/bin/java"
2486 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2487 (chmod javacc #o755)
2488 ;; symlink to different names to affect the first argument and
2489 ;; change the behavior of the jar file.
2490 (symlink javacc (string-append bin "/jjdoc"))
2491 (symlink javacc (string-append bin "/jjtree"))
2495 `(("javacc" ,javacc-4)))))
2497 ;; This is the last 3.x release of ECJ
2498 (define-public java-ecj-3
2504 (uri (string-append "http://archive.eclipse.org/eclipse/"
2505 "downloads/drops/R-" version
2506 "-201301310800/ecjsrc-" version ".jar"))
2509 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2510 (build-system ant-build-system)
2512 `(#:tests? #f ; none included
2513 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2514 #:make-flags (list "-f" "src/build.xml")
2515 #:build-target "build"
2517 (modify-phases %standard-phases
2518 (add-after 'unpack 'fix-manifest
2520 ;; Record the main class to make ecj executable.
2521 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2523 (display "Manifest-Version: 1.0
2524 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2527 (replace 'install (install-jars ".")))))
2528 (home-page "https://eclipse.org")
2529 (synopsis "Eclipse Java development tools core batch compiler")
2530 (description "This package provides the Eclipse Java core batch compiler.")
2531 (license license:epl1.0)))
2533 ;; This is needed for java-cisd-args4j
2534 (define-public java-ecj-3.5
2535 (package (inherit java-ecj-3)
2538 (method url-fetch/zipbomb)
2539 (uri (string-append "http://archive.eclipse.org/eclipse/"
2540 "downloads/drops/R-" version
2541 "-200909170800/ecjsrc-" version ".zip"))
2544 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2545 (build-system ant-build-system)
2547 `(#:tests? #f ; none included
2548 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2549 #:build-target "build"
2551 (modify-phases %standard-phases
2552 (add-after 'unpack 'fix-manifest
2554 ;; Record the main class to make ecj executable.
2555 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2558 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2561 (replace 'install (install-jars ".")))))
2563 `(("unzip" ,unzip)))))
2565 (define-public java-cisd-base
2566 (let ((revision 38938)
2567 (base-version "14.12.0"))
2569 (name "java-cisd-base")
2570 (version (string-append base-version "-" (number->string revision)))
2574 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2575 "base/tags/release/"
2576 (version-major+minor base-version)
2577 ".x/" base-version "/base/"))
2578 (revision revision)))
2579 (file-name (string-append "java-cisd-base-" version "-checkout"))
2582 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2583 (modules '((guix build utils)))
2586 ;; Delete included gradle jar
2587 (delete-file-recursively "gradle/wrapper")
2588 ;; Delete pre-built native libraries
2589 (delete-file-recursively "libs")
2591 (build-system ant-build-system)
2593 `(#:make-flags '("-file" "build/build.xml")
2594 #:test-target "jar-test"
2597 (modify-phases %standard-phases
2598 (add-after 'unpack 'unpack-build-resources
2599 (lambda* (#:key inputs #:allow-other-keys)
2600 (copy-recursively (assoc-ref inputs "build-resources")
2601 "../build_resources")
2603 (add-after 'unpack-build-resources 'fix-dependencies
2604 (lambda* (#:key inputs #:allow-other-keys)
2605 (substitute* "build/build.xml"
2606 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2607 (string-append (assoc-ref inputs "java-testng")
2608 "/share/java/java-testng.jar"))
2609 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2610 (string-append (assoc-ref inputs "java-commons-lang")
2611 "/share/java/commons-lang-"
2612 ,(package-version java-commons-lang) ".jar"))
2613 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2614 (string-append (assoc-ref inputs "java-commons-io")
2615 "/share/java/commons-io-"
2616 ,(package-version java-commons-io)
2618 ;; Remove dependency on svn
2619 (("<build-info.*") "")
2620 (("\\$\\{revision.number\\}")
2621 ,(number->string revision))
2622 (("\\$\\{version.number\\}") ,base-version))
2623 ;; Remove dependency on classycle
2624 (substitute* "../build_resources/ant/build-common.xml"
2625 (("<taskdef name=\"dependency-checker.*") "")
2626 (("classname=\"classycle.*") "")
2627 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2629 ;; A few tests fail because of the lack of a proper /etc/groups and
2630 ;; /etc/passwd file in the build container.
2631 (add-after 'unpack 'disable-broken-tests
2633 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2634 (("Unix.isOperational\\(\\)") "false"))
2636 ;; These decorators are almost useless and pull in an unpackaged
2638 (add-after 'unpack 'remove-useless-decorators
2640 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2642 (("import ch.rinn.restrictions.Private;") ""))
2643 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2645 (("import ch.rinn.restrictions.Friend;") ""))
2647 (add-before 'configure 'build-native-code
2648 (lambda* (#:key inputs #:allow-other-keys)
2649 (let ((jdk (assoc-ref inputs "jdk"))
2650 (dir ,(match (%current-system)
2653 ((or "armhf-linux" "aarch64-linux")
2655 ((or "x86_64-linux")
2657 (_ "unknown-Linux"))))
2658 (with-directory-excursion "source/c"
2659 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2660 (string-append "-I" jdk "/include")
2661 (string-append "-I" jdk "/include/linux")
2663 (invoke "gcc" "-shared" "-O3" "-fPIC"
2664 "-DMACHINE_BYTE_ORDER=1"
2672 (string-append "-I" jdk "/include")
2673 (string-append "-I" jdk "/include/linux")
2674 "-o" "libnativedata.so"))
2675 (install-file "source/c/libunix.so"
2676 (string-append "libs/native/unix/" dir))
2677 (install-file "source/c/libnativedata.so"
2678 (string-append "libs/native/nativedata/" dir))
2680 ;; In the "check" phase we only build the test executable.
2681 (add-after 'check 'run-tests
2683 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2684 (delete-file "targets/dist/sis-base-test.jar")
2686 (replace 'install (install-jars "targets/dist")))))
2688 `(("jdk" ,icedtea-8)
2689 ("java-commons-lang" ,java-commons-lang)
2690 ("java-commons-io" ,java-commons-io)
2691 ("java-testng" ,java-testng)
2696 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2697 "base/tags/release/"
2698 (version-major+minor base-version)
2700 "/build_resources/"))
2701 (revision revision)))
2704 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2705 (home-page "http://svnsis.ethz.ch")
2706 (synopsis "Utility classes for libraries from ETH Zurich")
2707 (description "This library supplies some utility classes needed for
2708 libraries from the SIS division at ETH Zurich like jHDF5.")
2709 ;; The C sources are under a non-copyleft license, which looks like a
2710 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2711 (license (list license:asl2.0
2712 (license:non-copyleft "file://source/c/COPYING"))))))
2714 (define-public java-cisd-args4j
2715 (let ((revision 39162)
2716 (base-version "9.11.2"))
2718 (name "java-cisd-args4j")
2719 (version (string-append base-version "-" (number->string revision)))
2723 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2724 "args4j/tags/release/"
2725 (version-major+minor base-version)
2726 ".x/" base-version "/args4j/"))
2727 (revision revision)))
2728 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2731 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2732 (build-system ant-build-system)
2734 `(#:make-flags '("-file" "build/build.xml")
2735 #:tests? #f ; there are no tests
2736 ;; There are weird build failures with JDK8, such as: "The type
2737 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2738 ;; referenced from required .class files"
2740 #:modules ((guix build ant-build-system)
2742 (guix build java-utils)
2747 (modify-phases %standard-phases
2748 (add-after 'unpack 'unpack-build-resources
2749 (lambda* (#:key inputs #:allow-other-keys)
2750 (mkdir-p "../build_resources")
2751 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2752 "-C" "../build_resources"
2753 "--strip-components=1")
2754 (mkdir-p "../build_resources/lib")
2756 (add-after 'unpack-build-resources 'fix-dependencies
2757 (lambda* (#:key inputs #:allow-other-keys)
2758 ;; FIXME: There should be a more convenient abstraction for
2759 ;; editing XML files.
2760 (with-directory-excursion "../build_resources/ant/"
2761 (chmod "build-common.xml" #o664)
2762 (call-with-output-file "build-common.xml.new"
2766 (with-input-from-file "build-common.xml"
2767 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2768 `(;; Remove dependency on classycle and custom ant tasks
2769 (taskdef . ,(lambda (tag . kids)
2770 (let ((name ((sxpath '(name *text*)) kids)))
2771 (if (or (member "build-info" name)
2772 (member "dependency-checker" name)
2773 (member "build-java-subprojects" name)
2774 (member "project-classpath" name))
2777 (typedef . ,(lambda (tag . kids)
2778 (let ((name ((sxpath '(name *text*)) kids)))
2779 (if (member "recursive-jar" name)
2782 (build-java-subprojects . ,(lambda _ '()))
2783 ;; Ignore everything else
2784 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2785 (*text* . ,(lambda (_ txt) txt))))
2787 (rename-file "build-common.xml.new" "build-common.xml"))
2788 (substitute* "build/build.xml"
2789 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2790 (string-append (assoc-ref inputs "java-cisd-base")
2791 "/share/java/sis-base.jar"))
2792 ;; Remove dependency on svn
2793 (("<build-info.*") "")
2794 (("\\$\\{revision.number\\}")
2795 ,(number->string revision))
2796 (("\\$\\{version.number\\}") ,base-version)
2797 ;; Don't use custom ant tasks.
2798 (("recursive-jar") "jar")
2799 (("<project-classpath.*") ""))
2801 (replace 'install (install-jars "targets/dist")))))
2803 `(("java-cisd-base" ,java-cisd-base)))
2805 `(("ecj" ,java-ecj-3.5)
2810 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2811 "args4j/tags/release/"
2812 (version-major+minor base-version)
2814 "/build_resources/"))
2815 (revision revision)))
2818 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2819 (modules '((guix build utils)))
2820 ;; Delete bundled pre-built jars.
2822 '(begin (delete-file-recursively "lib/") #t))))))
2823 (home-page "http://svnsis.ethz.ch")
2824 (synopsis "Command line parser library")
2825 (description "This package provides a parser for command line arguments.")
2826 (license license:asl2.0))))
2828 (define-public java-cisd-jhdf5
2829 (let ((revision 39162)
2830 (base-version "14.12.6"))
2832 (name "java-cisd-jhdf5")
2833 (version (string-append base-version "-" (number->string revision)))
2837 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2838 "jhdf5/tags/release/"
2839 (version-major+minor base-version)
2840 ".x/" base-version "/jhdf5/"))
2841 (revision revision)))
2842 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2845 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2846 (modules '((guix build utils)))
2849 ;; Delete included gradle jar
2850 (delete-file-recursively "gradle/wrapper")
2851 ;; Delete pre-built native libraries
2852 (delete-file-recursively "libs")
2854 (build-system ant-build-system)
2856 `(#:make-flags '("-file" "build/build.xml")
2857 #:build-target "jar-all"
2858 #:test-target "jar-test"
2861 (modify-phases %standard-phases
2862 ;; FIXME: this build phase fails.
2863 (delete 'generate-jar-indices)
2864 ;; Don't erase results from the build phase when building tests.
2865 (add-after 'unpack 'separate-test-target-from-clean
2867 (substitute* "build/build.xml"
2868 (("\"jar-test\" depends=\"clean, ")
2869 "\"jar-test\" depends=\""))
2871 (add-after 'unpack 'unpack-build-resources
2872 (lambda* (#:key inputs #:allow-other-keys)
2873 (copy-recursively (assoc-ref inputs "build-resources")
2874 "../build_resources")
2875 (delete-file-recursively "../build_resources/lib/")
2876 (mkdir-p "../build_resources/lib")
2877 ;; Remove dependency on classycle
2878 (substitute* "../build_resources/ant/build-common.xml"
2879 (("<taskdef name=\"dependency-checker.*") "")
2880 (("classname=\"classycle.*") "")
2881 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2882 ;; Remove dependency on svn
2883 (substitute* "build/build.xml"
2884 (("<build-info.*") "")
2885 (("\\$\\{revision.number\\}")
2886 ,(number->string revision))
2887 (("\\$\\{version.number\\}") ,base-version))
2889 (add-after 'unpack-build-resources 'fix-dependencies
2890 (lambda* (#:key inputs #:allow-other-keys)
2891 (substitute* "../build_resources/ant/build-common.xml"
2892 (("../libraries/testng/testng-jdk15.jar")
2893 (string-append (assoc-ref inputs "java-testng")
2894 "/share/java/java-testng.jar")))
2895 (substitute* "build/build.xml"
2896 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2897 (string-append (assoc-ref inputs "java-cisd-base")
2898 "/share/java/sis-base.jar"))
2899 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2900 (string-append (assoc-ref inputs "java-cisd-args4j")
2901 "/share/java/cisd-args4j.jar"))
2902 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2903 (string-append (assoc-ref inputs "java-commons-lang")
2904 "/share/java/commons-lang-"
2905 ,(package-version java-commons-lang) ".jar"))
2906 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2907 (string-append (assoc-ref inputs "java-commons-io")
2908 "/share/java/commons-io-"
2909 ,(package-version java-commons-io)
2911 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2912 (string-append (assoc-ref inputs "java-testng")
2913 "/share/java/java-testng.jar"))
2914 (("\\$\\{lib\\}/junit4/junit.jar")
2915 (string-append (assoc-ref inputs "java-junit")
2916 "/share/java/junit.jar"))
2917 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2918 (string-append (assoc-ref inputs "java-hamcrest-core")
2919 "/share/java/hamcrest-core.jar")))
2920 ;; Remove dependency on ch.rinn.restrictions
2921 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2922 (substitute* '("BitSetConversionUtils.java"
2924 (("import ch.rinn.restrictions.Private;") "")
2926 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2927 (substitute* '("BitSetConversionTest.java"
2928 "h5ar/HDF5ArchiverTest.java")
2929 (("import ch.rinn.restrictions.Friend;") "")
2931 ;; Remove leftovers from removing @Friend
2932 (substitute* "h5ar/HDF5ArchiverTest.java"
2933 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2936 (add-before 'configure 'build-native-library
2937 (lambda* (#:key inputs #:allow-other-keys)
2938 (let ((jdk (assoc-ref inputs "jdk"))
2939 (hdf5 (assoc-ref inputs "hdf5"))
2940 (dir ,(match (%current-system)
2943 ((or "armhf-linux" "aarch64-linux")
2945 ((or "x86_64-linux")
2947 (_ "unknown-Linux"))))
2948 (with-directory-excursion "source/c"
2949 (apply invoke `("gcc" "-shared" "-O3"
2951 "-Wl,--exclude-libs,ALL"
2952 ,@(find-files "jhdf5" "\\.c$")
2953 ,@(find-files "hdf-java" "\\.c$")
2954 ,(string-append "-I" hdf5 "/include")
2955 ,(string-append "-I" jdk "/include")
2956 ,(string-append "-I" jdk "/include/linux")
2957 ,(string-append hdf5 "/lib/libhdf5.a")
2958 "-o" "libjhdf5.so" "-lz")))
2959 (install-file "source/c/libjhdf5.so"
2960 (string-append "libs/native/jhdf5/" dir))
2962 ;; In the "check" phase we only build the test executable.
2963 (add-after 'check 'run-tests
2965 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2966 (delete-file "targets/dist/sis-jhdf5-test.jar")
2969 (install-jars "targets/dist")))))
2971 `(("java-cisd-base" ,java-cisd-base)
2972 ("java-cisd-args4j" ,java-cisd-args4j)
2973 ("java-commons-lang" ,java-commons-lang)
2974 ("java-commons-io" ,java-commons-io)
2978 `(("jdk" ,icedtea-8)
2979 ("java-testng" ,java-testng)
2980 ("java-junit" ,java-junit)
2981 ("java-jmock" ,java-jmock)
2982 ("java-hamcrest-core" ,java-hamcrest-core)
2987 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2988 "jhdf5/tags/release/"
2989 (version-major+minor base-version)
2991 "/build_resources/"))
2992 (revision revision)))
2995 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2996 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2997 (synopsis "Java binding for HDF5")
2998 (description "JHDF5 is a high-level API in Java for reading and writing
2999 HDF5 files, building on the libraries provided by the HDF Group.")
3000 ;; The C sources are under a non-copyleft license, which looks like a
3001 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3002 (license (list license:asl2.0
3003 (license:non-copyleft "file://source/c/COPYING"))))))
3005 (define-public java-classpathx-servletapi
3007 (name "java-classpathx-servletapi")
3011 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3012 "servletapi-" version ".tar.gz"))
3015 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3016 (build-system ant-build-system)
3018 `(#:tests? #f ; there is no test target
3019 #:build-target "compile"
3021 (list "-Dbuild.compiler=javac1.8"
3022 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3024 (modify-phases %standard-phases
3026 (lambda* (#:key make-flags #:allow-other-keys)
3027 (apply invoke `("ant" "dist" ,@make-flags)))))))
3028 (home-page "https://www.gnu.org/software/classpathx/")
3029 (synopsis "Java servlet API implementation")
3030 (description "This is the GNU servlet API distribution, part of the
3031 ClasspathX project. It provides implementations of version 3.0 of the servlet
3032 API and version 2.1 of the Java ServerPages API.")
3033 (license license:gpl3+)))
3035 (define-public java-javaee-servletapi
3037 (name "java-javaee-servletapi")
3041 (uri (string-append "https://github.com/javaee/servlet-spec/"
3042 "archive/" version ".zip"))
3043 (file-name (string-append name "-" version ".zip"))
3046 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
3047 (build-system ant-build-system)
3049 `(#:jar-name "javax-servletapi.jar"
3052 #:source-dir "src/main/java"))
3054 `(("unzip" ,unzip)))
3055 (home-page "https://javaee.github.io/servlet-spec/")
3056 (synopsis "Java servlet API")
3057 (description "Java Servlet is the foundation web specification in the
3058 Java Enterprise Platform. Developers can build web applications using the
3059 Servlet API to interact with the request/response workflow. This project
3060 provides information on the continued development of the Java Servlet
3062 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3063 ;; Some files are licensed under ASL 2.0.
3064 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3066 (define-public java-swt
3071 ;; The types of many variables and procedures differ in the sources
3072 ;; dependent on whether the target architecture is a 32-bit system or a
3073 ;; 64-bit system. Instead of patching the sources on demand in a build
3074 ;; phase we download either the 32-bit archive (which mostly uses "int"
3075 ;; types) or the 64-bit archive (which mostly uses "long" types).
3076 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3077 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3080 (let-values (((hash file)
3081 (match (or (%current-target-system) (%current-system))
3082 ("x86_64-linux" (values hash64 file64))
3083 (_ (values hash32 file32)))))
3087 "http://download.eclipse.org/eclipse/downloads/drops4/"
3088 "R-" version "-201710090410/swt-" version
3089 "-gtk-linux-" file ".zip"))
3090 (sha256 (base32 hash))))))
3091 (build-system ant-build-system)
3093 `(#:jar-name "swt.jar"
3095 #:tests? #f ; no "check" target
3097 (modify-phases %standard-phases
3099 (lambda* (#:key source #:allow-other-keys)
3101 (invoke "unzip" source "-d" "swt")
3104 (invoke "unzip" "src.zip" "-d" "src")))
3105 ;; The classpath contains invalid icecat jars. Since we don't need
3106 ;; anything other than the JDK on the classpath, we can simply unset
3108 (add-after 'configure 'unset-classpath
3109 (lambda _ (unsetenv "CLASSPATH") #t))
3110 (add-before 'build 'build-native
3111 (lambda* (#:key inputs outputs #:allow-other-keys)
3112 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3113 ;; Build shared libraries. Users of SWT have to set the system
3114 ;; property swt.library.path to the "lib" directory of this
3117 (setenv "OUTPUT_DIR" lib)
3118 (with-directory-excursion "src"
3119 (invoke "bash" "build.sh")))))
3120 (add-after 'install 'install-native
3121 (lambda* (#:key outputs #:allow-other-keys)
3122 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3123 (for-each (lambda (file)
3124 (install-file file lib))
3125 (find-files "." "\\.so$"))
3129 ("libxtst" ,libxtst)
3134 `(("pkg-config" ,pkg-config)
3136 (home-page "https://www.eclipse.org/swt/")
3137 (synopsis "Widget toolkit for Java")
3139 "SWT is a widget toolkit for Java designed to provide efficient, portable
3140 access to the user-interface facilities of the operating systems on which it
3142 ;; SWT code is licensed under EPL1.0
3143 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3144 ;; Cairo bindings contain code under MPL1.1
3145 ;; XULRunner 1.9 bindings contain code under MPL2.0
3150 license:lgpl2.1+))))
3152 (define-public java-xz
3158 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3161 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3162 (build-system ant-build-system)
3164 `(#:tests? #f ; There are no tests to run.
3165 #:jar-name ,(string-append "xz-" version ".jar")
3167 (modify-phases %standard-phases
3168 ;; The unpack phase enters the "maven" directory by accident.
3169 (add-after 'unpack 'chdir
3170 (lambda _ (chdir "..") #t)))))
3172 `(("unzip" ,unzip)))
3173 (home-page "https://tukaani.org/xz/java.html")
3174 (synopsis "Implementation of XZ data compression in pure Java")
3175 (description "This library aims to be a complete implementation of XZ data
3176 compression in pure Java. Single-threaded streamed compression and
3177 decompression and random access decompression have been fully implemented.")
3178 (license license:public-domain)))
3180 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3181 ;; of the latest release.
3182 (define-public java-qdox-1.12
3188 (uri (string-append "http://central.maven.org/maven2/"
3189 "com/thoughtworks/qdox/qdox/" version
3190 "/qdox-" version "-sources.jar"))
3193 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3194 (build-system ant-build-system)
3196 `(;; Tests require junit
3198 #:jar-name "qdox.jar"
3200 (modify-phases %standard-phases
3202 (lambda* (#:key source #:allow-other-keys)
3204 (with-directory-excursion "src"
3205 (invoke "jar" "-xf" source))))
3206 ;; At this point we don't have junit, so we must remove the API
3208 (add-after 'unpack 'delete-tests
3210 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3212 (home-page "http://qdox.codehaus.org/")
3213 (synopsis "Parse definitions from Java source files")
3215 "QDox is a high speed, small footprint parser for extracting
3216 class/interface/method definitions from source files complete with JavaDoc
3217 @code{@@tags}. It is designed to be used by active code generators or
3218 documentation tools.")
3219 (license license:asl2.0)))
3221 (define-public java-jarjar
3223 (name "java-jarjar")
3228 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3229 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3232 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3233 (modules '((guix build utils)))
3236 ;; Delete bundled thirds-party jar archives.
3237 ;; TODO: unbundle maven-plugin-api.
3238 (delete-file "lib/asm-4.0.jar")
3239 (delete-file "lib/asm-commons-4.0.jar")
3240 (delete-file "lib/junit-4.8.1.jar")
3242 (build-system ant-build-system)
3244 `(;; Tests require junit, which ultimately depends on this package.
3246 #:build-target "jar"
3248 (modify-phases %standard-phases
3249 (add-before 'build 'do-not-use-bundled-asm
3250 (lambda* (#:key inputs #:allow-other-keys)
3251 (substitute* "build.xml"
3252 (("<path id=\"path.build\">")
3253 (string-append "<path id=\"path.build\"><fileset dir=\""
3254 (assoc-ref inputs "java-asm-bootstrap")
3255 "/share/java\" includes=\"**/*.jar\"/>"))
3256 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3257 (("lib/asm-commons-4.0.jar")
3258 (string-append (assoc-ref inputs "java-asm-bootstrap")
3259 "/share/java/asm-6.0.jar"))
3260 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3261 (string-append "<include name=\"org/objectweb/asm/"
3262 "commons/Remap*.class\"/>"
3263 "<include name=\"org/objectweb/asm/*.class\"/>"
3264 "<include name=\"org/objectweb/asm/"
3265 "signature/*.class\"/>"
3266 "<include name=\"org/objectweb/asm/"
3267 "commons/SignatureRemapper.class\"/>")))
3270 (lambda* (#:key outputs #:allow-other-keys)
3271 (let ((target (string-append (assoc-ref outputs "out")
3273 (install-file (string-append "dist/jarjar-" ,version ".jar")
3277 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3279 `(("unzip" ,unzip)))
3280 (home-page "https://code.google.com/archive/p/jarjar/")
3281 (synopsis "Repackage Java libraries")
3283 "Jar Jar Links is a utility that makes it easy to repackage Java
3284 libraries and embed them into your own distribution. Jar Jar Links includes
3285 an Ant task that extends the built-in @code{jar} task.")
3286 (license license:asl2.0)))
3288 (define-public java-hamcrest-core
3290 (name "java-hamcrest-core")
3294 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3295 "archive/hamcrest-java-" version ".tar.gz"))
3298 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3299 (modules '((guix build utils)))
3302 ;; Delete bundled thirds-party jar archives.
3303 (delete-file-recursively "lib")
3305 (build-system ant-build-system)
3307 `(#:tests? #f ; Tests require junit
3308 #:modules ((guix build ant-build-system)
3311 #:make-flags (list (string-append "-Dversion=" ,version))
3312 #:test-target "unit-test"
3313 #:build-target "core"
3315 (modify-phases %standard-phases
3316 ;; Disable unit tests, because they require junit, which requires
3317 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3318 ;; attribute from the manifest for reproducibility.
3319 (add-before 'configure 'patch-build.xml
3321 (substitute* "build.xml"
3322 (("unit-test, ") "")
3323 (("\\$\\{build.timestamp\\}") "guix"))
3325 ;; Java's "getMethods()" returns methods in an unpredictable order.
3326 ;; To make the output of the generated code deterministic we must
3327 ;; sort the array of methods.
3328 (add-after 'unpack 'make-method-order-deterministic
3330 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3331 (("import java\\.util\\.Iterator;" line)
3332 (string-append line "\n"
3333 "import java.util.Arrays; import java.util.Comparator;"))
3334 (("allMethods = cls\\.getMethods\\(\\);" line)
3335 (string-append "_" line
3337 private Method[] getSortedMethods() {
3338 Arrays.sort(_allMethods, new Comparator<Method>() {
3340 public int compare(Method a, Method b) {
3341 return a.toString().compareTo(b.toString());
3347 private Method[] allMethods = getSortedMethods();")))
3349 (add-before 'build 'do-not-use-bundled-qdox
3350 (lambda* (#:key inputs #:allow-other-keys)
3351 (substitute* "build.xml"
3352 (("lib/generator/qdox-1.12.jar")
3353 (string-append (assoc-ref inputs "java-qdox-1.12")
3354 "/share/java/qdox.jar")))
3356 ;; build.xml searches for .jar files in this directoy, which
3357 ;; we remove from the source archive.
3358 (add-before 'build 'create-dummy-directories
3360 (mkdir-p "lib/integration")
3363 (lambda* (#:key outputs #:allow-other-keys)
3364 (let* ((target (string-append (assoc-ref outputs "out")
3366 (version-suffix ,(string-append "-" version ".jar"))
3367 (install-without-version-suffix
3370 (string-append target
3371 (basename jar version-suffix)
3375 install-without-version-suffix
3378 (and (string-suffix? ".jar" name)
3379 (not (string-suffix? "-sources.jar" name)))))))
3382 `(("java-qdox-1.12" ,java-qdox-1.12)
3383 ("java-jarjar" ,java-jarjar)))
3384 (home-page "http://hamcrest.org/")
3385 (synopsis "Library of matchers for building test expressions")
3387 "This package provides a library of matcher objects (also known as
3388 constraints or predicates) allowing @code{match} rules to be defined
3389 declaratively, to be used in other frameworks. Typical scenarios include
3390 testing frameworks, mocking libraries and UI validation rules.")
3391 (license license:bsd-2)))
3393 (define-public java-junit
3399 (uri (string-append "https://github.com/junit-team/junit/"
3400 "archive/r" version ".tar.gz"))
3401 (file-name (string-append name "-" version ".tar.gz"))
3404 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3405 (modules '((guix build utils)))
3408 ;; Delete bundled jar archives.
3409 (delete-file-recursively "lib")
3411 (build-system ant-build-system)
3413 `(#:tests? #f ; no tests
3414 #:jar-name "junit.jar"))
3416 `(("java-hamcrest-core" ,java-hamcrest-core)))
3417 (home-page "http://junit.org/")
3418 (synopsis "Test framework for Java")
3420 "JUnit is a simple framework to write repeatable tests for Java projects.
3421 JUnit provides assertions for testing expected results, test fixtures for
3422 sharing common test data, and test runners for running tests.")
3423 (license license:epl1.0)))
3425 (define-public java-plexus-utils
3427 (name "java-plexus-utils")
3431 (uri (string-append "https://github.com/codehaus-plexus/"
3432 "plexus-utils/archive/plexus-utils-"
3436 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3437 (build-system ant-build-system)
3438 ;; FIXME: The default build.xml does not include a target to install
3441 `(#:jar-name "plexus-utils.jar"
3442 #:source-dir "src/main"
3444 (modify-phases %standard-phases
3445 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3447 (substitute* "src/main/java/org/codehaus/plexus/util/\
3448 cli/shell/BourneShell.java"
3449 (("/bin/sh") (which "sh"))
3450 (("/usr/") (getcwd)))
3452 (add-after 'unpack 'fix-or-disable-broken-tests
3454 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3455 (substitute* '("cli/CommandlineTest.java"
3456 "cli/shell/BourneShellTest.java")
3457 (("/bin/sh") (which "sh"))
3458 (("/bin/echo") (which "echo")))
3460 ;; This test depends on MavenProjectStub, but we don't have
3461 ;; a package for Maven.
3462 (delete-file "introspection/ReflectionValueExtractorTest.java")
3464 ;; FIXME: The command line tests fail, maybe because they use
3466 (delete-file "cli/CommandlineTest.java"))
3469 `(("java-hamcrest-core" ,java-hamcrest-core)
3470 ("java-junit" ,java-junit)))
3471 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3472 (synopsis "Common utilities for the Plexus framework")
3473 (description "This package provides various Java utility classes for the
3474 Plexus framework to ease working with strings, files, command lines, XML and
3476 (license license:asl2.0)))
3478 (define-public java-plexus-interpolation
3480 (name "java-plexus-interpolation")
3484 (uri (string-append "https://github.com/codehaus-plexus/"
3485 "plexus-interpolation/archive/"
3486 "plexus-interpolation-" version ".tar.gz"))
3489 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3490 (build-system ant-build-system)
3492 `(#:jar-name "plexus-interpolation.jar"
3493 #:source-dir "src/main"))
3495 `(("java-junit" ,java-junit)
3496 ("java-hamcrest-core" ,java-hamcrest-core)))
3497 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3498 (synopsis "Java components for interpolating ${} strings and the like")
3499 (description "Plexus interpolator is a modular, flexible interpolation
3500 framework for the expression language style commonly seen in Maven, Plexus,
3501 and other related projects.
3503 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3504 package within @code{plexus-utils}, but has been separated in order to allow
3505 these two libraries to vary independently of one another.")
3506 (license license:asl2.0)))
3508 (define-public java-plexus-classworlds
3510 (name "java-plexus-classworlds")
3514 (uri (string-append "https://github.com/codehaus-plexus/"
3515 "plexus-classworlds/archive/plexus-classworlds-"
3519 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3520 (build-system ant-build-system)
3522 `(#:jar-name "plexus-classworlds.jar"
3523 #:source-dir "src/main"
3524 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3526 `(("java-junit" ,java-junit)))
3527 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3528 (synopsis "Java class loader framework")
3529 (description "Plexus classworlds replaces the native @code{ClassLoader}
3530 mechanism of Java. It is especially useful for dynamic loading of application
3532 (license license:asl2.0)))
3534 (define java-plexus-container-default-bootstrap
3536 (name "java-plexus-container-default-bootstrap")
3540 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3541 "/archive/plexus-containers-" version ".tar.gz"))
3544 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3545 (build-system ant-build-system)
3547 `(#:jar-name "container-default.jar"
3548 #:source-dir "plexus-container-default/src/main/java"
3549 #:test-dir "plexus-container-default/src/test"
3551 #:tests? #f; requires plexus-archiver, which depends on this package
3553 (modify-phases %standard-phases
3554 (add-before 'build 'copy-resources
3557 "plexus-container-default/src/main/resources/"
3561 `(("worldclass" ,java-plexus-classworlds)
3562 ("xbean" ,java-geronimo-xbean-reflect)
3563 ("utils" ,java-plexus-utils)
3564 ("junit" ,java-junit)
3565 ("guava" ,java-guava)))
3566 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3567 (synopsis "Inversion-of-control container")
3568 (description "Plexus-default-container is Plexus' inversion-of-control
3569 (@dfn{IoC}) container. It is composed of its public API and its default
3571 (license license:asl2.0)))
3573 (define-public java-plexus-io
3575 (name "java-plexus-io")
3579 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3580 "/archive/plexus-io-" version ".tar.gz"))
3583 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3584 (build-system ant-build-system)
3586 `(#:jar-name "plexus-io.jar"
3587 #:source-dir "src/main/java"
3588 #:test-dir "src/test"
3591 (modify-phases %standard-phases
3592 (add-before 'build 'copy-resources
3594 (mkdir-p "build/classes/META-INF/plexus")
3595 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3596 "build/classes/META-INF/plexus/components.xml")
3599 `(("utils" ,java-plexus-utils)
3600 ("commons-io" ,java-commons-io)
3601 ("java-jsr305" ,java-jsr305)))
3603 `(("junit" ,java-junit)
3604 ("hamcrest" ,java-hamcrest-core)
3605 ("guava" ,java-guava)
3606 ("classworlds" ,java-plexus-classworlds)
3607 ("xbean" ,java-geronimo-xbean-reflect)
3608 ("container-default" ,java-plexus-container-default-bootstrap)))
3609 (home-page "https://github.com/codehaus-plexus/plexus-io")
3610 (synopsis "I/O plexus components")
3611 (description "Plexus IO is a set of plexus components, which are designed
3612 for use in I/O operations. This implementation using plexus components allows
3613 reusing it in maven.")
3614 (license license:asl2.0)))
3616 (define-public java-plexus-archiver
3618 (name "java-plexus-archiver")
3622 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3623 "/archive/plexus-archiver-" version ".tar.gz"))
3626 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3627 (build-system ant-build-system)
3629 `(#:jar-name "plexus-archiver.jar"
3630 #:source-dir "src/main/java"
3632 #:test-dir "src/test"
3633 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3635 (modify-phases %standard-phases
3636 (add-before 'check 'remove-failing
3638 ;; Requires an older version of plexus container
3640 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3642 (add-before 'check 'fix-test-building
3644 (substitute* "build.xml"
3645 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3647 (add-before 'build 'copy-resources
3649 (mkdir-p "build/classes/META-INF/plexus")
3650 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3651 "build/classes/META-INF/plexus/components.xml")
3654 `(("utils" ,java-plexus-utils)
3655 ("commons-io" ,java-commons-io)
3656 ("snappy" ,java-iq80-snappy)
3657 ("io" ,java-plexus-io)
3658 ("compress" ,java-commons-compress)
3659 ("container-default" ,java-plexus-container-default-bootstrap)
3660 ("snappy" ,java-snappy)
3661 ("java-jsr305" ,java-jsr305)))
3663 `(("java-hamcrest-core" ,java-hamcrest-core)
3664 ("junit" ,java-junit)
3665 ("classworld" ,java-plexus-classworlds)
3666 ("xbean" ,java-geronimo-xbean-reflect)
3667 ("xz" ,java-tukaani-xz)
3668 ("guava" ,java-guava)))
3669 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3670 (synopsis "Archiver component of the Plexus project")
3671 (description "Plexus-archiver contains a component to deal with project
3673 (license license:asl2.0)))
3675 (define-public java-plexus-container-default
3677 (inherit java-plexus-container-default-bootstrap)
3678 (name "java-plexus-container-default")
3680 `(#:jar-name "container-default.jar"
3681 #:source-dir "plexus-container-default/src/main/java"
3682 #:test-dir "plexus-container-default/src/test"
3683 #:test-exclude (list ;"**/*Test.java"
3685 ;; Requires plexus-hierarchy
3686 "**/PlexusHierarchyTest.java"
3688 "**/ComponentRealmCompositionTest.java"
3689 "**/PlexusContainerTest.java")
3692 (modify-phases %standard-phases
3693 (add-before 'build 'copy-resources
3696 "plexus-container-default/src/main/resources/"
3699 (add-before 'check 'fix-paths
3701 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3704 dir "/plexus/component/composition/"
3705 "ComponentRealmCompositionTest.java")
3706 (("src/test") "plexus-container-default/src/test"))
3709 `(("worldclass" ,java-plexus-classworlds)
3710 ("xbean" ,java-geronimo-xbean-reflect)
3711 ("utils" ,java-plexus-utils)
3712 ("junit" ,java-junit)
3713 ("guava" ,java-guava)))
3715 `(("archiver" ,java-plexus-archiver)
3716 ("hamcrest" ,java-hamcrest-core)))))
3718 (define-public java-plexus-component-annotations
3720 (inherit java-plexus-container-default)
3721 (name "java-plexus-component-annotations")
3723 `(#:jar-name "plexus-component-annotations.jar"
3724 #:source-dir "plexus-component-annotations/src/main/java"
3725 #:tests? #f)); no tests
3728 (synopsis "Plexus descriptors generator")
3729 (description "This package is a Maven plugin to generate Plexus descriptors
3730 from source tags and class annotations.")))
3732 (define-public java-plexus-cipher
3734 (name "java-plexus-cipher")
3738 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3739 "/archive/plexus-cipher-" version ".tar.gz"))
3742 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3743 (build-system ant-build-system)
3745 `(#:jar-name "plexus-cipher.jar"
3746 #:source-dir "src/main/java"
3748 #:tests? #f; FIXME: requires sisu-inject-bean
3750 (modify-phases %standard-phases
3751 (add-before 'build 'copy-resources
3753 (copy-recursively "src/main/resources" "build/classes")
3754 (mkdir-p "build/classes/META-INF/sisu")
3755 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3757 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3760 `(("java-cdi-api" ,java-cdi-api)
3761 ("java-javax-inject" ,java-javax-inject)))
3762 (home-page "https://github.com/sonatype/plexus-cipher")
3763 (synopsis "Encryption/decryption Component")
3764 (description "Plexus-cipher contains a component to deal with encryption
3766 (license license:asl2.0)))
3768 (define-public java-plexus-compiler-api
3770 (name "java-plexus-compiler-api")
3774 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3775 "/archive/plexus-compiler-" version ".tar.gz"))
3778 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3779 (build-system ant-build-system)
3781 `(#:jar-name "plexus-compiler-api.jar"
3782 #:source-dir "plexus-compiler-api/src/main/java"
3784 #:test-dir "plexus-compiler-api/src/test"))
3786 `(("java-plexus-container-default" ,java-plexus-container-default)
3787 ("java-plexus-util" ,java-plexus-utils)))
3789 `(("java-junit" ,java-junit)))
3790 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3791 (synopsis "Plexus Compilers component's API to manipulate compilers")
3792 (description "This package contains the API used by components to manipulate
3794 (license (list license:asl2.0
3797 (define-public java-plexus-compiler-javac
3799 (inherit java-plexus-compiler-api)
3800 (name "java-plexus-compiler-javac")
3802 `(#:jar-name "plexus-compiler-javac.jar"
3803 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3805 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3806 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3808 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3809 ("java-plexus-utils" ,java-plexus-utils)
3810 ("java-plexus-container-default" ,java-plexus-container-default)))
3812 `(("java-junit" ,java-junit)))
3813 (synopsis "Javac Compiler support for Plexus Compiler component")
3814 (description "This package contains the Javac Compiler support for Plexus
3815 Compiler component.")))
3817 (define-public java-plexus-sec-dispatcher
3819 (name "java-plexus-sec-dispatcher")
3820 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3822 ;; This project doesn't tag releases or publish tarballs, so we take
3823 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3825 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3826 "archive/7db8f88048.tar.gz"))
3829 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3830 (file-name (string-append name "-" version ".tar.gz"))))
3832 `(#:jar-name "plexus-sec-dispatcher.jar"
3833 #:source-dir "src/main/java"
3836 (modify-phases %standard-phases
3837 (add-before 'build 'generate-models
3838 (lambda* (#:key inputs #:allow-other-keys)
3839 (define (modello-single-mode file version mode)
3841 "org.codehaus.modello.ModelloCli"
3842 file mode "src/main/java" version
3844 (let ((file "src/main/mdo/settings-security.mdo"))
3845 (modello-single-mode file "1.0.0" "java")
3846 (modello-single-mode file "1.0.0" "xpp3-reader")
3847 (modello-single-mode file "1.0.0" "xpp3-writer"))
3849 (add-before 'build 'generate-components.xml
3851 (mkdir-p "build/classes/META-INF/plexus")
3852 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3858 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3859 <role-hint>default</role-hint>\n
3860 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3861 <description></description>\n
3864 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3865 <field-name>_cipher</field-name>\n
3868 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3869 <field-name>_decryptors</field-name>\n
3873 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3877 </component-set>\n")))
3879 (add-before 'check 'fix-paths
3881 (copy-recursively "src/test/resources" "target")
3884 `(("java-plexus-cipher" ,java-plexus-cipher)))
3886 `(("java-modello-core" ,java-modello-core)
3888 ("java-plexus-container-default" ,java-plexus-container-default)
3889 ("java-plexus-classworlds" ,java-plexus-classworlds)
3890 ("java-plexus-utils" ,java-plexus-utils)
3891 ("java-guava" ,java-guava)
3892 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3893 ("java-sisu-build-api" ,java-sisu-build-api)
3895 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3896 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3897 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3899 ("java-junit" ,java-junit)))
3900 (build-system ant-build-system)
3901 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3902 (synopsis "Plexus Security Dispatcher Component")
3903 (description "This package is the Plexus Security Dispatcher Component.
3904 This component decrypts a string passed to it.")
3905 (license license:asl2.0)))
3907 (define-public java-plexus-cli
3909 (name "java-plexus-cli")
3914 (url "https://github.com/sonatype/plexus-cli")
3915 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3916 (file-name (string-append name "-" version))
3919 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3920 (build-system ant-build-system)
3922 `(#:jar-name "plexus-cli.jar"
3923 #:source-dir "src/main/java"
3925 #:test-dir "src/test"))
3927 `(("java-commons-cli" ,java-commons-cli)
3928 ("java-plexus-container-default" ,java-plexus-container-default)
3929 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3931 `(("java-plexus-utils" ,java-plexus-utils)
3932 ("java-junit" ,java-junit)
3933 ("java-guava" ,java-guava)))
3934 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3935 (synopsis "CLI building library for plexus")
3936 (description "This package is a library to help creating CLI around
3937 Plexus components.")
3938 (license license:asl2.0)))
3940 (define-public java-sisu-build-api
3942 (name "java-sisu-build-api")
3946 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3947 "archive/plexus-build-api-" version ".tar.gz"))
3950 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3951 (build-system ant-build-system)
3953 `(#:jar-name "sisu-build-api.jar"
3954 #:source-dir "src/main/java"
3956 #:tests? #f; FIXME: how to run the tests?
3958 (modify-phases %standard-phases
3959 (add-before 'build 'copy-resources
3961 (copy-recursively "src/main/resources" "build/classes")
3962 (substitute* (find-files "build/classes")
3963 (("\\$\\{project.version\\}") ,version))
3965 (add-before 'build 'generate-plexus-compontent
3967 (mkdir-p "build/classes/META-INF/plexus")
3968 ;; This file is required for plexus to inject this package.
3969 ;; FIXME: how is it generated?
3970 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3976 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3977 <role-hint>default</role-hint>\n
3978 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3979 <description>Filesystem based non-incremental build context implementation\n
3980 which behaves as if all files were just created.</description>\n
3983 </component-set>\n")))
3986 `(("java-plexus-utils" ,java-plexus-utils)
3987 ("java-plexus-container-default" ,java-plexus-container-default)))
3988 (home-page "https://github.com/sonatype/sisu-build-api/")
3989 (synopsis "Base build API for maven")
3990 (description "This package contains the base build API for maven and
3991 a default implementation of it. This API is about scanning files in a
3992 project and determining what files need to be rebuilt.")
3993 (license license:asl2.0)))
3995 (define-public java-modello-core
3997 (name "java-modello-core")
4001 (uri (string-append "https://github.com/codehaus-plexus/modello"
4002 "/archive/modello-" version ".tar.gz"))
4005 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
4006 (build-system ant-build-system)
4008 `(#:jar-name "modello-core.jar"
4009 #:source-dir "modello-core/src/main/java"
4010 #:test-dir "modello-core/src/test"
4011 #:main-class "org.codehaus.modello.ModelloCli"
4014 (modify-phases %standard-phases
4015 (add-before 'build 'copy-resources
4017 (mkdir-p "build/classes/META-INF/plexus")
4018 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4019 "build/classes/META-INF/plexus/components.xml")
4021 (add-before 'check 'fix-tests
4023 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4024 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4025 "modello/core/io/ModelReaderTest.java")
4026 (("src/test") "modello-core/src/test")))
4029 `(("java-plexus-utils" ,java-plexus-utils)
4030 ("java-plexus-container-default" ,java-plexus-container-default)
4031 ("java-sisu-build-api" ,java-sisu-build-api)))
4033 `(("java-junit" ,java-junit)
4034 ("java-plexus-classworlds" ,java-plexus-classworlds)
4035 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4036 ("java-guava" ,java-guava)))
4037 (home-page "http://codehaus-plexus.github.io/modello/")
4038 (synopsis "Framework for code generation from a simple model")
4039 (description "Modello is a framework for code generation from a simple model.
4041 Modello generates code from a simple model format: based on a plugin
4042 architecture, various types of code and descriptors can be generated from the
4043 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4044 XSD and documentation.")
4047 ;; Although this package uses only files licensed under expat,
4048 ;; other parts of the source are licensed under different
4049 ;; licenses. We include them to be inherited by other packages.
4051 ;; Some files in modello-plugin-java are licensed under a
4052 ;; 5-clause BSD license.
4053 (license:non-copyleft
4054 (string-append "file:///modello-plugins/modello-plugin-java/"
4055 "src/main/java/org/codehaus/modello/plugin/"
4056 "java/javasource/JNaming.java"))))))
4058 (define-public java-modello-plugins-java
4060 (inherit java-modello-core)
4061 (name "java-modello-plugins-java")
4063 `(#:jar-name "modello-plugins-java.jar"
4064 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4065 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4067 #:tests? #f; requires maven-model, which depends on this package
4069 (modify-phases %standard-phases
4070 (add-before 'build 'copy-resources
4072 (mkdir-p "build/classes")
4073 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4077 `(("java-modello-core" ,java-modello-core)
4078 ,@(package-inputs java-modello-core)))
4079 (synopsis "Modello Java Plugin")
4080 (description "Modello Java Plugin generates Java objects for the model.")))
4082 (define-public java-modello-plugins-xml
4084 (inherit java-modello-core)
4085 (name "java-modello-plugins-xml")
4087 `(#:jar-name "modello-plugins-xml.jar"
4088 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4089 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4092 (modify-phases %standard-phases
4093 (add-before 'build 'copy-resources
4095 (mkdir-p "build/classes")
4097 "modello-plugins/modello-plugin-xml/src/main/resources"
4100 (add-before 'check 'fix-paths
4102 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4104 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4105 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4108 `(("java-modello-core" ,java-modello-core)
4109 ("java-modello-plugins-java" ,java-modello-plugins-java)
4110 ,@(package-inputs java-modello-core)))
4111 (synopsis "Modello XML Plugin")
4112 (description "Modello XML Plugin contains shared code for every plugins
4113 working on XML representation of the model.")))
4115 (define-public java-modello-test
4117 (inherit java-modello-core)
4118 (name "java-modello-test")
4120 `(#:jar-name "modello-test.jar"
4121 #:source-dir "modello-test/src/main/java"
4122 #:tests? #f; no tests
4125 `(("java-plexus-utils" ,java-plexus-utils)
4126 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4127 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4128 ("java-plexus-container-default" ,java-plexus-container-default)))
4129 (synopsis "Modello test package")
4130 (description "The modello test package contains the basis to create
4131 Modello generator unit-tests, including sample models and xml files to test
4132 every feature for every plugin.")))
4134 (define-public java-modello-plugins-xpp3
4136 (inherit java-modello-core)
4137 (name "java-modello-plugins-xpp3")
4139 `(#:jar-name "modello-plugins-xpp3.jar"
4140 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4141 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4142 ;; One of the test dependencies is maven-model which depends on this package.
4146 (modify-phases %standard-phases
4147 (add-before 'build 'copy-resources
4149 (mkdir-p "build/classes")
4150 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4154 `(("java-modello-core" ,java-modello-core)
4155 ("java-modello-plugins-java" ,java-modello-plugins-java)
4156 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4157 ,@(package-inputs java-modello-core)))
4159 `(("java-xmlunit" ,java-xmlunit)
4160 ("java-modello-test" ,java-modello-test)
4161 ,@(package-native-inputs java-modello-core)))
4162 (synopsis "Modello XPP3 Plugin")
4163 (description "The modello XPP3 plugin generates XML readers and writers based
4164 on the XPP3 API (XML Pull Parser).")))
4166 (define-public java-asm
4172 (uri (string-append "http://download.forge.ow2.org/asm/"
4173 "asm-" version ".tar.gz"))
4176 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4177 (build-system ant-build-system)
4179 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4180 ("java-aqute-libg" ,java-aqute-libg)))
4182 `(#:build-target "compile"
4183 ;; The tests require an old version of Janino, which no longer compiles
4188 ;; We don't need these extra ant tasks, but the build system asks us to
4189 ;; provide a path anyway.
4190 "-Dobjectweb.ant.tasks.path=dummy-path"
4191 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4192 ;; used during the build automatically by ant-build-system, but
4193 ;; java-asm's build.xml fails unless we provide something here.
4194 "-Dbiz.aQute.bnd.path=dummy-path")
4196 (modify-phases %standard-phases
4197 (add-before 'install 'build-jars
4198 (lambda* (#:key make-flags #:allow-other-keys)
4199 ;; We cannot use the "jar" target because it depends on a couple
4200 ;; of unpackaged, complicated tools.
4203 "-cf" (string-append "dist/asm-" ,version ".jar")
4204 "-C" "output/build/tmp" ".")))
4206 (install-jars "dist")))))
4208 `(("java-junit" ,java-junit)))
4209 (home-page "http://asm.ow2.org/")
4210 (synopsis "Very small and fast Java bytecode manipulation framework")
4211 (description "ASM is an all purpose Java bytecode manipulation and
4212 analysis framework. It can be used to modify existing classes or dynamically
4213 generate classes, directly in binary form. The provided common
4214 transformations and analysis algorithms allow to easily assemble custom
4215 complex transformations and code analysis tools.")
4216 (license license:bsd-3)))
4218 (define java-asm-bootstrap
4221 (name "java-asm-bootstrap")
4223 (substitute-keyword-arguments (package-arguments java-asm)
4227 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4228 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4229 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4230 (delete `("java-aqute-libg" ,java-aqute-libg)
4231 (package-inputs java-asm)))))))
4233 (define-public java-cglib
4241 (url "https://github.com/cglib/cglib.git")
4242 (commit (string-append
4244 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4246 (file-name (git-file-name name version))
4248 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4249 (build-system ant-build-system)
4251 `(;; FIXME: tests fail because junit runs
4252 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4253 ;; to describe a test at all.
4255 #:jar-name "cglib.jar"
4257 (modify-phases %standard-phases
4258 (add-after 'unpack 'chdir
4259 (lambda _ (chdir "cglib") #t)))))
4261 `(("java-asm" ,java-asm)
4262 ("java-junit" ,java-junit)))
4263 (home-page "https://github.com/cglib/cglib/")
4264 (synopsis "Java byte code generation library")
4265 (description "The byte code generation library CGLIB is a high level API
4266 to generate and transform Java byte code.")
4267 (license license:asl2.0)))
4269 (define-public java-objenesis
4271 (name "java-objenesis")
4275 (uri (string-append "https://github.com/easymock/objenesis/"
4276 "archive/" version ".tar.gz"))
4277 (file-name (string-append "objenesis-" version ".tar.gz"))
4280 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4281 (build-system ant-build-system)
4283 `(#:jar-name "objenesis.jar"
4284 #:source-dir "main/src/"
4285 #:test-dir "main/src/test/"))
4287 `(("java-junit" ,java-junit)
4288 ("java-hamcrest-core" ,java-hamcrest-core)))
4289 (home-page "http://objenesis.org/")
4290 (synopsis "Bypass the constructor when creating an object")
4291 (description "Objenesis is a small Java library that serves one purpose:
4292 to instantiate a new object of a particular class. It is common to see
4293 restrictions in libraries stating that classes must require a default
4294 constructor. Objenesis aims to overcome these restrictions by bypassing the
4295 constructor on object instantiation.")
4296 (license license:asl2.0)))
4298 (define-public java-easymock
4300 (name "java-easymock")
4304 (uri (string-append "https://github.com/easymock/easymock/"
4305 "archive/easymock-" version ".tar.gz"))
4308 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4309 (build-system ant-build-system)
4311 `(#:jar-name "easymock.jar"
4312 #:source-dir "core/src/main"
4313 #:test-dir "core/src/test"
4315 (modify-phases %standard-phases
4316 ;; FIXME: Android support requires the following packages to be
4317 ;; available: com.google.dexmaker.stock.ProxyBuilder
4318 (add-after 'unpack 'delete-android-support
4320 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4321 (substitute* "MocksControl.java"
4322 (("AndroidSupport.isAndroid\\(\\)") "false")
4323 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4324 (delete-file "AndroidClassProxyFactory.java"))
4326 (add-after 'unpack 'delete-broken-tests
4328 (with-directory-excursion "core/src/test/java/org/easymock"
4329 ;; This test depends on dexmaker.
4330 (delete-file "tests2/ClassExtensionHelperTest.java")
4332 ;; This is not a test.
4333 (delete-file "tests/BaseEasyMockRunnerTest.java")
4335 ;; This test should be executed with a different runner...
4336 (delete-file "tests2/EasyMockAnnotationsTest.java")
4337 ;; ...but deleting it means that we also have to delete these
4339 (delete-file "tests2/EasyMockRunnerTest.java")
4340 (delete-file "tests2/EasyMockRuleTest.java")
4342 ;; This test fails because the file "easymock.properties" does
4344 (delete-file "tests2/EasyMockPropertiesTest.java"))
4347 `(("java-asm" ,java-asm)
4348 ("java-cglib" ,java-cglib)
4349 ("java-objenesis" ,java-objenesis)))
4351 `(("java-junit" ,java-junit)
4352 ("java-hamcrest-core" ,java-hamcrest-core)))
4353 (home-page "http://easymock.org")
4354 (synopsis "Java library providing mock objects for unit tests")
4355 (description "EasyMock is a Java library that provides an easy way to use
4356 mock objects in unit testing.")
4357 (license license:asl2.0)))
4359 (define-public java-jmock-1
4365 (uri (string-append "https://github.com/jmock-developers/"
4366 "jmock-library/archive/" version ".tar.gz"))
4367 (file-name (string-append "jmock-" version ".tar.gz"))
4370 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4371 (build-system ant-build-system)
4373 `(#:build-target "jars"
4374 #:test-target "run.tests"
4376 (modify-phases %standard-phases
4377 (replace 'install (install-jars "build")))))
4378 (home-page "http://www.jmock.org")
4379 (synopsis "Mock object library for test-driven development")
4380 (description "JMock is a library that supports test-driven development of
4381 Java code with mock objects. Mock objects help you design and test the
4382 interactions between the objects in your programs.
4387 @item makes it quick and easy to define mock objects
4388 @item lets you precisely specify the interactions between
4389 your objects, reducing the brittleness of your tests
4390 @item plugs into your favourite test framework
4391 @item is easy to extend.
4393 (license license:bsd-3)))
4395 (define-public java-jmock
4397 (inherit java-jmock-1)
4402 (uri (string-append "https://github.com/jmock-developers/"
4403 "jmock-library/archive/" version ".tar.gz"))
4404 (file-name (string-append name "-" version ".tar.gz"))
4407 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4409 `(("java-hamcrest-all" ,java-hamcrest-all)
4410 ("java-asm" ,java-asm)
4411 ("java-bsh" ,java-bsh)
4412 ("java-junit" ,java-junit)))
4414 `(("cglib" ,java-cglib)))
4416 `(#:jar-name "java-jmock.jar"
4417 #:source-dir "jmock/src/main/java"
4418 #:test-dir "jmock/src/test"))))
4420 (define-public java-jmock-junit4
4422 (inherit java-jmock)
4423 (name "java-jmock-junit4")
4425 `(#:jar-name "java-jmock-junit4.jar"
4426 #:source-dir "jmock-junit4/src/main/java"
4427 #:test-dir "jmock-junit4/src/test"))
4429 `(("java-hamcrest-all" ,java-hamcrest-all)
4430 ("java-asm" ,java-asm)
4431 ("java-bsh" ,java-bsh)
4432 ("java-jmock" ,java-jmock)
4433 ("java-jumit" ,java-junit)))))
4435 (define-public java-jmock-legacy
4437 (inherit java-jmock)
4438 (name "java-jmock-legacy")
4440 `(#:jar-name "java-jmock-legacy.jar"
4441 #:source-dir "jmock-legacy/src/main/java"
4442 #:test-dir "jmock-legacy/src/test"
4444 (modify-phases %standard-phases
4445 (add-before 'check 'copy-tests
4447 ;; This file is a dependancy of some tests
4448 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4449 (copy-file (string-append "jmock/src/test/java/" file)
4450 (string-append "jmock-legacy/src/test/java/" file))
4453 `(("java-hamcrest-all" ,java-hamcrest-all)
4454 ("java-objenesis" ,java-objenesis)
4455 ("java-cglib" ,java-cglib)
4456 ("java-jmock" ,java-jmock)
4457 ("java-asm" ,java-asm)
4458 ("java-bsh" ,java-bsh)
4459 ("java-junit" ,java-junit)))
4461 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4463 (define-public java-hamcrest-all
4464 (package (inherit java-hamcrest-core)
4465 (name "java-hamcrest-all")
4468 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4469 ((#:build-target _) "bigjar")
4471 `(modify-phases ,phases
4472 ;; Some build targets override the classpath, so we need to patch
4473 ;; the build.xml to ensure that required dependencies are on the
4475 (add-after 'unpack 'patch-classpath-for-integration
4476 (lambda* (#:key inputs #:allow-other-keys)
4477 (substitute* "build.xml"
4478 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4482 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4483 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4484 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4486 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4487 (string-append (assoc-ref inputs "java-hamcrest-core")
4488 "/share/java/hamcrest-core.jar")))
4491 `(("java-junit" ,java-junit)
4492 ("java-jmock" ,java-jmock-1)
4493 ;; This is necessary because of what seems to be a race condition.
4494 ;; This package would sometimes fail to build because hamcrest-core.jar
4495 ;; could not be found, even though it is built as part of this package.
4496 ;; Adding java-hamcrest-core appears to fix this problem. See
4497 ;; https://debbugs.gnu.org/31390 for more information.
4498 ("java-hamcrest-core" ,java-hamcrest-core)
4499 ("java-easymock" ,java-easymock)
4500 ,@(package-inputs java-hamcrest-core)))))
4502 (define-public java-jopt-simple
4504 (name "java-jopt-simple")
4508 (uri (string-append "http://repo1.maven.org/maven2/"
4509 "net/sf/jopt-simple/jopt-simple/"
4510 version "/jopt-simple-"
4511 version "-sources.jar"))
4514 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4515 (build-system ant-build-system)
4517 `(#:tests? #f ; there are no tests
4518 #:jar-name "jopt-simple.jar"))
4519 (home-page "https://pholser.github.io/jopt-simple/")
4520 (synopsis "Java library for parsing command line options")
4521 (description "JOpt Simple is a Java library for parsing command line
4522 options, such as those you might pass to an invocation of @code{javac}. In
4523 the interest of striving for simplicity, as closely as possible JOpt Simple
4524 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4525 GNU @code{getopt_long}. It also aims to make option parser configuration and
4526 retrieval of options and their arguments simple and expressive, without being
4528 (license license:expat)))
4530 (define-public java-commons-math3
4532 (name "java-commons-math3")
4536 (uri (string-append "mirror://apache/commons/math/source/"
4537 "commons-math3-" version "-src.tar.gz"))
4540 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4541 (build-system ant-build-system)
4543 `(#:build-target "jar"
4544 #:test-target "test"
4546 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4547 (junit (assoc-ref %build-inputs "java-junit")))
4548 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4549 (string-append "-Dhamcrest.jar=" hamcrest
4550 "/share/java/hamcrest-core.jar")))
4552 (modify-phases %standard-phases
4553 ;; We want to build the jar in the build phase and run the tests
4554 ;; later in a separate phase.
4555 (add-after 'unpack 'untangle-targets
4557 (substitute* "build.xml"
4558 (("name=\"jar\" depends=\"test\"")
4559 "name=\"jar\" depends=\"compile\""))
4561 ;; There is no install target.
4563 (install-jars "target")))))
4565 `(("java-junit" ,java-junit)
4566 ("java-hamcrest-core" ,java-hamcrest-core)))
4567 (home-page "http://commons.apache.org/math/")
4568 (synopsis "Apache Commons mathematics library")
4569 (description "Commons Math is a library of lightweight, self-contained
4570 mathematics and statistics components addressing the most common problems not
4571 available in the Java programming language or Commons Lang.")
4572 (license license:asl2.0)))
4574 (define-public java-jmh
4581 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4582 (changeset version)))
4583 (file-name (string-append name "-" version "-checkout"))
4586 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4587 (build-system ant-build-system)
4589 `(#:jar-name "jmh-core.jar"
4590 #:source-dir "jmh-core/src/main"
4591 #:test-dir "jmh-core/src/test"
4593 (modify-phases %standard-phases
4594 ;; This seems to be a bug in the JDK. It may not be necessary in
4595 ;; future versions of the JDK.
4596 (add-after 'unpack 'fix-bug
4598 (with-directory-excursion
4599 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4600 (substitute* '("IntegerValueConverter.java"
4601 "ThreadsValueConverter.java")
4602 (("public Class<Integer> valueType")
4603 "public Class<? extends Integer> valueType")))
4606 `(("java-jopt-simple" ,java-jopt-simple)
4607 ("java-commons-math3" ,java-commons-math3)))
4609 `(("java-junit" ,java-junit)
4610 ("java-hamcrest-core" ,java-hamcrest-core)))
4611 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4612 (synopsis "Benchmark harness for the JVM")
4613 (description "JMH is a Java harness for building, running, and analysing
4614 nano/micro/milli/macro benchmarks written in Java and other languages
4615 targeting the JVM.")
4617 (license license:gpl2)))
4619 (define-public java-commons-collections4
4621 (name "java-commons-collections4")
4625 (uri (string-append "mirror://apache/commons/collections/source/"
4626 "commons-collections4-" version "-src.tar.gz"))
4629 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4630 (build-system ant-build-system)
4632 `(#:test-target "test"
4634 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4635 (junit (assoc-ref %build-inputs "java-junit"))
4636 (easymock (assoc-ref %build-inputs "java-easymock")))
4637 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4638 (string-append "-Dhamcrest.jar=" hamcrest
4639 "/share/java/hamcrest-core.jar")
4640 (string-append "-Deasymock.jar=" easymock
4641 "/share/java/easymock.jar")))
4643 (modify-phases %standard-phases
4645 (install-jars "target")))))
4647 `(("java-junit" ,java-junit)
4648 ("java-hamcrest-core" ,java-hamcrest-core)
4649 ("java-easymock" ,java-easymock)))
4650 (home-page "http://commons.apache.org/collections/")
4651 (synopsis "Collections framework")
4652 (description "The Java Collections Framework is the recognised standard
4653 for collection handling in Java. Commons-Collections seek to build upon the
4654 JDK classes by providing new interfaces, implementations and utilities. There
4655 are many features, including:
4658 @item @code{Bag} interface for collections that have a number of copies of
4660 @item @code{BidiMap} interface for maps that can be looked up from value to
4661 key as well and key to value
4662 @item @code{MapIterator} interface to provide simple and quick iteration over
4664 @item Transforming decorators that alter each object as it is added to the
4666 @item Composite collections that make multiple collections look like one
4667 @item Ordered maps and sets that retain the order elements are added in,
4668 including an LRU based map
4669 @item Reference map that allows keys and/or values to be garbage collected
4671 @item Many comparator implementations
4672 @item Many iterator implementations
4673 @item Adapter classes from array and enumerations to collections
4674 @item Utilities to test or create typical set-theory properties of collections
4675 such as union, intersection, and closure.
4677 (license license:asl2.0)))
4679 (define-public java-commons-collections
4681 (inherit java-commons-collections4)
4682 (name "java-commons-collections")
4686 (uri (string-append "mirror://apache/commons/collections/source/"
4687 "commons-collections-" version "-src.tar.gz"))
4690 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4692 (search-patches "java-commons-collections-fix-java8.patch"))))
4694 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4696 `(modify-phases ,phases
4697 ;; The manifest is required by the build procedure
4698 (add-before 'build 'add-manifest
4700 (mkdir-p "build/conf")
4701 (call-with-output-file "build/conf/MANIFEST.MF"
4703 (format file "Manifest-Version: 1.0\n")))
4706 (install-jars "build"))))))))
4708 (define java-commons-collections-test-classes
4710 (inherit java-commons-collections)
4712 `(#:jar-name "commons-collections-test-classes.jar"
4713 #:source-dir "src/test"
4716 `(("collection" ,java-commons-collections)))))
4718 (define-public java-commons-beanutils
4720 (name "java-commons-beanutils")
4724 (uri (string-append "mirror://apache/commons/beanutils/source/"
4725 "commons-beanutils-" version "-src.tar.gz"))
4728 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4729 (build-system ant-build-system)
4731 `(#:test-target "test"
4734 (modify-phases %standard-phases
4736 (lambda* (#:key outputs #:allow-other-keys)
4737 (rename-file (string-append "dist/commons-beanutils-" ,version
4739 "commons-beanutils.jar")
4740 (install-file "commons-beanutils.jar"
4741 (string-append (assoc-ref outputs "out") "/share/java/"))
4744 `(("logging" ,java-commons-logging-minimal)
4745 ("collections" ,java-commons-collections)))
4747 `(("junit" ,java-junit)
4748 ("collections-test" ,java-commons-collections-test-classes)))
4749 (home-page "http://commons.apache.org/beanutils/")
4750 (synopsis "Dynamically set or get properties in Java")
4751 (description "BeanUtils provides a simplified interface to reflection and
4752 introspection to set or get dynamically determined properties through their
4753 setter and getter method.")
4754 (license license:asl2.0)))
4756 (define-public java-commons-io
4758 (name "java-commons-io")
4763 (uri (string-append "mirror://apache/commons/io/source/"
4764 "commons-io-" version "-src.tar.gz"))
4767 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4768 (build-system ant-build-system)
4769 (outputs '("out" "doc"))
4771 `(#:test-target "test"
4773 (list (string-append "-Djunit.jar="
4774 (assoc-ref %build-inputs "java-junit")
4775 "/share/java/junit.jar"))
4777 (modify-phases %standard-phases
4778 (add-after 'build 'build-javadoc ant-build-javadoc)
4779 (replace 'install (install-jars "target"))
4780 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4782 `(("java-junit" ,java-junit)
4783 ("java-hamcrest-core" ,java-hamcrest-core)))
4784 (home-page "http://commons.apache.org/io/")
4785 (synopsis "Common useful IO related classes")
4786 (description "Commons-IO contains utility classes, stream implementations,
4787 file filters and endian classes.")
4788 (license license:asl2.0)))
4790 (define-public java-commons-exec-1.1
4792 (name "java-commons-exec")
4797 (uri (string-append "mirror://apache/commons/exec/source/"
4798 "commons-exec-" version "-src.tar.gz"))
4801 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4802 (build-system ant-build-system)
4804 `(#:test-target "test"
4806 (list (string-append "-Dmaven.junit.jar="
4807 (assoc-ref %build-inputs "java-junit")
4808 "/share/java/junit.jar"))
4810 (modify-phases %standard-phases
4811 (add-before 'build 'delete-network-tests
4813 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4814 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4815 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4817 ;; The "build" phase automatically tests.
4819 (replace 'install (install-jars "target")))))
4821 `(("java-junit" ,java-junit)))
4822 (home-page "http://commons.apache.org/proper/commons-exec/")
4823 (synopsis "Common program execution related classes")
4824 (description "Commons-Exec simplifies executing external processes.")
4825 (license license:asl2.0)))
4827 (define-public java-commons-exec
4829 (inherit java-commons-exec-1.1)
4834 (uri (string-append "mirror://apache/commons/exec/source/"
4835 "commons-exec-" version "-src.tar.gz"))
4838 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4840 `(#:test-target "test"
4842 (list (string-append "-Dmaven.junit.jar="
4843 (assoc-ref %build-inputs "java-junit")
4844 "/share/java/junit.jar")
4845 "-Dmaven.compiler.source=1.7"
4846 "-Dmaven.compiler.target=1.7")
4848 (modify-phases %standard-phases
4849 (add-before 'build 'delete-network-tests
4850 (lambda* (#:key inputs #:allow-other-keys)
4851 ;; This test hangs indefinitely.
4852 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4853 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4854 (("ping -c 10 127.0.0.1") "sleep 10"))
4855 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4857 (call-with-output-file "src/test/scripts/ping.sh"
4859 (format port "#!~a/bin/sh\nsleep $1\n"
4860 (assoc-ref inputs "bash"))))
4862 ;; The "build" phase automatically tests.
4864 (replace 'install (install-jars "target")))))
4866 `(("java-junit" ,java-junit)
4867 ("java-hamcrest-core" ,java-hamcrest-core)))))
4869 (define-public java-commons-lang
4871 (name "java-commons-lang")
4876 (uri (string-append "mirror://apache/commons/lang/source/"
4877 "commons-lang-" version "-src.tar.gz"))
4879 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4880 (build-system ant-build-system)
4881 (outputs '("out" "doc"))
4883 `(#:test-target "test"
4884 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4886 (modify-phases %standard-phases
4887 (add-after 'build 'build-javadoc ant-build-javadoc)
4888 (add-before 'check 'disable-failing-test
4890 ;; Disable a failing test
4891 (substitute* "src/test/java/org/apache/commons/lang/\
4892 time/FastDateFormatTest.java"
4893 (("public void testFormat\\(\\)")
4894 "public void disabled_testFormat()"))
4896 (replace 'install (install-jars "target"))
4897 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4899 `(("java-junit" ,java-junit)))
4900 (home-page "http://commons.apache.org/lang/")
4901 (synopsis "Extension of the java.lang package")
4902 (description "The Commons Lang components contains a set of Java classes
4903 that provide helper methods for standard Java classes, especially those found
4904 in the @code{java.lang} package in the Sun JDK. The following classes are
4908 @item StringUtils - Helper for @code{java.lang.String}.
4909 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4910 of characters such as @code{[a-z]} and @code{[abcdez]}.
4911 @item RandomStringUtils - Helper for creating randomised strings.
4912 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4913 @item NumberRange - A range of numbers with an upper and lower bound.
4914 @item ObjectUtils - Helper for @code{java.lang.Object}.
4915 @item SerializationUtils - Helper for serializing objects.
4916 @item SystemUtils - Utility class defining the Java system properties.
4917 @item NestedException package - A sub-package for the creation of nested
4919 @item Enum package - A sub-package for the creation of enumerated types.
4920 @item Builder package - A sub-package for the creation of @code{equals},
4921 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4923 (license license:asl2.0)))
4925 (define-public java-commons-lang3
4927 (name "java-commons-lang3")
4932 (uri (string-append "mirror://apache/commons/lang/source/"
4933 "commons-lang3-" version "-src.tar.gz"))
4935 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4936 (build-system ant-build-system)
4937 (outputs '("out" "doc"))
4939 `(#:test-target "test"
4941 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4942 (junit (assoc-ref %build-inputs "java-junit"))
4943 (easymock (assoc-ref %build-inputs "java-easymock"))
4944 (io (assoc-ref %build-inputs "java-commons-io")))
4945 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4946 (string-append "-Dhamcrest.jar=" hamcrest
4947 "/share/java/hamcrest-all.jar")
4948 (string-append "-Dcommons-io.jar=" io
4949 "/share/java/commons-io-"
4950 ,(package-version java-commons-io)
4952 (string-append "-Deasymock.jar=" easymock
4953 "/share/java/easymock.jar")))
4955 (modify-phases %standard-phases
4956 (add-after 'build 'build-javadoc ant-build-javadoc)
4957 (replace 'install (install-jars "target"))
4958 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4960 `(("java-junit" ,java-junit)
4961 ("java-commons-io" ,java-commons-io)
4962 ("java-hamcrest-all" ,java-hamcrest-all)
4963 ("java-easymock" ,java-easymock)))
4964 (home-page "http://commons.apache.org/lang/")
4965 (synopsis "Extension of the java.lang package")
4966 (description "The Commons Lang components contains a set of Java classes
4967 that provide helper methods for standard Java classes, especially those found
4968 in the @code{java.lang} package. The following classes are included:
4971 @item StringUtils - Helper for @code{java.lang.String}.
4972 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4973 characters such as @code{[a-z]} and @code{[abcdez]}.
4974 @item RandomStringUtils - Helper for creating randomised strings.
4975 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4976 @item NumberRange - A range of numbers with an upper and lower bound.
4977 @item ObjectUtils - Helper for @code{java.lang.Object}.
4978 @item SerializationUtils - Helper for serializing objects.
4979 @item SystemUtils - Utility class defining the Java system properties.
4980 @item NestedException package - A sub-package for the creation of nested
4982 @item Enum package - A sub-package for the creation of enumerated types.
4983 @item Builder package - A sub-package for the creation of @code{equals},
4984 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4986 (license license:asl2.0)))
4988 (define-public java-commons-bsf
4990 (name "java-commons-bsf")
4994 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4998 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4999 (modules '((guix build utils)))
5002 (for-each delete-file
5003 (find-files "." "\\.jar$"))
5005 (build-system ant-build-system)
5007 `(#:build-target "jar"
5008 #:tests? #f; No test file
5009 #:modules ((guix build ant-build-system)
5011 (guix build java-utils)
5014 (modify-phases %standard-phases
5015 (add-before 'build 'create-properties
5017 ;; This file is missing from the distribution
5018 (call-with-output-file "build-properties.xml"
5021 `(project (@ (basedir ".") (name "build-properties") (default ""))
5022 (property (@ (name "project.name") (value "bsf")))
5023 (property (@ (name "source.level") (value "1.5")))
5024 (property (@ (name "build.lib") (value "build/jar")))
5025 (property (@ (name "src.dir") (value "src")))
5026 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5027 (property (@ (name "build.tests") (value "build/test-classes")))
5028 (property (@ (name "build.dest") (value "build/classes"))))
5031 (replace 'install (install-jars "build")))))
5033 `(("java-junit" ,java-junit)))
5035 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5036 (home-page "https://commons.apache.org/proper/commons-bsf")
5037 (synopsis "Bean Scripting Framework")
5038 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5039 which provides scripting language support within Java applications, and access
5040 to Java objects and methods from scripting languages. BSF allows one to write
5041 JSPs in languages other than Java while providing access to the Java class
5042 library. In addition, BSF permits any Java application to be implemented in
5043 part (or dynamically extended) by a language that is embedded within it. This
5044 is achieved by providing an API that permits calling scripting language engines
5045 from within Java, as well as an object registry that exposes Java objects to
5046 these scripting language engines.")
5047 (license license:asl2.0)))
5049 (define-public java-commons-jxpath
5051 (name "java-commons-jxpath")
5055 (uri (string-append "mirror://apache/commons/jxpath/source/"
5056 "commons-jxpath-" version "-src.tar.gz"))
5059 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5060 (build-system ant-build-system)
5062 `(#:jar-name "commons-jxpath.jar"
5063 ;; tests require more dependencies, including mockrunner which depends on old software
5065 #:source-dir "src/java"))
5067 `(("servlet" ,java-classpathx-servletapi)
5068 ("java-jdom" ,java-jdom)
5069 ("java-commons-beanutils" ,java-commons-beanutils)))
5071 `(("java-junit" ,java-junit)))
5072 (home-page "http://commons.apache.org/jxpath/")
5073 (synopsis "Simple interpreter of an expression language called XPath.")
5074 (description "The org.apache.commons.jxpath package defines a simple
5075 interpreter of an expression language called XPath. JXPath applies XPath
5076 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5077 contexts, DOM etc, including mixtures thereof.")
5078 (license license:asl2.0)))
5080 (define-public java-jsr250
5082 (name "java-jsr250")
5086 (uri (string-append "https://repo1.maven.org/maven2/"
5087 "javax/annotation/javax.annotation-api/"
5088 version "/javax.annotation-api-"
5089 version "-sources.jar"))
5092 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5093 (build-system ant-build-system)
5095 `(#:tests? #f ; no tests included
5097 #:jar-name "jsr250.jar"))
5098 (home-page "https://jcp.org/en/jsr/detail?id=250")
5099 (synopsis "Security-related annotations")
5100 (description "This package provides annotations for security. It provides
5101 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5103 ;; either cddl or gpl2 only, with classpath exception
5104 (license (list license:cddl1.0
5107 (define-public java-jsr305
5109 (name "java-jsr305")
5113 (uri (string-append "https://repo1.maven.org/maven2/"
5114 "com/google/code/findbugs/"
5115 "jsr305/" version "/jsr305-"
5116 version "-sources.jar"))
5119 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5120 (build-system ant-build-system)
5122 `(#:tests? #f ; no tests included
5123 #:jar-name "jsr305.jar"))
5124 (home-page "http://findbugs.sourceforge.net/")
5125 (synopsis "Annotations for the static analyzer called findbugs")
5126 (description "This package provides annotations for the findbugs package.
5127 It provides packages in the @code{javax.annotations} namespace.")
5128 (license license:asl2.0)))
5130 (define-public java-guava
5133 ;; This is the last release of Guava that can be built with Java 7.
5137 (uri (string-append "https://github.com/google/guava/"
5138 "releases/download/v" version
5139 "/guava-" version "-sources.jar"))
5142 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5143 (build-system ant-build-system)
5145 `(#:tests? #f ; no tests included
5146 #:jar-name "guava.jar"
5148 (modify-phases %standard-phases
5149 (add-after 'unpack 'trim-sources
5151 (with-directory-excursion "src/com/google/common"
5152 ;; Remove annotations to avoid extra dependencies:
5153 ;; * "j2objc" annotations are used when converting Java to
5155 ;; * "errorprone" annotations catch common Java mistakes at
5157 ;; * "IgnoreJRERequirement" is used for Android.
5158 (substitute* (find-files "." "\\.java$")
5159 (("import com.google.j2objc.*") "")
5160 (("import com.google.errorprone.annotation.*") "")
5161 (("import org.codehaus.mojo.animal_sniffer.*") "")
5162 (("@CanIgnoreReturnValue") "")
5165 (("@RetainedWith") "")
5167 (("@ForOverride") "")
5168 (("@J2ObjCIncompatible") "")
5169 (("@IgnoreJRERequirement") "")))
5172 `(("java-jsr305" ,java-jsr305)))
5173 (home-page "https://github.com/google/guava")
5174 (synopsis "Google core libraries for Java")
5175 (description "Guava is a set of core libraries that includes new
5176 collection types (such as multimap and multiset), immutable collections, a
5177 graph library, functional types, an in-memory cache, and APIs/utilities for
5178 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5180 (license license:asl2.0)))
5182 ;; The java-commons-logging package provides adapters to many different
5183 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5184 ;; it with only a minimal set of adapters.
5185 (define-public java-commons-logging-minimal
5187 (name "java-commons-logging-minimal")
5191 (uri (string-append "mirror://apache/commons/logging/source/"
5192 "commons-logging-" version "-src.tar.gz"))
5195 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5196 (build-system ant-build-system)
5198 `(#:tests? #f ; avoid dependency on logging frameworks
5199 #:jar-name "commons-logging-minimal.jar"
5201 (modify-phases %standard-phases
5202 (add-after 'unpack 'delete-adapters-and-tests
5204 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5205 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5206 ;; is used by applications; SimpleLog is the only actually usable
5207 ;; implementation that does not depend on another logging
5211 (delete-file (string-append
5212 "src/main/java/org/apache/commons/logging/impl/" file)))
5213 (list "Jdk13LumberjackLogger.java"
5214 "WeakHashtable.java"
5216 "ServletContextCleaner.java"
5219 "LogKitLogger.java"))
5220 (delete-file-recursively "src/test")
5222 (home-page "http://commons.apache.org/logging/")
5223 (synopsis "Common API for logging implementations")
5224 (description "The Logging package is a thin bridge between different
5225 logging implementations. A library that uses the commons-logging API can be
5226 used with any logging implementation at runtime.")
5227 (license license:asl2.0)))
5229 ;; This is the last release of the 1.x series.
5230 (define-public java-mockito-1
5232 (name "java-mockito")
5236 (uri (string-append "http://repo1.maven.org/maven2/"
5237 "org/mockito/mockito-core/" version
5238 "/mockito-core-" version "-sources.jar"))
5241 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5242 (build-system ant-build-system)
5244 `(#:jar-name "mockito.jar"
5245 #:tests? #f ; no tests included
5246 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5247 ;; patches in build phases.
5249 (modify-phases %standard-phases
5250 ;; Mockito was developed against a different version of hamcrest,
5251 ;; which does not require matcher implementations to provide an
5252 ;; implementation of the "describeMismatch" method. We add this
5253 ;; simple definition to pass the build with our version of hamcrest.
5254 (add-after 'unpack 'fix-hamcrest-build-error
5256 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5257 (("public Matcher getActualMatcher\\(\\) .*" line)
5259 public void describeMismatch(Object item, Description description) {
5260 actualMatcher.describeMismatch(item, description);
5264 ;; Mockito bundles cglib. We have a cglib package, so let's use
5266 (add-after 'unpack 'use-system-libraries
5268 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5269 (substitute* '("CGLIBHacker.java"
5270 "CglibMockMaker.java"
5271 "ClassImposterizer.java"
5272 "DelegatingMockitoMethodProxy.java"
5273 "MethodInterceptorFilter.java"
5274 "MockitoNamingPolicy.java"
5275 "SerializableMockitoMethodProxy.java"
5276 "SerializableNoOp.java")
5277 (("import org.mockito.cglib") "import net.sf.cglib")))
5280 `(("java-junit" ,java-junit)
5281 ("java-objenesis" ,java-objenesis)
5282 ("java-cglib" ,java-cglib)
5283 ("java-hamcrest-core" ,java-hamcrest-core)))
5284 (home-page "http://mockito.org")
5285 (synopsis "Mockito is a mock library for Java")
5286 (description "Mockito is a mocking library for Java which lets you write
5287 tests with a clean and simple API. It generates mocks using reflection, and
5288 it records all mock invocations, including methods arguments.")
5289 (license license:asl2.0)))
5291 (define-public java-httpcomponents-httpcore
5293 (name "java-httpcomponents-httpcore")
5297 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5298 "source/httpcomponents-core-"
5299 version "-src.tar.gz"))
5302 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5303 (build-system ant-build-system)
5305 `(#:jar-name "httpcomponents-httpcore.jar"
5307 (modify-phases %standard-phases
5308 (add-after 'unpack 'chdir
5309 (lambda _ (chdir "httpcore") #t)))))
5311 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5312 ("java-commons-lang3" ,java-commons-lang3)))
5314 `(("java-junit" ,java-junit)
5315 ("java-mockito" ,java-mockito-1)))
5316 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5317 (synopsis "Low level HTTP transport components")
5318 (description "HttpCore is a set of low level HTTP transport components
5319 that can be used to build custom client and server side HTTP services with a
5320 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5321 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5324 This package provides the blocking I/O model library.")
5325 (license license:asl2.0)))
5327 (define-public java-httpcomponents-httpcore-nio
5328 (package (inherit java-httpcomponents-httpcore)
5329 (name "java-httpcomponents-httpcore-nio")
5331 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5333 (modify-phases %standard-phases
5334 (add-after 'unpack 'chdir
5335 (lambda _ (chdir "httpcore-nio") #t)))))
5337 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5338 ("java-hamcrest-core" ,java-hamcrest-core)
5339 ,@(package-inputs java-httpcomponents-httpcore)))
5340 (description "HttpCore is a set of low level HTTP transport components
5341 that can be used to build custom client and server side HTTP services with a
5342 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5343 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5346 This package provides the non-blocking I/O model library based on Java
5349 (define-public java-httpcomponents-httpcore-ab
5350 (package (inherit java-httpcomponents-httpcore)
5351 (name "java-httpcomponents-httpcore-ab")
5353 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5355 (modify-phases %standard-phases
5356 (add-after 'unpack 'chdir
5357 (lambda _ (chdir "httpcore-ab") #t)))))
5359 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5360 ("java-commons-cli" ,java-commons-cli)
5361 ("java-hamcrest-core" ,java-hamcrest-core)
5362 ,@(package-inputs java-httpcomponents-httpcore)))
5363 (synopsis "Apache HttpCore benchmarking tool")
5364 (description "This package provides the HttpCore benchmarking tool. It is
5365 an Apache AB clone based on HttpCore.")))
5367 (define-public java-httpcomponents-httpclient
5369 (name "java-httpcomponents-httpclient")
5373 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5374 "source/httpcomponents-client-"
5375 version "-src.tar.gz"))
5378 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5379 (build-system ant-build-system)
5381 `(#:jar-name "httpcomponents-httpclient.jar"
5383 (modify-phases %standard-phases
5384 (add-after 'unpack 'chdir
5385 (lambda _ (chdir "httpclient") #t)))))
5387 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5388 ("java-commons-codec" ,java-commons-codec)
5389 ("java-hamcrest-core" ,java-hamcrest-core)
5390 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5391 ("java-mockito" ,java-mockito-1)
5392 ("java-junit" ,java-junit)))
5393 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5394 (synopsis "HTTP client library for Java")
5395 (description "Although the @code{java.net} package provides basic
5396 functionality for accessing resources via HTTP, it doesn't provide the full
5397 flexibility or functionality needed by many applications. @code{HttpClient}
5398 seeks to fill this void by providing an efficient, up-to-date, and
5399 feature-rich package implementing the client side of the most recent HTTP
5400 standards and recommendations.")
5401 (license license:asl2.0)))
5403 (define-public java-httpcomponents-httpmime
5404 (package (inherit java-httpcomponents-httpclient)
5405 (name "java-httpcomponents-httpmime")
5407 `(#:jar-name "httpcomponents-httpmime.jar"
5409 (modify-phases %standard-phases
5410 (add-after 'unpack 'chdir
5411 (lambda _ (chdir "httpmime") #t)))))
5413 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5414 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5415 ("java-junit" ,java-junit)
5416 ("java-hamcrest-core" ,java-hamcrest-core)))))
5418 (define-public java-commons-net
5420 (name "java-commons-net")
5424 (uri (string-append "mirror://apache/commons/net/source/"
5425 "commons-net-" version "-src.tar.gz"))
5428 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5429 (build-system ant-build-system)
5431 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5432 ;; should be "resources/examples/examples.properties"), but gets "null"
5435 #:jar-name "commons-net.jar"))
5437 `(("java-junit" ,java-junit)
5438 ("java-hamcrest-core" ,java-hamcrest-core)))
5439 (home-page "http://commons.apache.org/net/")
5440 (synopsis "Client library for many basic Internet protocols")
5441 (description "The Apache Commons Net library implements the client side of
5442 many basic Internet protocols. The purpose of the library is to provide
5443 fundamental protocol access, not higher-level abstractions.")
5444 (license license:asl2.0)))
5446 (define-public java-jsch
5452 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5453 version "/jsch-" version ".zip"))
5456 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5457 (build-system ant-build-system)
5459 `(#:build-target "dist"
5460 #:tests? #f ; no tests included
5462 (modify-phases %standard-phases
5463 (replace 'install (install-jars "dist")))))
5465 `(("unzip" ,unzip)))
5466 (home-page "http://www.jcraft.com/jsch/")
5467 (synopsis "Pure Java implementation of SSH2")
5468 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5469 to connect to an SSH server and use port forwarding, X11 forwarding, file
5470 transfer, etc., and you can integrate its functionality into your own Java
5472 (license license:bsd-3)))
5474 (define-public java-commons-compress
5476 (name "java-commons-compress")
5480 (uri (string-append "mirror://apache/commons/compress/source/"
5481 "commons-compress-" version "-src.tar.gz"))
5484 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5485 (build-system ant-build-system)
5487 `(#:jar-name "commons-compress.jar"
5489 (modify-phases %standard-phases
5490 (add-after 'unpack 'delete-bad-tests
5492 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5493 ;; FIXME: These tests really should not fail. Maybe they are
5494 ;; indicative of problems with our Java packaging work.
5496 ;; This test fails with a null pointer exception.
5497 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5498 ;; This test fails to open test resources.
5499 (delete-file "archivers/zip/ExplodeSupportTest.java")
5501 ;; FIXME: This test adds a dependency on powermock, which is hard to
5502 ;; package at this point.
5503 ;; https://github.com/powermock/powermock
5504 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5507 `(("java-junit" ,java-junit)
5508 ("java-hamcrest-core" ,java-hamcrest-core)
5509 ("java-mockito" ,java-mockito-1)
5510 ("java-xz" ,java-xz)))
5511 (home-page "https://commons.apache.org/proper/commons-compress/")
5512 (synopsis "Java library for working with compressed files")
5513 (description "The Apache Commons Compress library defines an API for
5514 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5515 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5516 (license license:asl2.0)))
5518 (define-public java-commons-csv
5520 (name "java-commons-csv")
5524 (uri (string-append "mirror://apache/commons/csv/source/"
5525 "commons-csv-" version "-src.tar.gz"))
5528 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5529 (build-system ant-build-system)
5531 `(#:jar-name "commons-csv.jar"
5532 #:source-dir "src/main/java"
5533 #:tests? #f)); FIXME: requires java-h2
5535 `(("java-hamcrest-core" ,java-hamcrest-core)
5536 ("java-commons-io" ,java-commons-io)
5537 ("java-commons-lang3" ,java-commons-lang3)
5538 ("junit" ,java-junit)))
5539 (home-page "https://commons.apache.org/proper/commons-csv/")
5540 (synopsis "Read and write CSV documents")
5541 (description "Commons CSV reads and writes files in variations of the Comma
5542 Separated Value (CSV) format. The most common CSV formats are predefined in the
5546 @item Microsoft Excel
5547 @item Informix UNLOAD
5548 @item Informix UNLOAD CSV
5554 Custom formats can be created using a fluent style API.")
5555 (license license:asl2.0)))
5557 (define-public java-osgi-annotation
5559 (name "java-osgi-annotation")
5563 (uri (string-append "https://repo1.maven.org/maven2/"
5564 "org/osgi/org.osgi.annotation/" version "/"
5565 "org.osgi.annotation-" version "-sources.jar"))
5568 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5569 (build-system ant-build-system)
5571 `(#:tests? #f ; no tests
5572 #:jar-name "osgi-annotation.jar"))
5573 (home-page "https://www.osgi.org")
5574 (synopsis "Annotation module of OSGi framework")
5576 "OSGi, for Open Services Gateway initiative framework, is a module system
5577 and service platform for the Java programming language. This package contains
5578 the OSGi annotation module, providing additional services to help dynamic
5580 (license license:asl2.0)))
5582 (define-public java-osgi-core
5584 (name "java-osgi-core")
5588 (uri (string-append "https://repo1.maven.org/maven2/"
5589 "org/osgi/org.osgi.core/" version "/"
5590 "org.osgi.core-" version "-sources.jar"))
5593 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5594 (build-system ant-build-system)
5596 `(#:tests? #f ; no tests
5597 #:jar-name "osgi-core.jar"))
5599 `(("java-osgi-annotation" ,java-osgi-annotation)))
5600 (home-page "https://www.osgi.org")
5601 (synopsis "Core module of OSGi framework")
5603 "OSGi, for Open Services Gateway initiative framework, is a module system
5604 and service platform for the Java programming language. This package contains
5605 the OSGi Core module.")
5606 (license license:asl2.0)))
5608 (define-public java-osgi-service-event
5610 (name "java-osgi-service-event")
5614 (uri (string-append "https://repo1.maven.org/maven2/"
5615 "org/osgi/org.osgi.service.event/"
5616 version "/org.osgi.service.event-"
5617 version "-sources.jar"))
5620 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5621 (build-system ant-build-system)
5623 `(#:tests? #f ; no tests
5624 #:jar-name "osgi-service-event.jar"))
5626 `(("java-osgi-annotation" ,java-osgi-annotation)
5627 ("java-osgi-core" ,java-osgi-core)))
5628 (home-page "https://www.osgi.org")
5629 (synopsis "OSGi service event module")
5631 "OSGi, for Open Services Gateway initiative framework, is a module system
5632 and service platform for the Java programming language. This package contains
5633 the OSGi @code{org.osgi.service.event} module.")
5634 (license license:asl2.0)))
5636 (define-public java-eclipse-osgi
5638 (name "java-eclipse-osgi")
5642 (uri (string-append "https://repo1.maven.org/maven2/"
5643 "org/eclipse/platform/org.eclipse.osgi/"
5644 version "/org.eclipse.osgi-"
5645 version "-sources.jar"))
5648 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5649 (build-system ant-build-system)
5651 `(#:tests? #f ; no tests included
5652 #:jar-name "eclipse-equinox-osgi.jar"))
5654 `(("java-osgi-annotation" ,java-osgi-annotation)))
5655 (home-page "http://www.eclipse.org/equinox/")
5656 (synopsis "Eclipse Equinox OSGi framework")
5657 (description "This package provides an implementation of the OSGi Core
5659 (license license:epl1.0)))
5661 (define-public java-eclipse-equinox-common
5663 (name "java-eclipse-equinox-common")
5664 (version "3.10.200")
5667 (uri (string-append "https://repo1.maven.org/maven2/"
5668 "org/eclipse/platform/org.eclipse.equinox.common/"
5669 version "/org.eclipse.equinox.common-"
5670 version "-sources.jar"))
5673 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5674 (build-system ant-build-system)
5676 `(#:tests? #f ; no tests included
5677 #:jar-name "eclipse-equinox-common.jar"))
5679 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5680 (home-page "http://www.eclipse.org/equinox/")
5681 (synopsis "Common Eclipse runtime")
5682 (description "This package provides the common Eclipse runtime.")
5683 (license license:epl1.0)))
5685 (define-public java-eclipse-core-jobs
5687 (name "java-eclipse-core-jobs")
5691 (uri (string-append "https://repo1.maven.org/maven2/"
5692 "org/eclipse/platform/org.eclipse.core.jobs/"
5693 version "/org.eclipse.core.jobs-"
5694 version "-sources.jar"))
5697 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5698 (build-system ant-build-system)
5700 `(#:tests? #f ; no tests included
5701 #:jar-name "eclipse-core-jobs.jar"))
5703 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5704 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5705 (home-page "http://www.eclipse.org/equinox/")
5706 (synopsis "Eclipse jobs mechanism")
5707 (description "This package provides the Eclipse jobs mechanism.")
5708 (license license:epl1.0)))
5710 (define-public java-eclipse-equinox-registry
5712 (name "java-eclipse-equinox-registry")
5716 (uri (string-append "https://repo1.maven.org/maven2/"
5717 "org/eclipse/platform/org.eclipse.equinox.registry/"
5718 version "/org.eclipse.equinox.registry-"
5719 version "-sources.jar"))
5722 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5723 (build-system ant-build-system)
5725 `(#:tests? #f ; no tests included
5726 #:jar-name "eclipse-equinox-registry.jar"))
5728 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5729 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5730 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5731 (home-page "http://www.eclipse.org/equinox/")
5732 (synopsis "Eclipse extension registry support")
5733 (description "This package provides support for the Eclipse extension
5735 (license license:epl1.0)))
5737 (define-public java-eclipse-equinox-app
5739 (name "java-eclipse-equinox-app")
5743 (uri (string-append "https://repo1.maven.org/maven2/"
5744 "org/eclipse/platform/org.eclipse.equinox.app/"
5745 version "/org.eclipse.equinox.app-"
5746 version "-sources.jar"))
5749 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5750 (build-system ant-build-system)
5752 `(#:tests? #f ; no tests included
5753 #:jar-name "eclipse-equinox-app.jar"))
5755 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5756 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5757 ("java-eclipse-osgi" ,java-eclipse-osgi)
5758 ("java-osgi-service-event" ,java-osgi-service-event)))
5759 (home-page "http://www.eclipse.org/equinox/")
5760 (synopsis "Equinox application container")
5761 (description "This package provides the Equinox application container for
5763 (license license:epl1.0)))
5765 (define-public java-eclipse-equinox-preferences
5767 (name "java-eclipse-equinox-preferences")
5771 (uri (string-append "https://repo1.maven.org/maven2/"
5772 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5773 version "/org.eclipse.equinox.preferences-"
5774 version "-sources.jar"))
5777 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5778 (build-system ant-build-system)
5780 `(#:tests? #f ; no tests included
5781 #:jar-name "eclipse-equinox-preferences.jar"))
5783 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5784 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5785 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5786 (home-page "http://www.eclipse.org/equinox/")
5787 (synopsis "Eclipse preferences mechanism")
5788 (description "This package provides the Eclipse preferences mechanism with
5789 the module @code{org.eclipse.equinox.preferences}.")
5790 (license license:epl1.0)))
5792 (define-public java-eclipse-core-contenttype
5794 (name "java-eclipse-core-contenttype")
5798 (uri (string-append "https://repo1.maven.org/maven2/"
5799 "org/eclipse/platform/org.eclipse.core.contenttype/"
5800 version "/org.eclipse.core.contenttype-"
5801 version "-sources.jar"))
5804 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5805 (build-system ant-build-system)
5807 `(#:tests? #f ; no tests included
5808 #:jar-name "eclipse-core-contenttype.jar"))
5810 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5811 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5812 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5813 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5814 (home-page "http://www.eclipse.org/")
5815 (synopsis "Eclipse content mechanism")
5816 (description "This package provides the Eclipse content mechanism in the
5817 @code{org.eclipse.core.contenttype} module.")
5818 (license license:epl1.0)))
5820 (define-public java-eclipse-core-runtime
5822 (name "java-eclipse-core-runtime")
5823 (version "3.15.100")
5826 (uri (string-append "https://repo1.maven.org/maven2/"
5827 "org/eclipse/platform/org.eclipse.core.runtime/"
5828 version "/org.eclipse.core.runtime-"
5829 version "-sources.jar"))
5832 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
5833 (build-system ant-build-system)
5835 `(#:tests? #f ; no tests included
5836 #:jar-name "eclipse-core-runtime.jar"))
5838 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5839 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5840 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5841 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5842 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5843 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5844 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5845 (home-page "https://www.eclipse.org/")
5846 (synopsis "Eclipse core runtime")
5847 (description "This package provides the Eclipse core runtime with the
5848 module @code{org.eclipse.core.runtime}.")
5849 (license license:epl1.0)))
5851 (define-public java-eclipse-core-filesystem
5853 (name "java-eclipse-core-filesystem")
5857 (uri (string-append "https://repo1.maven.org/maven2/"
5858 "org/eclipse/platform/org.eclipse.core.filesystem/"
5859 version "/org.eclipse.core.filesystem-"
5860 version "-sources.jar"))
5863 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5864 (build-system ant-build-system)
5866 `(#:tests? #f ; no tests included
5867 #:jar-name "eclipse-core-filesystem.jar"))
5869 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5870 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5871 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5872 (home-page "https://www.eclipse.org/")
5873 (synopsis "Eclipse core file system")
5874 (description "This package provides the Eclipse core file system with the
5875 module @code{org.eclipse.core.filesystem}.")
5876 (license license:epl1.0)))
5878 (define-public java-eclipse-core-expressions
5880 (name "java-eclipse-core-expressions")
5884 (uri (string-append "https://repo1.maven.org/maven2/"
5885 "org/eclipse/platform/org.eclipse.core.expressions/"
5886 version "/org.eclipse.core.expressions-"
5887 version "-sources.jar"))
5890 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5891 (build-system ant-build-system)
5893 `(#:tests? #f ; no tests included
5894 #:jar-name "eclipse-core-expressions.jar"))
5896 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5897 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5898 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5899 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5900 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5901 (home-page "https://www.eclipse.org/")
5902 (synopsis "Eclipse core expression language")
5903 (description "This package provides the Eclipse core expression language
5904 with the @code{org.eclipse.core.expressions} module.")
5905 (license license:epl1.0)))
5907 (define-public java-eclipse-core-variables
5909 (name "java-eclipse-core-variables")
5913 (uri (string-append "https://repo1.maven.org/maven2/"
5914 "org/eclipse/platform/org.eclipse.core.variables/"
5915 version "/org.eclipse.core.variables-"
5916 version "-sources.jar"))
5919 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5920 (build-system ant-build-system)
5922 `(#:tests? #f ; no tests included
5923 #:jar-name "eclipse-core-variables.jar"))
5925 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5926 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5927 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5928 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5929 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5930 (home-page "https://www.eclipse.org/platform")
5931 (synopsis "Eclipse core variables")
5932 (description "This package provides the Eclipse core variables module
5933 @code{org.eclipse.core.variables}.")
5934 (license license:epl1.0)))
5936 (define-public java-eclipse-ant-core
5938 (name "java-eclipse-ant-core")
5942 (uri (string-append "https://repo1.maven.org/maven2/"
5943 "org/eclipse/platform/org.eclipse.ant.core/"
5944 version "/org.eclipse.ant.core-"
5945 version "-sources.jar"))
5948 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5949 (build-system ant-build-system)
5951 `(#:tests? #f ; no tests included
5952 #:jar-name "eclipse-ant-core.jar"))
5954 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5955 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5956 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5957 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5958 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5959 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5960 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5961 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5962 (home-page "https://www.eclipse.org/platform")
5963 (synopsis "Ant build tool core libraries")
5964 (description "This package provides the ant build tool core libraries with
5965 the module @code{org.eclipse.ant.core}.")
5966 (license license:epl1.0)))
5968 (define-public java-eclipse-core-resources
5970 (name "java-eclipse-core-resources")
5971 (version "3.13.200")
5974 (uri (string-append "https://repo1.maven.org/maven2/"
5975 "org/eclipse/platform/org.eclipse.core.resources/"
5976 version "/org.eclipse.core.resources-"
5977 version "-sources.jar"))
5980 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
5981 (build-system ant-build-system)
5983 `(#:tests? #f ; no tests included
5984 #:jar-name "eclipse-core-resources.jar"))
5986 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5987 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5988 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5989 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5990 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5991 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5992 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5993 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5994 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5995 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5996 (home-page "https://www.eclipse.org/")
5997 (synopsis "Eclipse core resource management")
5998 (description "This package provides the Eclipse core resource management
5999 module @code{org.eclipse.core.resources}.")
6000 (license license:epl1.0)))
6002 (define-public java-eclipse-compare-core
6004 (name "java-eclipse-compare-core")
6008 (uri (string-append "https://repo1.maven.org/maven2/"
6009 "org/eclipse/platform/org.eclipse.compare.core/"
6010 version "/org.eclipse.compare.core-"
6011 version "-sources.jar"))
6014 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6015 (build-system ant-build-system)
6017 `(#:tests? #f ; no tests included
6018 #:jar-name "eclipse-compare-core.jar"))
6020 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6021 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6022 ("java-eclipse-osgi" ,java-eclipse-osgi)
6023 ("java-icu4j" ,java-icu4j)))
6024 (home-page "https://www.eclipse.org/")
6025 (synopsis "Eclipse core compare support")
6026 (description "This package provides the Eclipse core compare support
6027 module @code{org.eclipse.compare.core}.")
6028 (license license:epl1.0)))
6030 (define-public java-eclipse-team-core
6032 (name "java-eclipse-team-core")
6036 (uri (string-append "https://repo1.maven.org/maven2/"
6037 "org/eclipse/platform/org.eclipse.team.core/"
6038 version "/org.eclipse.team.core-"
6039 version "-sources.jar"))
6042 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6043 (build-system ant-build-system)
6045 `(#:tests? #f ; no tests included
6046 #:jar-name "eclipse-team-core.jar"))
6048 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6049 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6050 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6051 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6052 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6053 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6054 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6055 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6056 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6057 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6058 (home-page "https://www.eclipse.org/platform")
6059 (synopsis "Eclipse team support core")
6060 (description "This package provides the Eclipse team support core module
6061 @code{org.eclipse.team.core}.")
6062 (license license:epl1.0)))
6064 (define-public java-eclipse-core-commands
6066 (name "java-eclipse-core-commands")
6070 (uri (string-append "https://repo1.maven.org/maven2/"
6071 "org/eclipse/platform/org.eclipse.core.commands/"
6072 version "/org.eclipse.core.commands-"
6073 version "-sources.jar"))
6076 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6077 (build-system ant-build-system)
6079 `(#:tests? #f ; no tests included
6080 #:jar-name "eclipse-core-commands.jar"))
6082 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6083 (home-page "https://www.eclipse.org/platform")
6084 (synopsis "Eclipse core commands")
6085 (description "This package provides Eclipse core commands in the module
6086 @code{org.eclipse.core.commands}.")
6087 (license license:epl1.0)))
6089 (define-public java-eclipse-text
6091 (name "java-eclipse-text")
6095 (uri (string-append "https://repo1.maven.org/maven2/"
6096 "org/eclipse/platform/org.eclipse.text/"
6097 version "/org.eclipse.text-"
6098 version "-sources.jar"))
6101 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6102 (build-system ant-build-system)
6104 `(#:tests? #f ; no tests included
6105 #:jar-name "eclipse-text.jar"
6107 (modify-phases %standard-phases
6108 ;; When creating a new category we must make sure that the new list
6109 ;; matches List<Position>. By default it seems to be too generic
6110 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6111 ;; Without this we get this error:
6113 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6114 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6115 ;; [javac] fPositions.put(category, new ArrayList<>());
6117 ;; [javac] required: String,List<Position>
6118 ;; [javac] found: String,ArrayList<Object>
6119 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6120 ;; to List<Position> by method invocation conversion
6121 ;; [javac] where K,V are type-variables:
6122 ;; [javac] K extends Object declared in interface Map
6123 ;; [javac] V extends Object declared in interface Map
6125 ;; I don't know if this is a good fix. I suspect it is not, but it
6127 (add-after 'unpack 'fix-compilation-error
6129 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6130 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6131 "Positions.put(category, new ArrayList<Position>());"))
6134 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6135 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6136 ("java-icu4j" ,java-icu4j)))
6137 (home-page "http://www.eclipse.org/platform")
6138 (synopsis "Eclipse text library")
6139 (description "Platform Text is part of the Platform UI project and
6140 provides the basic building blocks for text and text editors within Eclipse
6141 and contributes the Eclipse default text editor.")
6142 (license license:epl1.0)))
6144 (define-public java-eclipse-jdt-core
6146 (name "java-eclipse-jdt-core")
6150 (uri (string-append "https://repo1.maven.org/maven2/"
6151 "org/eclipse/jdt/org.eclipse.jdt.core/"
6152 version "/org.eclipse.jdt.core-"
6153 version "-sources.jar"))
6156 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6157 (build-system ant-build-system)
6159 `(#:tests? #f ; no tests included
6160 #:jar-name "eclipse-jdt-core.jar"
6162 (modify-phases %standard-phases
6163 (add-after 'unpack 'move-sources
6165 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6166 (for-each (lambda (file)
6167 (install-file file (string-append "../" (dirname file))))
6168 (find-files "." ".*")))
6169 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6171 (add-before 'build 'copy-resources
6173 (with-directory-excursion "src"
6174 (for-each (lambda (file)
6175 (install-file file (string-append "../build/classes/" (dirname file))))
6176 (find-files "." ".*.(props|properties|rsc)")))
6179 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6180 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6181 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6182 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6183 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6184 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6185 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6186 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6187 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6188 ("java-eclipse-osgi" ,java-eclipse-osgi)
6189 ("java-eclipse-text" ,java-eclipse-text)))
6190 (home-page "https://www.eclipse.org/jdt")
6191 (synopsis "Java development tools core libraries")
6192 (description "This package provides the core libraries of the Eclipse Java
6193 development tools.")
6194 (license license:epl1.0)))
6196 (define-public java-eclipse-jdt-compiler-apt
6198 (name "java-eclipse-jdt-compiler-apt")
6202 (uri (string-append "https://repo1.maven.org/maven2/"
6203 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6204 version "/org.eclipse.jdt.compiler.apt-"
6205 version "-sources.jar"))
6208 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6209 (build-system ant-build-system)
6211 `(#:tests? #f ; no tests included
6212 #:jar-name "eclipse-jdt-compiler-apt.jar"
6215 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6216 (home-page "https://www.eclipse.org/jdt/apt/")
6217 (synopsis "Annotation processing tool")
6218 (description "APT stands for Annotation Processing Tool. APT provides a
6219 means for generating files and compiling new Java classes based on annotations
6220 found in your source code.")
6221 (license license:epl2.0)))
6223 (define-public java-javax-mail
6225 (name "java-javax-mail")
6229 (uri (string-append "https://repo1.maven.org/maven2/"
6230 "com/sun/mail/javax.mail/"
6231 version "/javax.mail-"
6232 version "-sources.jar"))
6235 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6236 (build-system ant-build-system)
6238 `(#:tests? #f ; no tests
6239 #:jar-name "javax-mail.jar"))
6240 (home-page "https://javamail.java.net")
6241 (synopsis "Reference implementation of the JavaMail API")
6243 "This package provides versions of the JavaMail API implementation, IMAP,
6244 SMTP, and POP3 service providers, some examples, and documentation for the
6246 ;; GPLv2 only with "classpath exception".
6247 (license license:gpl2)))
6249 (define-public java-log4j-api
6251 (name "java-log4j-api")
6255 (uri (string-append "mirror://apache/logging/log4j/" version
6256 "/apache-log4j-" version "-src.tar.gz"))
6259 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6260 (build-system ant-build-system)
6262 `(#:tests? #f ; tests require unpackaged software
6263 #:jar-name "log4j-api.jar"
6265 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6268 (modify-phases %standard-phases
6269 (add-after 'unpack 'enter-dir
6270 (lambda _ (chdir "log4j-api") #t))
6271 ;; FIXME: The tests require additional software that has not been
6272 ;; packaged yet, such as
6273 ;; * org.apache.maven
6274 ;; * org.apache.felix
6275 (add-after 'enter-dir 'delete-tests
6276 (lambda _ (delete-file-recursively "src/test") #t)))))
6278 `(("java-osgi-core" ,java-osgi-core)
6279 ("java-hamcrest-core" ,java-hamcrest-core)
6280 ("java-junit" ,java-junit)))
6281 (home-page "http://logging.apache.org/log4j/2.x/")
6282 (synopsis "API module of the Log4j logging framework for Java")
6284 "This package provides the API module of the Log4j logging framework for
6286 (license license:asl2.0)))
6288 (define-public java-log4j-core
6290 (inherit java-log4j-api)
6291 (name "java-log4j-core")
6293 `(("java-osgi-core" ,java-osgi-core)
6294 ("java-hamcrest-core" ,java-hamcrest-core)
6295 ("java-log4j-api" ,java-log4j-api)
6296 ("java-mail" ,java-mail)
6297 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6298 ("java-lmax-disruptor" ,java-lmax-disruptor)
6299 ("java-kafka" ,java-kafka-clients)
6300 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6301 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6302 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6303 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6304 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6305 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6306 ("java-commons-compress" ,java-commons-compress)
6307 ("java-commons-csv" ,java-commons-csv)
6308 ("java-jeromq" ,java-jeromq)
6309 ("java-junit" ,java-junit)))
6311 `(("hamcrest" ,java-hamcrest-all)
6312 ("java-commons-io" ,java-commons-io)
6313 ("java-commons-lang3" ,java-commons-lang3)
6314 ("slf4j" ,java-slf4j-api)))
6316 `(#:tests? #f ; tests require more dependencies
6317 #:test-dir "src/test"
6318 #:source-dir "src/main/java"
6319 #:jar-name "log4j-core.jar"
6322 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6325 (modify-phases %standard-phases
6326 (add-after 'unpack 'enter-dir
6327 (lambda _ (chdir "log4j-core") #t)))))
6328 (synopsis "Core component of the Log4j framework")
6329 (description "This package provides the core component of the Log4j
6330 logging framework for Java.")))
6332 (define-public java-log4j-1.2-api
6334 (inherit java-log4j-api)
6335 (name "java-log4j-1.2-api")
6337 `(#:jar-name "java-log4j-1.2-api.jar"
6338 #:source-dir "log4j-1.2-api/src/main/java"
6340 ;; Tests require maven-model (and other maven subprojects), which is a
6341 ;; cyclic dependency.
6344 `(("log4j-api" ,java-log4j-api)
6345 ("log4j-core" ,java-log4j-core)
6346 ("osgi-core" ,java-osgi-core)
6347 ("eclipse-osgi" ,java-eclipse-osgi)
6348 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6350 (define-public java-commons-cli
6352 (name "java-commons-cli")
6356 (uri (string-append "mirror://apache/commons/cli/source/"
6357 "commons-cli-" version "-src.tar.gz"))
6360 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6361 (build-system ant-build-system)
6364 `(#:jar-name "commons-cli.jar"))
6366 `(("java-junit" ,java-junit)
6367 ("java-hamcrest-core" ,java-hamcrest-core)))
6368 (home-page "http://commons.apache.org/cli/")
6369 (synopsis "Command line arguments and options parsing library")
6370 (description "The Apache Commons CLI library provides an API for parsing
6371 command line options passed to programs. It is also able to print help
6372 messages detailing the options available for a command line tool.
6374 Commons CLI supports different types of options:
6377 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6378 @item GNU like long options (ie. du --human-readable --max-depth=1)
6379 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6380 @item Short options with value attached (ie. gcc -O2 foo.c)
6381 @item long options with single hyphen (ie. ant -projecthelp)
6384 This is a part of the Apache Commons Project.")
6385 (license license:asl2.0)))
6387 (define-public java-commons-codec
6389 (name "java-commons-codec")
6393 (uri (string-append "mirror://apache/commons/codec/source/"
6394 "commons-codec-" version "-src.tar.gz"))
6397 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6398 (build-system ant-build-system)
6399 (outputs '("out" "doc"))
6401 `(#:test-target "test"
6403 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6404 (junit (assoc-ref %build-inputs "java-junit")))
6405 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6406 (string-append "-Dhamcrest.jar=" hamcrest
6407 "/share/java/hamcrest-core.jar")
6408 ;; Do not append version to jar.
6409 "-Dfinal.name=commons-codec"))
6411 (modify-phases %standard-phases
6412 (add-after 'build 'build-javadoc ant-build-javadoc)
6413 (replace 'install (install-jars "dist"))
6414 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6416 `(("java-junit" ,java-junit)
6417 ("java-hamcrest-core" ,java-hamcrest-core)))
6418 (home-page "http://commons.apache.org/codec/")
6419 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6420 (description "The codec package contains simple encoder and decoders for
6421 various formats such as Base64 and Hexadecimal. In addition to these widely
6422 used encoders and decoders, the codec package also maintains a collection of
6423 phonetic encoding utilities.
6425 This is a part of the Apache Commons Project.")
6426 (license license:asl2.0)))
6428 (define-public java-commons-daemon
6430 (name "java-commons-daemon")
6434 (uri (string-append "mirror://apache/commons/daemon/source/"
6435 "commons-daemon-" version "-src.tar.gz"))
6438 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
6439 (build-system ant-build-system)
6441 `(#:test-target "test"
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 (home-page "http://commons.apache.org/daemon/")
6450 (synopsis "Library to launch Java applications as daemons")
6451 (description "The Daemon package from Apache Commons can be used to
6452 implement Java applications which can be launched as daemons. For example the
6453 program will be notified about a shutdown so that it can perform cleanup tasks
6454 before its process of execution is destroyed by the operation system.
6456 This package contains the Java library. You will also need the actual binary
6457 for your architecture which is provided by the jsvc package.
6459 This is a part of the Apache Commons Project.")
6460 (license license:asl2.0)))
6462 (define-public java-javaewah
6464 (name "java-javaewah")
6468 (uri (string-append "https://github.com/lemire/javaewah/"
6469 "archive/JavaEWAH-" version ".tar.gz"))
6472 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6473 (build-system ant-build-system)
6474 (arguments `(#:jar-name "javaewah.jar"))
6476 `(("java-junit" ,java-junit)
6477 ("java-hamcrest-core" ,java-hamcrest-core)))
6478 (home-page "https://github.com/lemire/javaewah")
6479 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6480 (description "This is a word-aligned compressed variant of the Java
6481 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6482 compression scheme. It can be used to implement bitmap indexes.
6484 The goal of word-aligned compression is not to achieve the best compression,
6485 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6486 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6487 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6488 @code{BitSet} class by Sun).")
6489 ;; GPL2.0 derivates are explicitly allowed.
6490 (license license:asl2.0)))
6492 (define-public java-slf4j-api
6494 (name "java-slf4j-api")
6498 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6502 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6503 (modules '((guix build utils)))
6504 ;; Delete bundled jars.
6507 (for-each delete-file (find-files "." "\\.jar$"))
6509 (build-system ant-build-system)
6511 `(#:jar-name "slf4j-api.jar"
6512 #:source-dir "slf4j-api/src/main"
6513 #:test-dir "slf4j-api/src/test"
6515 (modify-phases %standard-phases
6516 (add-after 'build 'regenerate-jar
6518 ;; pom.xml ignores these files in the jar creation process. If we don't,
6519 ;; we get the error "This code should have never made it into slf4j-api.jar"
6520 (delete-file-recursively "build/classes/org/slf4j/impl")
6521 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6522 "build/classes" ".")))
6523 (add-before 'check 'dont-test-abstract-classes
6525 ;; abstract classes are not meant to be run with junit
6526 (substitute* "build.xml"
6527 (("<include name=\"\\*\\*/\\*Test.java\" />")
6528 (string-append "<include name=\"**/*Test.java\" />"
6529 "<exclude name=\"**/MultithreadedInitializationTest"
6533 `(("java-junit" ,java-junit)
6534 ("java-hamcrest-core" ,java-hamcrest-core)))
6535 (home-page "https://www.slf4j.org/")
6536 (synopsis "Simple logging facade for Java")
6537 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6538 simple facade or abstraction for various logging
6539 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6540 allowing the end user to plug in the desired logging framework at deployment
6542 (license license:expat)))
6544 (define java-slf4j-api-bootstrap
6546 (inherit java-slf4j-api)
6547 (name "java-slf4j-api-bootstrap")
6550 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6551 ((#:tests? _ #f) #f)))))
6553 (define-public java-slf4j-simple
6555 (name "java-slf4j-simple")
6557 (source (package-source java-slf4j-api))
6558 (build-system ant-build-system)
6560 `(#:jar-name "slf4j-simple.jar"
6561 #:source-dir "slf4j-simple/src/main"
6562 #:test-dir "slf4j-simple/src/test"
6564 (modify-phases %standard-phases
6565 ;; The tests need some test classes from slf4j-api
6566 (add-before 'check 'build-slf4j-api-test-helpers
6568 ;; Add current dir to CLASSPATH ...
6570 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6571 ;; ... and build test helper classes here:
6574 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6576 `(("java-junit" ,java-junit)
6577 ("java-hamcrest-core" ,java-hamcrest-core)
6578 ("java-slf4j-api" ,java-slf4j-api)))
6579 (home-page "https://www.slf4j.org/")
6580 (synopsis "Simple implementation of simple logging facade for Java")
6581 (description "SLF4J binding for the Simple implementation, which outputs
6582 all events to System.err. Only messages of level INFO and higher are
6584 (license license:expat)))
6586 (define-public antlr2
6592 (uri (string-append "http://www.antlr2.org/download/antlr-"
6596 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6597 (modules '((guix build utils)))
6600 (delete-file "antlr.jar")
6601 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6605 "#define EOF (-1)\n"
6606 "#include <strings.h>")))
6607 (substitute* "configure"
6610 (build-system gnu-build-system)
6612 `(#:tests? #f ; no test target
6613 #:imported-modules ((guix build ant-build-system)
6614 (guix build syscalls)
6615 ,@%gnu-build-system-modules)
6616 #:modules (((guix build ant-build-system) #:prefix ant:)
6617 (guix build gnu-build-system)
6620 (modify-phases %standard-phases
6621 (add-after 'install 'strip-jar-timestamps
6622 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6623 (add-before 'configure 'fix-timestamp
6625 (substitute* "configure"
6626 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6628 (add-after 'configure 'fix-bin-ls
6630 (substitute* (find-files "." "Makefile")
6636 ("java" ,icedtea "jdk")))
6638 `(("java" ,icedtea)))
6639 (home-page "http://www.antlr2.org")
6640 (synopsis "Framework for constructing recognizers, compilers, and translators")
6641 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6642 is a language tool that provides a framework for constructing recognizers,
6643 compilers, and translators from grammatical descriptions containing Java, C#,
6644 C++, or Python actions. ANTLR provides excellent support for tree construction,
6645 tree walking, and translation.")
6646 (license license:public-domain)))
6648 (define-public java-stringtemplate-3
6650 (name "java-stringtemplate")
6654 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6655 "gh-pages/download/stringtemplate-"
6659 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6660 (build-system ant-build-system)
6662 `(#:jar-name (string-append ,name "-" ,version ".jar")
6664 #:modules ((guix build ant-build-system)
6668 (modify-phases %standard-phases
6669 (add-before 'check 'fix-tests
6671 (substitute* "build.xml"
6672 (("\\$\\{test.home\\}/java")
6673 "${test.home}/org"))
6675 (add-before 'build 'generate-grammar
6677 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6678 (for-each (lambda (file)
6679 (format #t "~a\n" file)
6680 (invoke "antlr" file))
6681 '("template.g" "angle.bracket.template.g" "action.g"
6682 "eval.g" "group.g" "interface.g")))
6686 ("java-junit" ,java-junit)))
6687 (home-page "http://www.stringtemplate.org")
6688 (synopsis "Template engine to generate formatted text output")
6689 (description "StringTemplate is a java template engine (with ports for C#,
6690 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6691 or any other formatted text output. StringTemplate is particularly good at
6692 code generators, multiple site skins, and internationalization / localization.
6693 StringTemplate also powers ANTLR.")
6694 (license license:bsd-3)))
6696 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6697 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6698 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6699 ;; of antlr3 at runtime.
6700 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6701 ;; This version of ST4 is sufficient for the latest antlr3.
6702 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6703 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6704 ;; against the latest ST4.
6705 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6706 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6707 ;; only grammar files with the antlr2 syntax.
6708 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6710 (define-public java-stringtemplate
6711 (package (inherit java-stringtemplate-3)
6712 (name "java-stringtemplate")
6716 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6718 (file-name (string-append name "-" version ".tar.gz"))
6721 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6722 (build-system ant-build-system)
6724 `(#:jar-name (string-append ,name "-" ,version ".jar")
6725 #:tests? #f ; FIXME: tests fail for unknown reasons
6727 #:modules ((guix build ant-build-system)
6731 (modify-phases %standard-phases
6732 (add-before 'check 'fix-test-target
6734 (substitute* "build.xml"
6735 (("\\$\\{test.home\\}/java") "${test.home}/")
6736 (("\\*Test.java") "Test*.java"))
6738 (add-before 'build 'generate-grammar
6740 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6741 (for-each (lambda (file)
6742 (format #t "~a\n" file)
6743 (invoke "antlr3" file))
6744 '("STParser.g" "Group.g" "CodeGenerator.g")))
6747 `(("antlr3" ,antlr3-bootstrap)
6749 ("java-stringtemplate" ,java-stringtemplate-3)
6750 ("java-junit" ,java-junit)))))
6752 (define java-stringtemplate-4.0.6
6753 (package (inherit java-stringtemplate)
6754 (name "java-stringtemplate")
6758 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6760 (file-name (string-append name "-" version ".tar.gz"))
6763 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6765 `(("antlr3" ,antlr3-3.3)
6767 ("java-stringtemplate" ,java-stringtemplate-3)))))
6769 (define-public antlr3
6775 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6777 (file-name (string-append name "-" version ".tar.gz"))
6780 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6781 (build-system ant-build-system)
6783 `(#:jar-name (string-append ,name "-" ,version ".jar")
6784 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6787 (modify-phases %standard-phases
6788 (add-after 'install 'bin-install
6789 (lambda* (#:key inputs outputs #:allow-other-keys)
6790 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6791 (bin (string-append (assoc-ref outputs "out") "/bin")))
6793 (with-output-to-file (string-append bin "/antlr3")
6796 (string-append "#!" (which "sh") "\n"
6797 "java -cp " jar "/" ,name "-" ,version ".jar:"
6799 (find-files (assoc-ref inputs "stringtemplate")
6803 (find-files (assoc-ref inputs "stringtemplate4")
6807 (find-files (string-append
6808 (assoc-ref inputs "antlr")
6811 " org.antlr.Tool $*"))))
6812 (chmod (string-append bin "/antlr3") #o755))
6814 (add-before 'build 'generate-grammar
6816 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6817 (for-each (lambda (file)
6820 (invoke "antlr3" file))
6821 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6822 "AssignTokenTypesWalker.g"
6823 "ActionTranslator.g" "TreeToNFAConverter.g"
6824 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6825 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6826 (substitute* "ANTLRParser.java"
6827 (("public Object getTree") "public GrammarAST getTree"))
6828 (substitute* "ANTLRv3Parser.java"
6829 (("public Object getTree") "public CommonTree getTree"))
6830 (chdir "../../../../../java")
6831 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6832 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6833 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6834 (substitute* "org/antlr/tool/ErrorManager.java"
6835 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6836 (chdir "../../../..")
6838 (add-before 'build 'fix-build-xml
6840 (substitute* "build.xml"
6841 (("target name=\"compile\">")
6842 "target name=\"compile\">
6843 <copy todir=\"${classes.dir}\">
6844 <fileset dir=\"tool/src/main/resources\">
6845 <include name=\"**/*.stg\"/>
6846 <include name=\"**/*.st\"/>
6847 <include name=\"**/*.sti\"/>
6848 <include name=\"**/STLexer.tokens\"/>
6854 ("antlr3" ,antlr3-bootstrap)))
6856 `(("junit" ,java-junit)
6857 ("stringtemplate" ,java-stringtemplate-3)
6858 ("stringtemplate4" ,java-stringtemplate)))
6860 `(("stringtemplate" ,java-stringtemplate-3)
6862 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6863 (home-page "http://www.antlr3.org")
6864 (synopsis "Framework for constructing recognizers, compilers, and translators")
6865 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6866 is a language tool that provides a framework for constructing recognizers,
6867 compilers, and translators from grammatical descriptions containing Java, C#,
6868 C++, or Python actions. ANTLR provides excellent support for tree construction,
6869 tree walking, and translation.")
6870 (license license:bsd-3)))
6872 (define antlr3-bootstrap
6875 (name "antlr3-bootstrap")
6878 ("antlr3" ,antlr3-3.3)))
6880 `(("junit" ,java-junit)))))
6889 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6890 "gh-pages/download/antlr-"
6894 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6896 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6898 `(#:jar-name (string-append ,name "-" ,version ".jar")
6899 #:source-dir (string-join '("tool/src/main/java"
6900 "runtime/Java/src/main/java"
6901 "tool/src/main/antlr2"
6902 "tool/src/main/antlr3")
6904 #:tests? #f ; FIXME: tests seem to require maven plugin
6905 #:modules ((guix build ant-build-system)
6909 (modify-phases %standard-phases
6910 (add-after 'install 'bin-install
6911 (lambda* (#:key inputs outputs #:allow-other-keys)
6912 (let* ((out (assoc-ref outputs "out"))
6913 (jar (string-append out "/share/java"))
6914 (bin (string-append out "/bin")))
6916 (with-output-to-file (string-append bin "/antlr3")
6920 "#!" (which "sh") "\n"
6921 "java -cp " jar "/antlr3-3.3.jar:"
6923 (append (find-files (assoc-ref inputs "java-stringtemplate")
6925 (find-files (string-append (assoc-ref inputs "antlr")
6929 " org.antlr.Tool $*"))))
6930 (chmod (string-append bin "/antlr3") #o755)
6932 (add-before 'build 'generate-grammar
6934 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6935 (("import org.antlr.grammar.v2.\\*;")
6936 "import org.antlr.grammar.v2.*;\n
6937 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6938 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6939 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6940 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6941 (for-each (lambda (file)
6942 (format #t "~a\n" file)
6943 (invoke "antlr" file))
6944 '("antlr.g" "antlr.print.g" "assign.types.g"
6945 "buildnfa.g" "codegen.g" "define.g")))
6946 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6947 (for-each (lambda (file)
6948 (format #t "~a\n" file)
6949 (invoke "antlr3" file))
6950 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6953 (add-before 'build 'fix-build-xml
6955 (substitute* "build.xml"
6956 (("target name=\"compile\">")
6957 "target name=\"compile\">
6958 <copy todir=\"${classes.dir}\">
6959 <fileset dir=\"tool/src/main/resources\">
6960 <include name=\"**/*.stg\"/>
6961 <include name=\"**/*.st\"/>
6962 <include name=\"**/*.sti\"/>
6963 <include name=\"**/STLexer.tokens\"/>
6969 ("antlr3" ,antlr3-3.1)))
6971 `(("junit" ,java-junit)))
6973 `(("java-stringtemplate" ,java-stringtemplate-3)
6975 ("antlr3" ,antlr3-3.1)))))
6977 (define-public antlr3-3.1
6983 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6984 "gh-pages/download/antlr-"
6988 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6990 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6992 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6993 #:source-dir "src:runtime/Java/src"
6996 (modify-phases %standard-phases
6997 (add-after 'install 'bin-install
6998 (lambda* (#:key inputs outputs #:allow-other-keys)
6999 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7000 (bin (string-append (assoc-ref outputs "out") "/bin")))
7002 (with-output-to-file (string-append bin "/antlr3")
7005 (string-append "#!" (which "sh") "\n"
7006 "java -cp " jar "/antlr3-3.1.jar:"
7008 (find-files (assoc-ref inputs "stringtemplate")
7012 (find-files (string-append
7013 (assoc-ref inputs "antlr")
7016 " org.antlr.Tool $*"))))
7017 (chmod (string-append bin "/antlr3") #o755))
7019 (add-before 'build 'generate-grammar
7021 (let ((dir "src/org/antlr/tool/"))
7022 (for-each (lambda (file)
7025 (invoke "antlr" "-o" dir (string-append dir file)))
7026 '("antlr.g" "antlr.print.g" "assign.types.g"
7027 "buildnfa.g" "define.g")))
7028 (format #t "codegen.g\n")
7029 (invoke "antlr" "-o" "src/org/antlr/codegen"
7030 "src/org/antlr/codegen/codegen.g")
7032 (add-before 'build 'fix-build-xml
7034 (substitute* "build.xml"
7035 (("target name=\"compile\">")
7036 "target name=\"compile\">
7037 <copy todir=\"${classes.dir}\">
7038 <fileset dir=\"src\">
7039 <include name=\"**/*.stg\"/>
7040 <include name=\"**/*.st\"/>
7041 <include name=\"**/*.sti\"/>
7042 <include name=\"**/STLexer.tokens\"/>
7047 `(("antlr" ,antlr2)))
7049 `(("junit" ,java-junit)))
7051 `(("stringtemplate" ,java-stringtemplate-3)))))
7053 (define-public java-commons-cli-1.2
7054 ;; This is a bootstrap dependency for Maven2.
7056 (inherit java-commons-cli)
7060 (uri (string-append "mirror://apache/commons/cli/source/"
7061 "commons-cli-" version "-src.tar.gz"))
7064 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7066 `(#:jar-name "commons-cli.jar"
7068 (modify-phases %standard-phases
7069 (add-before 'check 'fix-build-xml
7070 (lambda* (#:key inputs #:allow-other-keys)
7071 (substitute* "build.xml"
7072 (("dir=\"\\$\\{test.home\\}/java\"")
7073 "dir=\"${test.home}\""))
7076 `(("java-junit" ,java-junit)))))
7078 (define-public java-microemulator-cldc
7080 (name "java-microemulator-cldc")
7084 (uri (string-append "https://github.com/barteo/microemu/archive/"
7086 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7089 (file-name (string-append name "-" version ".tar.gz"))
7092 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7093 (build-system ant-build-system)
7095 `(#:jar-name "microemulator-cldc.jar"
7096 #:source-dir "microemu-cldc/src/main/java"
7097 #:tests? #f)); Requires even older software
7098 (home-page "https://github.com/barteo/microemu")
7099 (synopsis "J2ME CLDC emulator")
7100 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7101 Emulator. It allows to demonstrate MIDlet based applications in web browser
7102 applet and can be run as a standalone java application.")
7103 (license (list license:asl2.0
7105 license:lgpl2.1+))))
7107 (define-public java-datanucleus-javax-persistence
7109 (name "java-datanucleus-javax-persistence")
7113 (uri (string-append "https://github.com/datanucleus/"
7114 "javax.persistence/archive/javax.persistence-"
7115 version "-release.tar.gz"))
7118 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7119 (build-system ant-build-system)
7121 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7123 #:source-dir "src/main/java"
7124 #:tests? #f)); no tests
7125 (home-page "https://github.com/datanucleus/javax.persistence")
7126 (synopsis "JPA API")
7127 (description "This package contains a clean definition of JPA API intended
7128 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7129 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7130 used to generate this API.")
7131 (license (list license:edl1.0 license:epl1.0))))
7133 (define-public java-osgi-cmpn
7135 (name "java-osgi-cmpn")
7139 (uri (string-append "http://central.maven.org/maven2/"
7140 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7141 version "-sources.jar"))
7144 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7145 (build-system ant-build-system)
7147 `(#:jar-name "osgi-cmpn.jar"
7148 #:tests? #f)); no tests
7150 `(("annotation" ,java-osgi-annotation)
7151 ("core" ,java-osgi-core)
7152 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7153 ("microemulator" ,java-microemulator-cldc)
7154 ("servlet" ,java-classpathx-servletapi)))
7155 (home-page "https://www.osgi.org")
7156 (synopsis "Compendium specification module of OSGi framework")
7158 "OSGi, for Open Services Gateway initiative framework, is a module system
7159 and service platform for the Java programming language. This package contains
7160 the compendium specification module, providing interfaces and classes for use
7161 in compiling bundles.")
7162 (license license:asl2.0)))
7164 (define-public java-osgi-service-component-annotations
7166 (name "java-osgi-service-component-annotations")
7170 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7171 "org.osgi.service.component.annotations/"
7172 version "/org.osgi.service.component.annotations-"
7173 version "-sources.jar"))
7176 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7177 (build-system ant-build-system)
7179 `(#:jar-name "osgi-service-component-annotations.jar"
7180 #:tests? #f)); no tests
7182 `(("annotation" ,java-osgi-annotation)))
7183 (home-page "https://www.osgi.org")
7184 (synopsis "Support annotations for osgi-service-component")
7186 "OSGi, for Open Services Gateway initiative framework, is a module system
7187 and service platform for the Java programming language. This package contains
7188 the support annotations for osgi-service-component.")
7189 (license license:asl2.0)))
7191 (define-public java-osgi-dto
7193 (name "java-osgi-dto")
7197 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7198 "org.osgi.dto/" version "/org.osgi.dto-"
7199 version "-sources.jar"))
7202 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7203 (build-system ant-build-system)
7205 `(#:jar-name "osgi-dto.jar"
7206 #:tests? #f)); no tests
7208 `(("annotation" ,java-osgi-annotation)))
7209 (home-page "https://www.osgi.org")
7210 (synopsis "Data Transfer Objects")
7212 "OSGi, for Open Services Gateway initiative framework, is a module system
7213 and service platform for the Java programming language. This package contains
7214 the Data Transfer Objects. It is easily serializable having only public fields
7215 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7216 Map and array aggregates may also be used. The aggregates must only hold
7217 objects of the listed types or aggregates.")
7218 (license license:asl2.0)))
7220 (define-public java-osgi-resource
7222 (name "java-osgi-resource")
7226 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7227 "org.osgi.resource/"
7228 version "/org.osgi.resource-"
7229 version "-sources.jar"))
7232 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7233 (build-system ant-build-system)
7235 `(#:jar-name "osgi-resource.jar"
7236 #:tests? #f)); no tests
7238 `(("annotation" ,java-osgi-annotation)
7239 ("dto" ,java-osgi-dto)))
7240 (home-page "https://www.osgi.org")
7241 (synopsis "OSGI Resource")
7243 "OSGi, for Open Services Gateway initiative framework, is a module system
7244 and service platform for the Java programming language. This package contains
7245 the definition of common types in osgi packages.")
7246 (license license:asl2.0)))
7248 (define-public java-osgi-namespace-contract
7250 (name "java-osgi-namespace-contract")
7254 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7255 "org.osgi.namespace.contract/"
7256 version "/org.osgi.namespace.contract-"
7257 version "-sources.jar"))
7260 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7261 (build-system ant-build-system)
7263 `(("resource" ,java-osgi-resource)
7264 ("annotation" ,java-osgi-annotation)))
7266 `(#:jar-name "osgi-namespace-contract.jar"
7267 #:tests? #f)); no tests
7268 (home-page "https://www.osgi.org")
7269 (synopsis "Contract Capability and Requirement Namespace")
7271 "OSGi, for Open Services Gateway initiative framework, is a module system
7272 and service platform for the Java programming language. This package contains
7273 the names for the attributes and directives for a namespace with contracts.")
7274 (license license:asl2.0)))
7276 (define-public java-osgi-namespace-extender
7278 (name "java-osgi-namespace-extender")
7282 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7283 "org.osgi.namespace.extender/"
7284 version "/org.osgi.namespace.extender-"
7285 version "-sources.jar"))
7288 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7289 (build-system ant-build-system)
7291 `(("resource" ,java-osgi-resource)
7292 ("annotation" ,java-osgi-annotation)))
7294 `(#:jar-name "osgi-namespace-extendent.jar"
7295 #:tests? #f)); no tests
7296 (home-page "https://www.osgi.org")
7297 (synopsis "Extender Capability and Requirement Namespace")
7299 "OSGi, for Open Services Gateway initiative framework, is a module system
7300 and service platform for the Java programming language. This package contains
7301 the names for the attributes and directives for an extender namespace.")
7302 (license license:asl2.0)))
7304 (define-public java-osgi-namespace-service
7306 (name "java-osgi-namespace-service")
7310 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7311 "org.osgi.namespace.service/"
7312 version "/org.osgi.namespace.service-"
7313 version "-sources.jar"))
7316 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7317 (build-system ant-build-system)
7319 `(("resource" ,java-osgi-resource)
7320 ("annotation" ,java-osgi-annotation)))
7322 `(#:jar-name "osgi-namespace-service.jar"
7323 #:tests? #f)); no tests
7324 (home-page "https://www.osgi.org")
7325 (synopsis "Service Capability and Requirement Namespace")
7327 "OSGi, for Open Services Gateway initiative framework, is a module system
7328 and service platform for the Java programming language. This package contains
7329 the names for the attributes and directives for a service namespace.")
7330 (license license:asl2.0)))
7332 (define-public java-osgi-util-function
7334 (name "java-osgi-util-function")
7338 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7339 "org.osgi.util.function/"
7340 version "/org.osgi.util.function-"
7341 version "-sources.jar"))
7344 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7345 (build-system ant-build-system)
7347 `(#:jar-name "osgi-util-function.jar"
7348 #:tests? #f)); no tests
7350 `(("annotation" ,java-osgi-annotation)))
7351 (home-page "https://www.osgi.org")
7352 (synopsis "OSGI Util Function")
7354 "OSGi, for Open Services Gateway initiative framework, is a module system
7355 and service platform for the Java programming language. This package contains
7356 an interface for a function that accepts a single argument and produces a result.")
7357 (license license:asl2.0)))
7359 (define-public java-osgi-util-promise
7361 (name "java-osgi-util-promise")
7365 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7366 "org.osgi.util.promise/"
7367 version "/org.osgi.util.promise-"
7368 version "-sources.jar"))
7371 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7372 (build-system ant-build-system)
7374 `(#:jar-name "osgi-util-promise.jar"
7375 #:tests? #f)); no tests
7377 `(("annotation" ,java-osgi-annotation)
7378 ("function" ,java-osgi-util-function)))
7379 (home-page "https://www.osgi.org")
7380 (synopsis "Promise of a value")
7382 "OSGi, for Open Services Gateway initiative framework, is a module system
7383 and service platform for the Java programming language. This package contains
7384 an interface and utilitary classes for promises. A Promise represents a future
7385 value. It handles the interactions for asynchronous processing.")
7386 (license license:asl2.0)))
7388 (define-public java-osgi-service-metatype-annotations
7390 (name "java-osgi-service-metatype-annotations")
7394 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7395 "org.osgi.service.metatype.annotations/"
7396 version "/org.osgi.service.metatype.annotations-"
7397 version "-sources.jar"))
7400 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7401 (build-system ant-build-system)
7403 `(#:jar-name "osgi-service-metatype-annotations.jar"
7404 #:tests? #f)); no tests
7406 `(("annotation" ,java-osgi-annotation)))
7407 (home-page "https://www.osgi.org")
7408 (synopsis "Support annotations for metatype")
7410 "OSGi, for Open Services Gateway initiative framework, is a module system
7411 and service platform for the Java programming language. This package contains
7412 the support annotations for metatype.")
7413 (license license:asl2.0)))
7415 (define-public java-osgi-service-repository
7417 (name "java-osgi-service-repository")
7421 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7422 "org.osgi.service.repository/"
7423 version "/org.osgi.service.repository-"
7424 version "-sources.jar"))
7427 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7428 (build-system ant-build-system)
7430 `(#:jar-name "osgi-service-repository.jar"
7431 #:tests? #f)); no tests
7433 `(("annotation" ,java-osgi-annotation)
7434 ("promise" ,java-osgi-util-promise)
7435 ("resource" ,java-osgi-resource)))
7436 (home-page "https://www.osgi.org")
7437 (synopsis "OSGI service repository")
7439 "OSGi, for Open Services Gateway initiative framework, is a module system
7440 and service platform for the Java programming language. This package contains
7441 a repository service that contains resources.")
7442 (license license:asl2.0)))
7444 (define-public java-osgi-framework
7446 (name "java-osgi-framework")
7450 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7451 "org.osgi.framework/" version "/org.osgi.framework-"
7452 version "-sources.jar"))
7455 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7456 (build-system ant-build-system)
7458 `(#:jar-name "osgi-framework.jar"
7459 #:tests? #f)); no tests
7461 `(("annotation" ,java-osgi-annotation)
7462 ("resource" ,java-osgi-resource)
7463 ("dto" ,java-osgi-dto)))
7464 (home-page "https://www.osgi.org")
7465 (synopsis "OSGi framework")
7467 "OSGi, for Open Services Gateway initiative framework, is a module system
7468 and service platform for the Java programming language.")
7469 (license license:asl2.0)))
7471 (define-public java-osgi-service-log
7473 (name "java-osgi-service-log")
7477 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7478 "org.osgi.service.log/"
7479 version "/org.osgi.service.log-"
7480 version "-sources.jar"))
7483 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7484 (build-system ant-build-system)
7486 `(#:jar-name "osgi-service-log.jar"
7487 #:tests? #f)); no tests
7489 `(("java-osgi-framework" ,java-osgi-framework)))
7490 (home-page "https://www.osgi.org")
7491 (synopsis "Provides methods for bundles to write messages to the log")
7493 "OSGi, for Open Services Gateway initiative framework, is a module system
7494 and service platform for the Java programming language. This package contains
7496 (license license:asl2.0)))
7498 (define-public java-osgi-service-jdbc
7500 (name "java-osgi-service-jdbc")
7504 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7505 "org.osgi.service.jdbc/"
7506 version "/org.osgi.service.jdbc-"
7507 version "-sources.jar"))
7510 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7511 (build-system ant-build-system)
7513 `(#:jar-name "osgi-service-jdbc.jar"
7514 #:tests? #f)); no tests
7515 (home-page "https://www.osgi.org")
7516 (synopsis "Factory for JDBC connection factories")
7518 "OSGi, for Open Services Gateway initiative framework, is a module system
7519 and service platform for the Java programming language. This package contains
7520 a factory for JDBC connection factories. There are 3 preferred connection
7521 factories for getting JDBC connections:
7524 @item @code{javax.sql.DataSource};
7525 @item @code{javax.sql.ConnectionPoolDataSource};
7526 @item @code{javax.sql.XADataSource}.
7528 (license license:asl2.0)))
7530 (define-public java-osgi-service-resolver
7532 (name "java-osgi-service-resolver")
7536 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7537 "org.osgi.service.resolver/"
7538 version "/org.osgi.service.resolver-"
7539 version "-sources.jar"))
7542 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7543 (build-system ant-build-system)
7545 `(#:jar-name "osgi-service-resolver.jar"
7546 #:tests? #f)); no tests
7548 `(("annotation" ,java-osgi-annotation)
7549 ("resource" ,java-osgi-resource)))
7550 (home-page "https://www.osgi.org")
7551 (synopsis "OSGI Resolver service")
7553 "OSGi, for Open Services Gateway initiative framework, is a module system
7554 and service platform for the Java programming language. This package contains
7555 a resolver service that resolves the specified resources in the context supplied
7557 (license license:asl2.0)))
7559 (define-public java-osgi-util-tracker
7561 (name "java-osgi-util-tracker")
7565 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7566 "org.osgi.util.tracker/"
7567 version "/org.osgi.util.tracker-"
7568 version "-sources.jar"))
7571 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7572 (build-system ant-build-system)
7574 `(#:jar-name "osgi-util-tracker.jar"
7575 #:tests? #f)); no tests
7577 `(("framework" ,java-osgi-framework)
7578 ("annotation" ,java-osgi-annotation)))
7579 (home-page "https://www.osgi.org")
7580 (synopsis "Bundle tracking")
7582 "OSGi, for Open Services Gateway initiative framework, is a module system
7583 and service platform for the Java programming language. This package contains
7584 bundle tracking utility classes.")
7585 (license license:asl2.0)))
7587 (define-public java-osgi-service-cm
7589 (name "java-osgi-service-cm")
7593 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7594 "org.osgi.service.cm/"
7595 version "/org.osgi.service.cm-"
7596 version "-sources.jar"))
7599 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7600 (build-system ant-build-system)
7602 `(#:jar-name "osgi-service-cm.jar"
7603 #:tests? #f)); no tests
7605 `(("framework" ,java-osgi-framework)
7606 ("annotation" ,java-osgi-annotation)))
7607 (home-page "https://www.osgi.org")
7608 (synopsis "OSGI Configuration Management")
7610 "OSGi, for Open Services Gateway initiative framework, is a module system
7611 and service platform for the Java programming language. This package contains
7612 utility classes for the configuration of services.")
7613 (license license:asl2.0)))
7615 (define-public java-osgi-service-packageadmin
7617 (name "java-osgi-service-packageadmin")
7621 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7622 "org.osgi.service.packageadmin/"
7623 version "/org.osgi.service.packageadmin-"
7624 version "-sources.jar"))
7627 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7628 (build-system ant-build-system)
7630 `(#:jar-name "osgi-service-packageadmin.jar"
7631 #:tests? #f)); no tests
7633 `(("framework" ,java-osgi-framework)))
7634 (home-page "https://www.osgi.org")
7635 (synopsis "OSGI Package Administration")
7637 "OSGi, for Open Services Gateway initiative framework, is a module system
7638 and service platform for the Java programming language. This package contains
7639 the packageadmin service.")
7640 (license license:asl2.0)))
7642 (define-public java-ops4j-base-lang
7644 (name "java-ops4j-base-lang")
7648 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7649 "archive/base-" version ".tar.gz"))
7652 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7653 (build-system ant-build-system)
7655 `(#:jar-name "java-ops4j-base-lang.jar"
7656 #:source-dir "ops4j-base-lang/src/main/java"
7657 #:tests? #f; no tests
7659 (modify-phases %standard-phases
7660 (add-before 'build 'add-test-file
7662 ;; That file is required by a test in ops4j-pax-exam-core-spi
7663 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7664 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7668 "version=" ,version "\n"
7669 "groupId=org.ops4j.base"
7670 "artifactId=ops4j-base-lang\n"))))
7672 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7673 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7674 (description "OPS4J stands for Open Participation Software for Java. This
7675 package contains utilities and extensions related to @code{java.lang}.")
7676 (license license:asl2.0)))
7678 (define-public java-ops4j-base-monitors
7680 (inherit java-ops4j-base-lang)
7681 (name "java-ops4j-base-monitors")
7683 `(#:jar-name "java-ops4j-base-monitors.jar"
7684 #:source-dir "ops4j-base-monitors/src/main/java"
7685 #:tests? #f)); no tests
7687 `(("lang" ,java-ops4j-base-lang)))
7688 (description "OPS4J stands for Open Participation Software for Java. This
7689 package contains utilities and extensions related to monitoring.")))
7691 (define-public java-ops4j-base-io
7693 (inherit java-ops4j-base-lang)
7694 (name "java-ops4j-base-io")
7696 `(#:jar-name "java-ops4j-base-io.jar"
7697 #:source-dir "ops4j-base-io/src/main/java"
7698 #:test-dir "ops4j-base-io/src/test"
7700 (list "**/ListerTest.java")))
7702 `(("lang" ,java-ops4j-base-monitors)
7703 ("lang" ,java-ops4j-base-lang)))
7705 `(("junit" ,java-junit)
7706 ("hamcrest" ,java-hamcrest-core)))
7707 (description "OPS4J stands for Open Participation Software for Java. This
7708 package contains utilities and extensions related to handling streams and files.")))
7710 (define-public java-ops4j-base-util
7712 (inherit java-ops4j-base-lang)
7713 (name "java-ops4j-base-util")
7715 `(#:jar-name "java-ops4j-base-util.jar"
7716 #:source-dir "ops4j-base-util/src/main/java"
7717 #:test-dir "ops4j-base-util/src/test"))
7719 `(("lang" ,java-ops4j-base-lang)))
7721 `(("junit" ,java-junit)))
7722 (description "OPS4J stands for Open Participation Software for Java. This
7723 package contains utilities and extensions related to environment, i18n and
7726 (define-public java-ops4j-base-util-property
7728 (inherit java-ops4j-base-lang)
7729 (name "java-ops4j-base-util-property")
7731 `(#:jar-name "java-ops4j-base-util-property.jar"
7732 #:source-dir "ops4j-base-util-property/src/main/java"
7733 #:tests? #f)); no tests
7735 `(("lang" ,java-ops4j-base-lang)
7736 ("util" ,java-ops4j-base-util)))
7737 (description "OPS4J stands for Open Participation Software for Java. This
7738 package contains utilities and extensions related to resolving properties from
7739 different sources.")))
7741 (define-public java-ops4j-base-store
7743 (inherit java-ops4j-base-lang)
7744 (name "java-ops4j-base-store")
7746 `(#:jar-name "java-ops4j-base-store.jar"
7747 #:source-dir "ops4j-base-store/src/main/java"
7748 #:tests? #f)); no tests
7750 `(("lang" ,java-ops4j-base-lang)
7751 ("slf4j" ,java-slf4j-api)
7752 ("io" ,java-ops4j-base-io)))
7753 (description "OPS4J stands for Open Participation Software for Java. This
7754 package contains utilities for storing and retrieving data from an
7755 @code{InputStream}.")))
7757 (define-public java-ops4j-base-spi
7759 (inherit java-ops4j-base-lang)
7760 (name "java-ops4j-base-spi")
7762 `(#:jar-name "java-ops4j-base-spi.jar"
7763 #:source-dir "ops4j-base-spi/src/main/java"
7764 #:test-dir "ops4j-base-spi/src/test"))
7766 `(("junit" ,java-junit)
7767 ("hamcrest" ,java-hamcrest-core)))
7768 (description "OPS4J stands for Open Participation Software for Java. This
7769 package contains utilities for obtaining services via the Java SE 6
7770 @code{ServiceLoader}.")))
7772 (define-public java-aqute-bnd-annotation
7774 (name "java-aqute-bnd-annotation")
7778 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7779 version ".REL.tar.gz"))
7780 (file-name (string-append name "-" version ".tar.gz"))
7783 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7784 (build-system ant-build-system)
7786 `(#:jar-name "java-aqute-bnd-annotation.jar"
7787 #:source-dir "biz.aQute.bnd.annotation/src"
7788 #:tests? #f)); empty test dir
7789 (home-page "http://bnd.bndtools.org/")
7790 (synopsis "Tools for OSGi")
7791 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7792 headers based on analyzing the class code, it verifies the project settings,
7793 it manages project dependencies, gives diffs jars, and much more.")
7794 (license license:asl2.0)))
7796 (define-public java-aqute-libg
7798 (inherit java-aqute-bnd-annotation)
7799 (name "java-aqute-libg")
7801 `(#:jar-name "java-aqute-libg.jar"
7802 ;; The build fails when source/target more recent than 1.7. This
7803 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7805 ;; It is closed as won't fix. There is no way to change the source
7806 ;; so that it works on 1.8, and still works on 1.6, the upstream
7807 ;; target. It work fine on 1.7, so we use 1.7.
7808 #:make-flags (list "-Dant.build.javac.source=1.7"
7809 "-Dant.build.javac.target=1.7")
7811 (modify-phases %standard-phases
7812 (add-before 'configure 'chdir
7813 ;; Change to aQute.libg directory, so that the relative
7814 ;; paths in the tests aren't broken.
7816 (chdir "aQute.libg")
7818 (add-before 'check 'create-test-directory
7819 ;; Copy the test directory to test/java, since that's where
7820 ;; ant-build-system's default project in build.xml expects to find
7821 ;; the test classes. Leave a copy in the original place to not
7822 ;; break paths in tests.
7825 (copy-recursively "test" "src/test/java")
7828 `(("slf4j" ,java-slf4j-api)
7829 ("osgi-annot" ,java-osgi-annotation)
7830 ("java-osgi-cmpn" ,java-osgi-cmpn)
7831 ("osgi" ,java-osgi-core)))
7833 `(("hamcrest" ,java-hamcrest-core)
7834 ("java-junit" ,java-junit)))))
7836 (define java-aqute-libg-bootstrap
7838 (inherit java-aqute-libg)
7839 (name "java-aqute-libg-bootstrap")
7841 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7842 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7843 ((#:tests? _ #f) #f)))
7845 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7846 ,@(delete `("slf4j" ,java-slf4j-api)
7847 (package-inputs java-aqute-libg))))
7848 (native-inputs '())))
7850 (define-public java-aqute-bndlib
7852 (inherit java-aqute-bnd-annotation)
7853 (name "java-aqute-bndlib")
7855 `(#:jar-name "java-bndlib.jar"
7856 #:source-dir "biz.aQute.bndlib/src"
7857 #:tests? #f)); no tests
7859 `(("slf4j" ,java-slf4j-api)
7860 ("osgi-annot" ,java-osgi-annotation)
7861 ("java-aqute-libg" ,java-aqute-libg)
7862 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7863 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7864 ("java-osgi-service-repository" ,java-osgi-service-repository)
7865 ("java-osgi-service-log" ,java-osgi-service-log)
7866 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7867 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7868 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7869 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7870 ("promise" ,java-osgi-util-promise)
7871 ("osgi" ,java-osgi-core)))))
7873 (define java-aqute-bndlib-bootstrap
7875 (inherit java-aqute-bndlib)
7876 (name "java-aqute-bndlib-bootstrap")
7878 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7879 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7880 ,@(delete `("slf4j" ,java-slf4j-api)
7881 (delete `("java-aqute-libg" ,java-aqute-libg)
7882 (package-inputs java-aqute-bndlib)))))))
7884 (define-public java-ops4j-pax-tinybundles
7886 (name "java-ops4j-pax-tinybundles")
7890 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7891 "archive/tinybundles-" version ".tar.gz"))
7894 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7896 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7897 #:source-dir "src/main/java"
7899 ;; Abstract base classes for other tests
7900 (list "**/BndTest.java" "**/CoreTest.java")
7902 (modify-phases %standard-phases
7903 (add-before 'check 'fix-version
7905 ;; This test has a reference to an old version of bndlib we are not
7906 ;; packaging. It uses the version referenced in pom.xml. We replace
7907 ;; it with our own version.
7908 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7909 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7910 ,(package-version java-aqute-bndlib)))
7913 `(("lang" ,java-ops4j-base-lang)
7914 ("io" ,java-ops4j-base-io)
7915 ("store" ,java-ops4j-base-store)
7916 ("slf4j" ,java-slf4j-api)
7917 ("libg" ,java-aqute-libg)
7918 ("bndlib" ,java-aqute-bndlib)))
7920 `(("junit" ,java-junit)
7921 ("hamcrest" ,java-hamcrest-core)
7922 ("log4j" ,java-log4j-api)
7923 ("bndannotation" ,java-aqute-bnd-annotation)
7924 ("framework" ,java-osgi-framework)))
7925 (build-system ant-build-system)
7926 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7927 (synopsis "Java APIs to create OSGi related artifacts")
7928 (description "Tinybundles is all about creating OSGi related artifacts like
7929 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
7930 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7931 other hand, this library can be a foundation of real end user tools that need
7932 to create those artifacts.")
7933 (license license:asl2.0)))
7935 (define-public java-ops4j-pax-exam-core
7937 (name "java-ops4j-pax-exam-core")
7941 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7942 "archive/exam-reactor-" version ".tar.gz"))
7945 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7947 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7948 #:source-dir "core/pax-exam/src/main/java"
7949 #:test-dir "core/pax-exam/src/test"))
7951 `(("slf4j" ,java-slf4j-api)
7952 ("lang" ,java-ops4j-base-lang)
7953 ("io" ,java-ops4j-base-io)
7954 ("util-property" ,java-ops4j-base-util-property)
7955 ("util-store" ,java-ops4j-base-store)
7956 ("java-osgi-core" ,java-osgi-core)))
7958 `(("junit" ,java-junit)
7959 ("hamcrest" ,java-hamcrest-core)))
7960 (build-system ant-build-system)
7961 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7962 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7963 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7964 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7965 the system under test at the same time.")
7966 (license license:asl2.0)))
7968 (define-public java-ops4j-pax-exam-core-spi
7970 (inherit java-ops4j-pax-exam-core)
7971 (name "java-ops4j-pax-exam-core-spi")
7973 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7974 #:source-dir "src/main/java"
7977 ;; Abstract base class, not a test
7978 "**/BaseStagedReactorTest.java"
7979 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7980 "**/WarBuilderTest.java")
7982 (modify-phases %standard-phases
7983 (add-before 'configure 'chdir
7985 ;; Tests assume we are in this directory
7986 (chdir "core/pax-exam-spi")
7988 (add-before 'check 'fix-tests
7990 ;; One test checks that this file is present.
7991 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7992 (with-output-to-file
7993 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7996 (string-append "artifactId = pax-exam-spi\n"
7997 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7998 ;; Maven puts compilation results in the target directory, while we
7999 ;; put them in the build directory.
8000 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8001 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8002 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8003 (("target") "build"))
8004 ;; One test is expected to fail, but it doesn't throw the expected exception
8005 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8006 (("AssertionError") "IllegalArgumentException"))
8009 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8010 ("lang" ,java-ops4j-base-lang)
8011 ("monitors" ,java-ops4j-base-monitors)
8012 ("store" ,java-ops4j-base-store)
8013 ("io" ,java-ops4j-base-io)
8014 ("spi" ,java-ops4j-base-spi)
8015 ("osgi" ,java-osgi-core)
8016 ("slf4j" ,java-slf4j-api)
8017 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8019 `(("mockito" ,java-mockito-1)
8020 ("junit" ,java-junit)
8021 ("hamcrest" ,java-hamcrest-core)
8022 ("cglib" ,java-cglib)
8023 ("objenesis" ,java-objenesis)
8024 ("asm" ,java-asm)))))
8026 (define-public java-ops4j-pax-exam-core-junit
8028 (inherit java-ops4j-pax-exam-core)
8029 (name "java-ops4j-pax-exam-core-junit")
8031 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8032 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8033 #:tests? #f)); no tests
8035 `(("junit" ,java-junit)
8036 ("slf4j" ,java-slf4j-api)
8037 ("core" ,java-ops4j-pax-exam-core)
8038 ("spi" ,java-ops4j-pax-exam-core-spi)))
8039 (native-inputs '())))
8041 (define-public java-fasterxml-jackson-annotations
8043 (name "java-fasterxml-jackson-annotations")
8047 (uri (string-append "https://github.com/FasterXML/"
8048 "jackson-annotations/archive/"
8049 "jackson-annotations-" version ".tar.gz"))
8052 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8053 (build-system ant-build-system)
8055 `(#:jar-name "jackson-annotations.jar"
8056 #:source-dir "src/main/java"
8057 #:test-dir "src/test"))
8059 `(("junit" ,java-junit)))
8060 (home-page "https://github.com/FasterXML/jackson-annotations")
8061 (synopsis "General purpose annotations for the Jackson Data Processor")
8062 (description "This package contains general purpose annotations for the
8063 Jackson Data Processor, used on value and handler types. The only annotations
8064 not included are ones that require dependency to the Databind package.")
8065 (license license:asl2.0)))
8067 (define-public java-fasterxml-jackson-core
8069 (name "java-fasterxml-jackson-core")
8073 (uri (string-append "https://github.com/FasterXML/"
8074 "jackson-core/archive/"
8075 "jackson-core-" version ".tar.gz"))
8078 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8079 (build-system ant-build-system)
8081 `(#:jar-name "jackson-core.jar"
8082 #:source-dir "src/main/java"
8083 #:test-dir "src/test"
8086 ;; Expected failure. pom.xml excludes these
8088 ;; Base classes that have no constructor for junit
8090 "**/ConcurrencyReadTest.java"
8091 "**/ManualCharAccessTest.java"
8092 "**/ManualCharAccessTest.java"
8093 "**/TrailingCommasTest.java"
8094 "**/AsyncMissingValuesInObjectTest.java"
8095 "**/AsyncMissingValuesInArrayTest.java")
8097 (modify-phases %standard-phases
8098 (add-before 'configure 'generate-PackageVersion.java
8100 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8101 (in (string-append out ".in")))
8104 (("@package@") "com.fasterxml.jackson.core.json")
8105 (("@projectversion@") ,version)
8106 (("@projectgroupid@") "com.fasterxml.jackson.core")
8107 (("@projectartifactid@") "jackson-core")))
8109 (add-before 'build 'copy-resources
8111 (copy-recursively "src/main/resources"
8114 (add-before 'check 'copy-test-resources
8116 (copy-recursively "src/test/resources"
8117 "build/test-classes")
8120 `(("junit" ,java-junit)
8121 ("hamcrest" ,java-hamcrest-core)))
8122 (home-page "https://github.com/FasterXML/jackson-core")
8125 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8127 (define-public java-fasterxml-jackson-databind
8129 (name "java-fasterxml-jackson-databind")
8133 (uri (string-append "https://github.com/FasterXML/"
8134 "jackson-databind/archive/"
8135 "jackson-databind-" version ".tar.gz"))
8138 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8139 (build-system ant-build-system)
8141 `(#:jar-name "jackson-databind.jar"
8142 #:source-dir "src/main/java"
8143 #:tests? #f; requires javax.measures for which I can't find a free implementation
8145 (modify-phases %standard-phases
8146 (add-before 'configure 'generate-PackageVersion.java
8148 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8149 (in (string-append out ".in")))
8152 (("@package@") "com.fasterxml.jackson.databind.cfg")
8153 (("@projectversion@") ,version)
8154 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8155 (("@projectartifactid@") "jackson-databind")))
8157 (add-before 'build 'copy-resources
8159 (copy-recursively "src/main/resources" "build/classes")
8162 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8163 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8164 (home-page "https://github.com/FasterXML/jackson-databind")
8165 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8166 (description "This package contains the general-purpose data-binding
8167 functionality and tree-model for Jackson Data Processor. It builds on core
8168 streaming parser/generator package, and uses Jackson Annotations for
8170 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8172 (define-public java-fasterxml-jackson-modules-base-jaxb
8174 (name "java-fasterxml-jackson-modules-base-jaxb")
8178 (uri (string-append "https://github.com/FasterXML/"
8179 "jackson-modules-base/archive/"
8180 "jackson-modules-base-" version ".tar.gz"))
8183 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8184 (build-system ant-build-system)
8186 `(#:jar-name "jackson-modules-base-jaxb.jar"
8187 #:source-dir "jaxb/src/main/java"
8188 #:test-dir "jaxb/src/test"
8190 ;; Base class for tests
8191 (list "**/BaseJaxbTest.java")
8193 (modify-phases %standard-phases
8194 (add-before 'configure 'generate-PackageVersion.java
8196 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8197 "jackson/module/jaxb/PackageVersion.java"))
8198 (in (string-append out ".in")))
8201 (("@package@") "com.fasterxml.jackson.module.jaxb")
8202 (("@projectversion@") ,version)
8203 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8204 (("@projectartifactid@") "jackson-module-jaxb")))
8206 (add-before 'build 'copy-resources
8208 (copy-recursively "jaxb/src/main/resources" "build/classes")
8211 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8212 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8213 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8215 `(("java-junit" ,java-junit)))
8216 (home-page "https://github.com/FasterXML/jackson-modules-base")
8217 (synopsis "Jaxb annotations jackson module")
8218 (description "This package is the jaxb annotations module for jackson.")
8219 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8221 (define-public java-fasterxml-jackson-modules-base-mrbean
8223 (name "java-fasterxml-jackson-modules-base-mrbean")
8227 (uri (string-append "https://github.com/FasterXML/"
8228 "jackson-modules-base/archive/"
8229 "jackson-modules-base-" version ".tar.gz"))
8232 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8233 (build-system ant-build-system)
8235 `(#:jar-name "jackson-modules-base-mrbean.jar"
8236 #:source-dir "mrbean/src/main/java"
8237 #:test-dir "mrbean/src/test"
8239 ;; Base class for tests
8240 (list "**/BaseTest.java")
8242 (modify-phases %standard-phases
8243 (add-before 'configure 'generate-PackageVersion.java
8245 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8246 "jackson/module/mrbean/PackageVersion.java"))
8247 (in (string-append out ".in")))
8250 (("@package@") "com.fasterxml.jackson.module.mrbean")
8251 (("@projectversion@") ,version)
8252 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8253 (("@projectartifactid@") "jackson-module-mrbean")))
8256 `(("java-asm" ,java-asm)
8257 ("java-fasterxml-jackson-annotations"
8258 ,java-fasterxml-jackson-annotations)
8259 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8260 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8262 `(("java-junit" ,java-junit)))
8263 (home-page "https://github.com/FasterXML/jackson-modules-base")
8264 (synopsis "POJO type materialization for Java")
8265 (description "This package implements POJO type materialization.
8266 Databinders can construct implementation classes for Java interfaces as part
8267 of deserialization.")
8268 (license license:asl2.0)))
8270 (define-public java-snakeyaml
8272 (name "java-snakeyaml")
8276 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8278 (file-name (string-append name "-" version ".tar.gz"))
8281 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8282 (build-system ant-build-system)
8284 `(#:jar-name "java-snakeyaml.jar"
8285 #:source-dir "src/main/java"
8286 ;; Tests require velocity, a cyclic dependency, and
8287 ;; java-spring-framework-context which is not packaged.
8289 (home-page "https://bitbucket.org/asomov/snakeyaml")
8290 (synopsis "YAML processor")
8291 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8292 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8294 (define-public java-fasterxml-jackson-dataformat-yaml
8296 (name "java-fasterxml-jackson-dataformat-yaml")
8300 (uri (string-append "https://github.com/FasterXML/"
8301 "jackson-dataformats-text/archive/"
8302 "jackson-dataformats-text-" version ".tar.gz"))
8305 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8306 (build-system ant-build-system)
8308 `(#:jar-name "jackson-dataformat-yaml.jar"
8309 #:source-dir "yaml/src/main/java"
8310 #:test-dir "yaml/src/test"
8311 #:test-exclude (list "**/failing/**.java")
8313 (modify-phases %standard-phases
8314 (add-before 'configure 'generate-PackageVersion.java
8316 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8317 (in (string-append out ".in")))
8320 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8321 (("@projectversion@") ,version)
8322 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8323 (("@projectartifactid@") "jackson-dataformat-yaml")))
8326 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8327 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8328 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8329 ("java-snakeyaml" ,java-snakeyaml)))
8331 `(("junit" ,java-junit)
8332 ("hamcrest" ,java-hamcrest-core)
8333 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8334 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8335 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8336 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8337 (synopsis "Yaml backend for Jackson")
8338 (description "Dataformat backends are used to support format alternatives
8339 to JSON, supported by default. This is done by sub-classing Jackson core
8341 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8343 (define-public java-stax2-api
8345 (name "java-stax2-api")
8349 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8350 "stax2-api-" version ".tar.gz"))
8353 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8354 (build-system ant-build-system)
8356 `(#:jar-name "java-stax2-api.jar"
8357 #:source-dir "src/main/java"
8358 #:tests? #f)); no tests
8359 (home-page "https://github.com/FasterXML/stax2-api")
8360 (synopsis "Stax2 API")
8361 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8362 significant new functionalities, such as full-featured bi-direction validation
8363 interface and high-performance Typed Access API.")
8364 (license license:bsd-2)))
8366 (define-public java-woodstox-core
8368 (name "java-woodstox-core")
8372 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8373 "woodstox-core-" version ".tar.gz"))
8376 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8377 (build-system ant-build-system)
8379 `(#:jar-name "woodstox.jar"
8381 (list "**/Base*.java" "failing/**")
8383 (modify-phases %standard-phases
8384 (add-before 'build 'remove-msv-dep
8386 ;; we don't need osgi, and it depends on msv
8387 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8388 ;; msv's latest release is from 2011 and we don't need it
8389 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8390 (delete-file-recursively "src/test/java/wstxtest/osgi")
8391 (delete-file-recursively "src/test/java/wstxtest/msv")
8393 (add-before 'build 'copy-resources
8395 (copy-recursively "src/main/resources" "build/classes")
8398 `(("stax2" ,java-stax2-api)))
8400 `(("junit" ,java-junit)))
8401 (home-page "https://github.com/FasterXML/woodstox")
8402 (synopsis "Stax XML API implementation")
8403 (description "Woodstox is a stax XML API implementation.")
8404 (license license:asl2.0)))
8406 (define-public java-fasterxml-jackson-dataformat-xml
8408 (name "java-fasterxml-jackson-dataformat-xml")
8412 (uri (string-append "https://github.com/FasterXML/"
8413 "jackson-dataformat-xml/archive/"
8414 "jackson-dataformat-xml-" version ".tar.gz"))
8417 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8418 (build-system ant-build-system)
8420 `(#:jar-name "jackson-dataformat-xml.jar"
8421 #:source-dir "src/main/java"
8423 (list "**/failing/**")
8425 (modify-phases %standard-phases
8426 (add-before 'configure 'generate-PackageVersion.java
8428 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8429 (in (string-append out ".in")))
8433 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8434 (("@projectversion@") ,version)
8435 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8436 (("@projectartifactid@") "jackson-dataformat-xml")))
8438 (add-before 'build 'copy-resources
8440 (copy-recursively "src/main/resources" "build/classes")
8443 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8444 ("jackson-core" ,java-fasterxml-jackson-core)
8445 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8446 ("jackson-databind" ,java-fasterxml-jackson-databind)
8447 ("stax2-api" ,java-stax2-api)
8448 ("woodstox" ,java-woodstox-core)))
8450 `(("junit" ,java-junit)
8451 ("hamcrest" ,java-hamcrest-core)))
8452 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8453 (synopsis "Read and write XML")
8454 (description "This package contains Jackson extension component for reading
8455 and writing XML encoded data.
8457 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8458 approach (that is, no support is added for \"Schema-first\" approach). Support
8459 for JAXB annotations is provided by JAXB annotation module; this module
8460 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8461 @code{JsonFactory}) as well as small number of higher level overrides needed to
8462 make data-binding work.")
8463 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8465 (define-public java-hdrhistogram
8467 (name "java-hdrhistogram")
8471 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8472 "archive/HdrHistogram-" version ".tar.gz"))
8475 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8476 (build-system ant-build-system)
8478 `(#:jar-name "java-hdrhistogram.jar"
8479 #:source-dir "src/main/java"
8481 (modify-phases %standard-phases
8482 (add-before 'configure 'set-version
8484 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8485 (template (string-append version-java ".template")))
8486 (copy-file template version-java)
8487 (substitute* version-java
8488 (("\\$VERSION\\$") ,version)
8489 (("\\$BUILD_TIME\\$") "0"))
8492 `(("junit" ,java-junit)
8493 ("hamcrest" ,java-hamcrest-core)))
8494 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8495 (synopsis "High dynamic range histogram")
8496 (description "Hdrhistogram allows to create histograms that support
8497 recording and analyzing sampled data value counts across a configurable integer
8498 value range with configurable value precision within the range. Value precision
8499 is expressed as the number of significant digits in the value recording, and
8500 provides control over value quantization behavior across the value range and
8501 the subsequent value resolution at any given level.")
8502 (license license:public-domain)))
8504 (define-public java-cofoja
8506 (name "java-cofoja")
8511 (url "https://github.com/nhatminhle/cofoja.git")
8512 (commit (string-append "v" version))))
8513 (file-name (string-append "java-cofoja-" version "-checkout"))
8516 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8517 (build-system ant-build-system)
8519 `(#:build-target "dist"
8520 #:test-target "test"
8523 (list "-Ddist.dir=dist")
8524 #:modules ((guix build ant-build-system)
8525 (guix build java-utils)
8530 (modify-phases %standard-phases
8531 ;; The bulid system ignores the class path the ant-build-system sets
8532 ;; up and instead expects to find all dependencies in the "lib"
8534 (add-after 'unpack 'create-libdir
8535 (lambda* (#:key inputs #:allow-other-keys)
8539 (let ((target (string-append "lib/" (basename file))))
8540 (unless (file-exists? target)
8541 (symlink file target))))
8542 (append-map (match-lambda
8544 (find-files dir "\\.jar$")))
8547 (replace 'install (install-jars "dist")))))
8549 `(("java-asm" ,java-asm)))
8551 `(("java-junit" ,java-junit)))
8552 (home-page "https://github.com/nhatminhle/cofoja")
8553 (synopsis "Contracts for Java")
8554 (description "Contracts for Java, or Cofoja for short, is a contract
8555 programming framework and test tool for Java, which uses annotation processing
8556 and bytecode instrumentation to provide run-time checking. (In particular,
8557 this is not a static analysis tool.)")
8558 (license license:lgpl3+)))
8560 (define-public java-aopalliance
8562 (name "java-aopalliance")
8566 ;; Note: this git repository is not official, but contains the
8567 ;; source code that is in the CVS repository. Downloading the
8568 ;; tarball from sourceforge is undeterministic, and the cvs download
8571 (url "https://github.com/hoverruan/aopalliance")
8572 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8573 (file-name (string-append name "-" version))
8576 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8577 (build-system ant-build-system)
8579 `(#:jar-name "java-aopalliance.jar"
8581 #:tests? #f; no tests
8582 #:source-dir "aopalliance/src/main"))
8583 (home-page "http://aopalliance.sourceforge.net")
8584 (synopsis "Aspect-Oriented Programming")
8585 (description "The AOP Alliance project is a joint project between several
8586 software engineering people who are interested in Aspect-Oriented Programming
8588 (license license:public-domain)))
8590 (define-public java-javax-inject
8592 (name "java-javax-inject")
8596 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8597 "archive/javax.inject-" version ".tar.gz"))
8600 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8601 (build-system ant-build-system)
8603 `(#:jar-name "java-javax-inject.jar"
8605 #:tests? #f)); no tests
8606 (home-page "http://github.com/javax-inject/javax-inject")
8607 (synopsis "JSR-330: Dependency Injection for Java")
8608 (description "This package specifies a means for obtaining objects in such
8609 a way as to maximize reusability, testability and maintainability compared to
8610 traditional approaches such as constructors, factories, and service locators
8611 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8612 most nontrivial applications.
8614 Many types depend on other types. For example, a @var{Stopwatch} might depend
8615 on a @var{TimeSource}. The types on which a type depends are known as its
8616 dependencies. The process of finding an instance of a dependency to use at run
8617 time is known as resolving the dependency. If no such instance can be found,
8618 the dependency is said to be unsatisfied, and the application is broken.")
8619 (license license:asl2.0)))
8621 (define-public java-guice
8627 (uri (string-append "https://github.com/google/guice/archive/"
8629 (file-name (string-append name "-" version ".tar.gz"))
8630 (modules '((guix build utils)))
8633 (for-each delete-file (find-files "." ".*.jar"))))
8636 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8637 (build-system ant-build-system)
8639 `(#:jar-name "java-guice.jar"
8641 #:tests? #f; FIXME: tests are not in a java sub directory
8642 #:source-dir "core/src"))
8644 `(("guava" ,java-guava)
8645 ("java-cglib" ,java-cglib)
8646 ("java-aopalliance" ,java-aopalliance)
8647 ("java-javax-inject" ,java-javax-inject)
8648 ("java-asm" ,java-asm)))
8649 (home-page "https://github.com/google/guice")
8650 (synopsis "Lightweight dependency injection framework")
8651 (description "Guice is a lightweight dependency injection framework fo
8653 (license license:asl2.0)))
8655 (define-public java-guice-servlet
8657 (inherit java-guice)
8658 (name "java-guice-servlet")
8660 `(#:jar-name "guice-servlet.jar"
8661 #:source-dir "extensions/servlet/src/"
8663 #:tests? #f)); FIXME: not in a java subdir
8665 `(("guice" ,java-guice)
8666 ("servlet" ,java-classpathx-servletapi)
8667 ,@(package-inputs java-guice)))))
8669 (define-public java-assertj
8671 (name "java-assertj")
8675 (uri (string-append "https://github.com/joel-costigliola/"
8676 "assertj-core/archive/"
8677 "assertj-core-" version ".tar.gz"))
8680 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8681 (build-system ant-build-system)
8683 `(#:jar-name "java-assertj.jar"
8685 #:source-dir "src/main/java"
8686 #:tests? #f)); depends on tng-junit which depends on assertj
8688 `(("cglib" ,java-cglib)
8689 ("junit" ,java-junit)
8690 ("hamcrest" ,java-hamcrest-core)))
8692 `(("mockito" ,java-mockito-1)))
8693 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8694 (synopsis "Fluent assertions for java")
8695 (description "AssertJ core is a Java library that provides a fluent
8696 interface for writing assertions. Its main goal is to improve test code
8697 readability and make maintenance of tests easier.")
8698 (license license:asl2.0)))
8700 (define-public java-jboss-javassist
8702 (name "java-jboss-javassist")
8706 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8708 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8712 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8713 (build-system ant-build-system)
8715 `(#:jar-name "java-jboss-javassist.jar"
8717 #:source-dir "src/main"
8718 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8720 (modify-phases %standard-phases
8721 (add-before 'configure 'remove-binary
8723 (delete-file "javassist.jar")
8726 `(("junit" ,java-junit)))
8727 (home-page "https://github.com/jboss-javassist/javassist")
8728 (synopsis "Java bytecode engineering toolkit")
8729 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8730 manipulation simple. It is a class library for editing bytecodes in Java; it
8731 enables Java programs to define a new class at runtime and to modify a class
8732 file when the JVM loads it.")
8733 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8735 (define-public java-jcommander
8737 (name "java-jcommander")
8741 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8743 (file-name (string-append name "-" version ".tar.gz"))
8746 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8747 (build-system ant-build-system)
8749 `(#:jar-name "java-jcommander.jar"
8751 #:tests? #f; requires testng which depends on jcommander
8752 #:source-dir "src/main/java"))
8753 (home-page "http://jcommander.org")
8754 (synopsis "Command line parameters parser")
8755 (description "JCommander is a very small Java framework that makes it
8756 trivial to parse command line parameters. Parameters are declared with
8758 (license license:asl2.0)))
8760 (define-public java-bsh
8766 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8768 (file-name (string-append name "-" version ".tar.gz"))
8771 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8772 (build-system ant-build-system)
8774 `(#:build-target "jarall"
8775 #:test-target "junit-tests-all"
8777 (modify-phases %standard-phases
8779 (lambda* (#:key outputs #:allow-other-keys)
8780 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8782 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8784 (home-page "http://beanshell.org/")
8785 (synopsis "Lightweight Scripting for Java")
8786 (description "BeanShell is a small, free, embeddable Java source
8787 interpreter with object scripting language features, written in Java.
8788 BeanShell dynamically executes standard Java syntax and extends it with common
8789 scripting conveniences such as loose types, commands, and method closures like
8790 those in Perl and JavaScript.")
8791 (license license:asl2.0)))
8793 (define-public java-fest-util
8795 (name "java-fest-util")
8799 (uri (string-append "https://github.com/alexruiz/fest-util/"
8800 "archive/fest-util-" version ".tar.gz"))
8803 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8804 (build-system ant-build-system)
8806 `(#:jar-name "java-fest-util.jar"
8807 #:source-dir "src/main/java"))
8809 `(("junit" ,java-junit)
8810 ("hamcrest" ,java-hamcrest-core)))
8811 (home-page "https://github.com/alexruiz/fest-util")
8812 (synopsis "FEST common utilities")
8813 (description "Common utilities used in all FEST module.")
8814 (license license:asl2.0)))
8816 (define-public java-fest-test
8818 (name "java-fest-test")
8822 (uri (string-append "https://github.com/alexruiz/fest-test/"
8823 "archive/fest-test-" version ".tar.gz"))
8826 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8827 (build-system ant-build-system)
8829 `(#:jar-name "java-fest-test.jar"
8830 #:source-dir "src/main/java"
8831 #:tests? #f)); no tests
8833 `(("junit" ,java-junit)))
8834 (home-page "https://github.com/alexruiz/fest-test")
8835 (synopsis "Common FEST testing infrastructure")
8836 (description "Fest-test contains the common FEST testing infrastructure.")
8837 (license license:asl2.0)))
8839 (define-public java-fest-assert
8841 (name "java-fest-assert")
8845 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8846 "archive/fest-assert-core-" version ".tar.gz"))
8849 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8850 (build-system ant-build-system)
8852 `(#:jar-name "java-fest-assert.jar"
8853 #:source-dir "src/main/java"
8858 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8859 "**/MessageFormatter_format_Test.java"
8860 "**/internal/*/*_assert*_Test.java")))
8862 `(("java-fest-util" ,java-fest-util)))
8864 `(("java-junit" ,java-junit)
8865 ("java-fest-test" ,java-fest-test)
8866 ("java-hamcrest-core" ,java-hamcrest-core)
8867 ("java-mockito" ,java-mockito-1)
8868 ("java-cglib" ,java-cglib)
8869 ("java-objenesis" ,java-objenesis)
8870 ("java-asm" ,java-asm)))
8871 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8872 (synopsis "FEST fluent assertions")
8873 (description "FEST-Assert provides a fluent interface for assertions.")
8874 (license license:asl2.0)))
8876 (define-public java-testng
8878 (name "java-testng")
8883 (url "https://github.com/cbeust/testng.git")
8885 (file-name (string-append name "-" version "-checkout"))
8888 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8889 (build-system ant-build-system)
8891 `(#:jdk ,icedtea-8; java.util.function
8892 #:jar-name "java-testng.jar"
8893 #:source-dir "src/main/java"
8895 (modify-phases %standard-phases
8896 ;; FIXME: I don't know why these tests fail
8897 (add-after 'unpack 'delete-failing-tests
8899 (substitute* "src/test/resources/testng.xml"
8900 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8901 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8903 ;; We don't have groovy
8904 (add-after 'unpack 'delete-groovy-tests
8906 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8907 (substitute* "src/test/resources/testng.xml"
8908 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8910 (add-before 'build 'copy-resources
8912 (copy-recursively "src/main/resources" "build/classes")
8914 (add-before 'check 'copy-test-resources
8916 (copy-recursively "src/test/resources" "build/test-classes")
8920 (invoke "ant" "compile-tests")
8921 ;; we don't have groovy
8922 (substitute* "src/test/resources/testng.xml"
8923 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8924 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8926 ":build/test-classes")
8927 "-Dtest.resources.dir=src/test/resources"
8928 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8930 `(("junit" ,java-junit)
8931 ("java-jsr305" ,java-jsr305)
8932 ("java-bsh" ,java-bsh)
8933 ("java-jcommander" ,java-jcommander)
8934 ("java-guice" ,java-guice)
8935 ("snakeyaml" ,java-snakeyaml)))
8937 `(("guava" ,java-guava)
8938 ("java-javax-inject" ,java-javax-inject)
8939 ("java-hamcrest" ,java-hamcrest-all)
8940 ("java-assertj" ,java-assertj)
8941 ("java-mockito" ,java-mockito-1)
8942 ("cglib" ,java-cglib)
8944 ("aopalliance" ,java-aopalliance)))
8945 (home-page "http://testng.org")
8946 (synopsis "Testing framework")
8947 (description "TestNG is a testing framework inspired from JUnit and NUnit
8948 but introducing some new functionalities that make it more powerful and easier
8950 (license license:asl2.0)))
8952 (define-public java-jnacl
8953 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8957 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8961 (url "https://github.com/neilalexander/jnacl.git")
8963 (file-name (git-file-name name version))
8966 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8967 (build-system ant-build-system)
8969 `(#:jar-name "jnacl.jar"
8970 #:source-dir "src/main/java"
8973 (modify-phases %standard-phases
8974 (add-before 'build 'fix-tests
8976 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8977 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8978 (("assertions.Assertions") "assertions.api.Assertions"))
8982 (invoke "ant" "compile-tests")
8983 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8985 ":build/test-classes")
8986 "org.testng.TestNG" "-testclass"
8987 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8988 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8990 ":build/test-classes")
8991 "org.testng.TestNG" "-testclass"
8992 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8994 `(("java-testng" ,java-testng)
8995 ("java-fest-util" ,java-fest-util)
8996 ("java-fest-assert" ,java-fest-assert)))
8997 (home-page "https://github.com/neilalexander/jnacl")
8998 (synopsis "Java implementation of NaCl")
8999 (description "Pure Java implementation of the NaCl: Networking and
9000 Cryptography library.")
9001 (license license:bsd-2))))
9003 (define-public java-mvel2
9009 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9010 version ".Final.tar.gz"))
9013 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9014 (build-system ant-build-system)
9016 `(#:jar-name "mvel2.jar"
9017 #:source-dir "src/main/java"
9019 (list "**/Abstract*.java"
9020 ;; Base class with no tests
9021 "**/MVELThreadTest.java")
9023 (modify-phases %standard-phases
9024 (add-after 'install 'install-bin
9025 (lambda* (#:key outputs #:allow-other-keys)
9026 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9028 (with-output-to-file (string-append bin "/mvel2")
9032 "#!" (which "bash") "\n"
9033 "if [ \"$#\" -ne \"2\" ]; then\n"
9034 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9037 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9038 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9039 " org.mvel2.sh.Main $1"))))
9040 (chmod (string-append bin "/mvel2") #o755))
9043 `(("junit" ,java-junit)
9044 ("hamcrest" ,java-hamcrest-core)))
9045 (home-page "https://github.com/mvel/mvel")
9046 (synopsis "MVFLEX Expression Language")
9047 (description "MVEL has largely been inspired by Java syntax, but has some
9048 fundamental differences aimed at making it more efficient as an expression
9049 language, such as operators that directly support collection, array and string
9050 matching, as well as regular expressions. MVEL is used to evaluate expressions
9051 written using Java syntax.
9053 In addition to the expression language, MVEL serves as a templating language for
9054 configuration and string construction.")
9055 (license license:asl2.0)))
9057 (define-public java-commons-jexl-2
9059 (name "java-commons-jexl")
9063 (uri (string-append "mirror://apache/commons/jexl/source/"
9064 "commons-jexl-" version "-src.tar.gz"))
9067 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9068 (build-system ant-build-system)
9070 `(#:jar-name "commons-jexl-2.jar"
9072 #:source-dir "src/main/java"
9074 (modify-phases %standard-phases
9075 (add-before 'check 'disable-broken-tests
9076 (lambda* (#:key inputs #:allow-other-keys)
9077 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9078 (substitute* "ArithmeticTest.java"
9079 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9080 (("asserter.assertExpression\\(\"imanull") "//"))
9081 ;; This test fails with "ambiguous method invocation"
9082 (delete-file "CacheTest.java")
9083 ;; This test doesn't have access to the temp directory
9084 (substitute* "ClassCreatorTest.java"
9085 (("java.io.tmpdir") "user.dir"))
9086 ;; This test fails in trying to detect whether it can run.
9087 (substitute* "ClassCreator.java"
9088 (("boolean canRun =.*") "boolean canRun = false;\n"))
9089 ;; ...and these tests depend on it.
9090 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9091 (delete-file "scripting/JexlScriptEngineTest.java"))
9093 (add-before 'build 'run-javacc
9095 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9096 (invoke "java" "jjtree" "Parser.jjt")
9097 (invoke "java" "javacc" "Parser.jj"))
9100 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9102 `(("java-junit" ,java-junit)
9103 ("java-hamcrest-core" ,java-hamcrest-core)
9104 ("javacc" ,javacc-4)))
9105 (home-page "https://commons.apache.org/proper/commons-jexl/")
9106 (synopsis "Java Expression Language ")
9107 (description "JEXL is a library intended to facilitate the implementation
9108 of dynamic and scripting features in applications and frameworks written in
9109 Java. JEXL implements an Expression Language based on some extensions to the
9110 JSTL Expression Language supporting most of the constructs seen in
9111 shell-script or ECMAScript. Its goal is to expose scripting features usable
9112 by technical operatives or consultants working with enterprise platforms.")
9113 (license license:asl2.0)))
9115 (define-public java-lz4
9121 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9123 (file-name (string-append name "-" version ".tar.gz"))
9126 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9127 (build-system ant-build-system)
9129 `(#:jar-name "lz4.jar"
9131 #:source-dir "src/java:src/java-unsafe"
9132 #:tests? #f; FIXME: requires more dependencies
9134 (modify-phases %standard-phases
9135 (add-before 'configure 'generate-source
9137 (with-directory-excursion "src/build/source_templates"
9138 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9141 `(("mvel" ,java-mvel2)))
9142 (home-page "https://jpountz.github.io/lz4-java")
9143 (synopsis "Compression algorithm")
9144 (description "LZ4 - Java is a Java port of the popular lz4 compression
9145 algorithms and xxHash hashing algorithm.")
9146 (license license:asl2.0)))
9148 (define-public java-bouncycastle
9150 (name "java-bouncycastle")
9154 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9155 (substring version 0 1) "v"
9156 (substring version 2 4) ".tar.gz"))
9159 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9160 (modules '((guix build utils)))
9163 (for-each delete-file
9164 (find-files "." "\\.jar$"))
9166 (build-system ant-build-system)
9171 (modify-phases %standard-phases
9174 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9175 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9176 ;; FIXME: the tests freeze.
9179 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9181 (install-jars "build/artifacts/jdk1.5/jars")))))
9183 `(("java-javax-mail" ,java-javax-mail)))
9186 ("junit" ,java-junit)
9187 ("java-native-access" ,java-native-access)
9188 ("java-native-access-platform" ,java-native-access-platform)))
9189 (home-page "https://www.bouncycastle.org")
9190 (synopsis "Cryptographic library")
9191 (description "Bouncy Castle is a cryptographic library for the Java
9192 programming language.")
9193 (license license:expat)))
9195 (define-public java-lmax-disruptor
9197 (name "java-lmax-disruptor")
9201 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9202 "archive/" version ".tar.gz"))
9203 (file-name (string-append name "-" version ".tar.gz"))
9206 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9207 (build-system ant-build-system)
9209 `(#:jar-name "java-lmax-disruptor.jar"
9211 #:tests? #f)); tests hang
9213 `(("junit" ,java-junit)
9214 ("java-hdrhistogram" ,java-hdrhistogram)
9215 ("java-jmock" ,java-jmock)
9216 ("java-jmock-legacy" ,java-jmock-legacy)
9217 ("java-jmock-junit4" ,java-jmock-junit4)
9218 ("java-hamcrest-all" ,java-hamcrest-all)))
9220 `(("cglib" ,java-cglib)
9221 ("objenesis" ,java-objenesis)
9223 (home-page "https://www.lmax.com/disruptor")
9224 (synopsis "High performance inter-thread communication")
9225 (description "LMAX Disruptor is a software pattern and software component
9226 for high performance inter-thread communication that avoids the need for
9227 message queues or resource locking.")
9228 (license license:asl2.0)))
9230 (define-public java-commons-bcel
9232 (name "java-commons-bcel")
9236 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9237 version "-src.tar.gz"))
9240 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9241 (build-system ant-build-system)
9243 `(#:jar-name "bcel.jar"
9245 #:source-dir "src/main/java"
9246 #:test-dir "src/test/java"
9247 ;; FIXME: Tests require the unpackaged jna.
9249 (home-page "https://commons.apache.org/proper/commons-bcel/")
9250 (synopsis "Byte code engineering library")
9251 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9252 intended to give users a convenient way to analyze, create, and
9253 manipulate (binary) Java class files. Classes are represented by objects
9254 which contain all the symbolic information of the given class: methods, fields
9255 and byte code instructions, in particular.
9257 Such objects can be read from an existing file, be transformed by a
9258 program (e.g. a class loader at run-time) and written to a file again. An
9259 even more interesting application is the creation of classes from scratch at
9260 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9261 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9262 of Java @code{.class} files.")
9263 (license license:asl2.0)))
9265 (define-public java-xerial-core
9267 (name "java-xerial-core")
9271 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9273 (file-name (string-append name "-" version ".tar.gz"))
9276 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9277 (build-system ant-build-system)
9279 `(#:jar-name "xerial-core.jar"
9280 #:source-dir "xerial-core/src/main/java"
9281 #:test-dir "xerial-core/src/test"
9283 (modify-phases %standard-phases
9284 (add-before 'build 'copy-resources
9286 (copy-recursively "xerial-core/src/main/resources"
9290 `(("junit" ,java-junit)
9291 ("hamcrest" ,java-hamcrest-core)))
9292 (home-page "https://github.com/xerial/xerial-java")
9293 (synopsis "Data management libraries for Java")
9294 (description "Xerial is a set of data management libraries for the Java
9295 programming language. The ultimate goal of the Xerial project is to manage
9296 everything as database, including class objects, text format data, data
9298 (license license:asl2.0)))
9300 (define-public java-powermock-reflect
9302 (name "java-powermock-reflect")
9306 (uri (string-append "https://github.com/powermock/powermock/"
9307 "archive/powermock-" version ".tar.gz"))
9308 (file-name (string-append name "-" version ".tar.gz"))
9311 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9313 (search-patches "java-powermock-fix-java-files.patch"))))
9314 (build-system ant-build-system)
9316 `(#:jar-name "java-powermock-reflect.jar"
9318 #:source-dir "powermock-reflect/src/main/java"
9319 #:test-dir "powermock-reflect/src/test"))
9321 `(("java-objenesis" ,java-objenesis)))
9323 `(("junit" ,java-junit)
9324 ("cglib" ,java-cglib)
9326 ("hamcrest" ,java-hamcrest-core)
9327 ("assertj" ,java-assertj)))
9328 (home-page "https://github.com/powermock/powermock")
9329 (synopsis "Mock library extension framework")
9330 (description "PowerMock is a framework that extends other mock libraries
9331 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9332 classloader and bytecode manipulation to enable mocking of static methods,
9333 constructors, final classes and methods, private methods, removal of static
9334 initializers and more. By using a custom classloader no changes need to be
9335 done to the IDE or continuous integration servers which simplifies adoption.")
9336 (license license:asl2.0)))
9338 (define-public java-powermock-core
9340 (inherit java-powermock-reflect)
9341 (name "java-powermock-core")
9343 `(#:jar-name "java-powermock-core.jar"
9344 #:source-dir "powermock-core/src/main/java"
9345 #:test-dir "powermock-core/src/test"
9346 #:tests? #f; requires powermock-api
9349 (modify-phases %standard-phases
9350 (add-before 'build 'copy-resources
9352 (copy-recursively "powermock-core/src/main/resources"
9356 `(("reflect" ,java-powermock-reflect)
9357 ("javassist" ,java-jboss-javassist)))
9359 `(("junit" ,java-junit)
9360 ("assertj" ,java-assertj)
9361 ("mockito" ,java-mockito-1)))))
9363 (define-public java-powermock-api-support
9365 (inherit java-powermock-reflect)
9366 (name "java-powermock-api-support")
9367 (build-system ant-build-system)
9369 `(#:jar-name "java-powermock-api-support.jar"
9371 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9372 #:tests? #f)); no tests
9374 `(("core" ,java-powermock-core)
9375 ("reflect" ,java-powermock-reflect)))))
9377 (define-public java-powermock-modules-junit4-common
9379 (inherit java-powermock-reflect)
9380 (name "java-powermock-modules-junit4-common")
9381 (build-system ant-build-system)
9383 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9385 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9386 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9388 `(("core" ,java-powermock-core)
9389 ("easymock" ,java-easymock)
9390 ("reflect" ,java-powermock-reflect)
9391 ("hamcrest" ,java-hamcrest-core)
9392 ("cglib" ,java-cglib)))))
9394 (define-public java-powermock-modules-junit4
9396 (inherit java-powermock-reflect)
9397 (name "java-powermock-modules-junit4")
9398 (build-system ant-build-system)
9400 `(#:jar-name "java-powermock-modules-junit4.jar"
9402 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9403 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9405 (modify-phases %standard-phases
9406 (add-before 'build 'fix-junit-detection
9408 ;; Our junit version is 4.12-SNAPSHOT
9409 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9410 "PowerMockJUnit4MethodValidator.java")
9411 (("4.12") "4.12-SNAPSHOT"))
9414 `(("core" ,java-powermock-core)
9415 ("reflect" ,java-powermock-reflect)
9416 ("common" ,java-powermock-modules-junit4-common)
9417 ("cglib" ,java-cglib)))
9419 `(("easymock" ,java-easymock)
9420 ("hamcrest" ,java-hamcrest-core)
9421 ("objenesis" ,java-objenesis)
9423 ("junit" ,java-junit)))))
9425 (define-public java-powermock-api-easymock
9427 (inherit java-powermock-reflect)
9428 (name "java-powermock-api-easymock")
9429 (build-system ant-build-system)
9431 `(#:jar-name "java-powermock-api-easymock.jar"
9433 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9434 #:tests? #f; no tests
9436 (modify-phases %standard-phases
9437 (add-before 'build 'fix-file
9439 ;; FIXME: This looks wrong, but it fixes a build error.
9440 (with-directory-excursion "powermock-api/powermock-api-easymock"
9441 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9442 (("classLoader instanceof MockClassLoader") "false")
9443 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9446 `(("core" ,java-powermock-core)
9447 ("easymock" ,java-easymock)
9448 ("reflect" ,java-powermock-reflect)
9449 ("support" ,java-powermock-api-support)
9450 ("cglib" ,java-cglib)))))
9452 (define-public java-jboss-jms-api-spec
9454 (name "java-jboss-jms-api-spec")
9458 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9459 "archive/jboss-jms-api_" version
9460 "_spec-1.0.1.Final.tar.gz"))
9463 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9464 (build-system ant-build-system)
9466 `(#:jar-name "java-jboss-jms-api_spec.jar"
9469 #:tests? #f)); no tests
9470 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9471 (synopsis "Java Message Service API specification")
9472 (description "Java Message Service (JMS) API is used to send messages
9473 messages between two or more clients. It is a messaging standard that allows
9474 application components to create, send, receive, and read messages.")
9475 ; either gpl2 only with GPL Classpath Exception, or cddl.
9476 (license (list license:gpl2 license:cddl1.0))))
9478 (define-public java-mail
9484 (uri (string-append "https://github.com/javaee/javamail/archive/"
9485 "JAVAMAIL-1_6_0.tar.gz"))
9488 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9489 (build-system ant-build-system)
9491 `(#:jar-name "java-mail.jar"
9493 #:source-dir "mail/src/main/java"
9494 #:test-dir "mail/src/test"
9496 (list "**/CollectorFormatterTest.java"
9497 "**/CompactFormatterTest.java"
9498 "**/DurationFilterTest.java"
9499 "**/MailHandlerTest.java"
9500 "**/GetLocalAddressTest.java"
9501 ;; FIXME: both end with:
9502 ;; java.lang.ClassNotFoundException:
9503 ;; javax.mail.internet.MimeMultipartParseTest
9504 "**/MimeMultipartParseTest.java"
9505 "**/SearchTermSerializationTest.java")
9507 (modify-phases %standard-phases
9508 (add-before 'configure 'move-version.java
9510 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9511 "mail/src/main/java/javax/mail/Version.java")
9513 (add-before 'build 'copy-resources
9515 (copy-recursively "mail/src/main/resources/META-INF"
9516 "build/classes/META-INF")
9519 `(("junit" ,java-junit)
9520 ("hamcrest" ,java-hamcrest-core)))
9521 (home-page "https://javaee.github.io/javamail/")
9522 (synopsis "Mail-related functionnalities in Java")
9523 (description "The JavaMail API provides a platform-independent and
9524 protocol-independent framework to build mail and messaging applications.")
9525 ;; General Public License Version 2 only ("GPL") or the Common Development
9526 ;; and Distribution License("CDDL")
9527 (license (list license:cddl1.1
9528 license:gpl2)))); with classpath exception
9530 (define-public java-jeromq
9532 (name "java-jeromq")
9537 (url "https://github.com/zeromq/jeromq.git")
9538 (commit (string-append "v" version))))
9539 (file-name (string-append name "-" version "-checkout"))
9542 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9543 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9544 (build-system ant-build-system)
9546 `(#:jar-name "java-jeromq.jar"
9547 #:source-dir "src/main/java"
9553 "**/ZBeaconTest.java"
9555 "**/DealerSpecTest.java"
9556 "**/CustomDecoderTest.java"
9557 "**/CustomEncoderTest.java"
9558 "**/ConnectRidTest.java"
9559 "**/ReqSpecTest.java"
9560 "**/PushPullSpecTest.java"
9561 "**/PubSubHwmTest.java"
9562 "**/RouterSpecTest.java"
9563 "**/ProxyTest.java")))
9565 `(("java-jnacl" ,java-jnacl)))
9567 `(("java-hamcrest-core" ,java-hamcrest-core)
9568 ("junit" ,java-junit)))
9569 (home-page "http://zeromq.org/bindings:java")
9570 (synopsis "Java binding for 0MQ")
9571 (description "Jeromq provides the java bindings for 0MQ.")
9572 (license license:mpl2.0)))
9574 (define-public java-kafka-clients
9576 (name "java-kafka-clients")
9580 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9581 version "-src.tgz"))
9584 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9585 (build-system ant-build-system)
9587 `(#:jar-name "java-kafka-clients.jar"
9589 #:source-dir "clients/src/main/java"
9590 #:test-dir "clients/src/test"
9593 ;; This file does not contain a class
9594 "**/IntegrationTest.java"
9596 "**/ClientUtilsTest.java"
9597 ;; End with errors that seem related to our powermock
9598 "**/KafkaProducerTest.java"
9599 "**/BufferPoolTest.java")))
9601 `(("java-slf4j-api" ,java-slf4j-api)
9602 ("java-lz4" ,java-lz4)))
9604 `(("junit" ,java-junit)
9605 ("hamcrest" ,java-hamcrest-all)
9606 ("objenesis" ,java-objenesis)
9608 ("cglib" ,java-cglib)
9609 ("javassist" ,java-jboss-javassist)
9610 ("snappy" ,java-snappy)
9611 ("easymock" ,java-easymock)
9612 ("powermock" ,java-powermock-core)
9613 ("powermock-easymock" ,java-powermock-api-easymock)
9614 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9615 ("powermock-junit4" ,java-powermock-modules-junit4)
9616 ("powermock-support" ,java-powermock-api-support)
9617 ("java-bouncycastle" ,java-bouncycastle)))
9618 (home-page "https://kafka.apache.org")
9619 (synopsis "Distributed streaming platform")
9620 (description "Kafka is a distributed streaming platform, which means:
9622 @item it can publish and subscribe to streams of records;
9623 @item it can store streams of records in a fault-tolerant way;
9624 @item it can process streams of records as they occur.
9626 ;; Either cddl or gpl2 only.
9627 (license (list license:cddl1.1; actually cddl1.1
9628 license:gpl2)))); with classpath exception
9630 (define-public java-jdom
9636 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9640 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9641 (build-system ant-build-system)
9643 `(#:build-target "package"
9644 #:tests? #f; tests are run as part of the build process
9646 (modify-phases %standard-phases
9648 (install-jars "build")))))
9649 (home-page "http://jdom.org/")
9650 (synopsis "Access, manipulate, and output XML data")
9651 (description "Java-based solution for accessing, manipulating, and
9652 outputting XML data from Java code.")
9653 (license license:bsd-4)))
9655 (define-public java-geronimo-xbean-reflect
9657 (name "java-geronimo-xbean-reflect")
9662 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9663 (revision 1807396)))
9664 (file-name (string-append name "-" version))
9667 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9668 (build-system ant-build-system)
9670 `(#:jar-name "geronimo-xbean-reflect.jar"
9671 #:source-dir "xbean-reflect/src/main/java"
9672 #:test-dir "xbean-reflect/src/test"
9675 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9676 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9677 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9679 (modify-phases %standard-phases
9680 (add-before 'build 'fix-source
9682 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9683 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9684 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9685 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9689 ("log4j" ,java-log4j-api)
9690 ("log4j-1.2" ,java-log4j-1.2-api)
9691 ("log4j-core" ,java-log4j-core)
9692 ("logging" ,java-commons-logging-minimal)))
9694 `(("junit" ,java-junit)))
9695 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9696 (synopsis "Dependency injection helper")
9697 (description "Xbean-reflect provides very flexible ways to create objects
9698 and graphs of objects for dependency injection frameworks")
9699 (license license:asl2.0)))
9701 (define-public java-geronimo-xbean-bundleutils
9703 (inherit java-geronimo-xbean-reflect)
9704 (name "java-geronimo-xbean-bundleutils")
9706 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9707 #:source-dir "xbean-bundleutils/src/main/java"
9708 #:test-dir "xbean-bundleutils/src/test"
9710 (modify-phases %standard-phases
9711 (add-before 'build 'fix-java
9713 ;; We use a more recent version of osgi, so this file requires
9714 ;; more interface method implementations.
9715 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9716 (("import org.osgi.framework.ServiceRegistration;")
9717 "import org.osgi.framework.ServiceRegistration;
9718 import org.osgi.framework.ServiceFactory;
9719 import java.util.Collection;
9720 import org.osgi.framework.ServiceObjects;")
9721 (("public Bundle getBundle\\(\\)")
9723 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9724 throw new UnsupportedOperationException();
9727 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9728 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9729 throw new UnsupportedOperationException();
9731 public Bundle getBundle()"))
9734 `(("java-slf4j" ,java-slf4j-api)
9735 ("java-asm" ,java-asm)
9736 ("java-osgi-framework" ,java-osgi-framework)
9737 ("java-eclipse-osgi" ,java-eclipse-osgi)
9738 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9740 (define-public java-geronimo-xbean-asm-util
9742 (inherit java-geronimo-xbean-reflect)
9743 (name "java-geronimo-xbean-asm-util")
9745 `(#:jar-name "geronimo-xbean-asm-util.jar"
9746 #:source-dir "xbean-asm-util/src/main/java"
9747 #:tests? #f)); no tests
9749 `(("java-asm" ,java-asm)))
9750 (native-inputs '())))
9752 (define-public java-geronimo-xbean-finder
9754 (inherit java-geronimo-xbean-reflect)
9755 (name "java-geronimo-xbean-finder")
9757 `(#:jar-name "geronimo-xbean-finder.jar"
9758 #:source-dir "xbean-finder/src/main/java"
9759 #:test-dir "xbean-finder/src/test"))
9761 `(("java-slf4j-api" ,java-slf4j-api)
9762 ("java-asm" ,java-asm)
9763 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9764 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9765 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9766 ("java-osgi-framework" ,java-osgi-framework)))
9768 `(("java-junit" ,java-junit)
9769 ("java-hamcrest-core" ,java-hamcrest-core)))))
9771 (define-public java-gson
9777 (uri (string-append "https://github.com/google/gson/archive/"
9778 "gson-parent-" version ".tar.gz"))
9781 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9782 (build-system ant-build-system)
9784 `(#:jar-name "gson.jar"
9785 #:source-dir "gson/src/main/java"
9786 #:test-dir "gson/src/test"))
9788 `(("java-junit" ,java-junit)
9789 ("java-hamcrest-core" ,java-hamcrest-core)))
9790 (home-page "https://github.com/google/gson")
9791 (synopsis "Java serialization/deserialization library from/to JSON")
9792 (description "Gson is a Java library that can be used to convert Java
9793 Objects into their JSON representation. It can also be used to convert a JSON
9794 string to an equivalent Java object. Gson can work with arbitrary Java objects
9795 including pre-existing objects that you do not have source-code of.")
9796 (license license:asl2.0)))
9798 (define-public java-hawtjni
9800 (name "java-hawtjni")
9804 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9805 "hawtjni-project-" version ".tar.gz"))
9808 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9809 (build-system ant-build-system)
9811 `(#:jar-name "hawtjni.jar"
9812 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9813 #:tests? #f; no tests
9815 (modify-phases %standard-phases
9816 (add-before 'build 'build-native
9817 (lambda* (#:key inputs #:allow-other-keys)
9818 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9819 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9820 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9821 "-fPIC" "-O2" include)
9822 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9823 "-fPIC" "-O2" include)
9824 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9825 "hawtjni.o" "hawtjni-callback.o")))
9827 (add-after 'install 'install-native
9828 (lambda* (#:key outputs #:allow-other-keys)
9829 (let* ((out (assoc-ref outputs "out"))
9830 (lib (string-append out "/lib"))
9831 (inc (string-append out "/include")))
9832 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9833 (install-file "libhawtjni.so" lib)
9834 (install-file "hawtjni.h" inc)))
9837 `(("java-commons-cli" ,java-commons-cli)
9838 ("java-asm" ,java-asm)
9839 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9840 (home-page "https://fusesource.github.io/hawtjni/")
9841 (synopsis "JNI code generator")
9842 (description "HawtJNI is a code generator that produces the JNI code needed
9843 to implement Java native methods. It is based on the jnigen code generator
9844 that is part of the SWT Tools project.")
9845 (license license:asl2.0)))
9847 (define-public java-jansi-native
9849 (name "java-jansi-native")
9853 (uri (string-append "https://github.com/fusesource/jansi-native/"
9854 "archive/jansi-native-" version ".tar.gz"))
9857 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9858 (build-system ant-build-system)
9860 `(#:jar-name "jansi-native.jar"
9861 #:source-dir "src/main/java"
9862 #:tests? #f; no tests
9864 (modify-phases %standard-phases
9865 (add-before 'build 'build-native
9866 (lambda* (#:key inputs #:allow-other-keys)
9867 ;; there are more required files for windows in windows/
9868 (with-directory-excursion "src/main/native-package/src"
9869 (substitute* "jansi_ttyname.c"
9870 (("#include \"jansi_.*") ""))
9871 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9872 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9874 (string-append "-I" (assoc-ref inputs "jdk")
9877 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9878 (add-before 'build 'install-native
9880 (let ((dir (string-append "build/classes/META-INF/native/"
9881 ,(match (%current-system)
9882 ((or "i686-linux" "armhf-linux")
9884 ((or "x86_64-linux" "aarch64-linux"
9887 (install-file "src/main/native-package/src/libjansi.so" dir))
9889 (add-after 'install 'install-native
9890 (lambda* (#:key outputs #:allow-other-keys)
9891 (install-file "src/main/native-package/src/jansi.h"
9892 (string-append (assoc-ref outputs "out") "/include"))
9895 `(("java-hawtjni" ,java-hawtjni)))
9896 (home-page "https://fusesource.github.io/jansi/")
9897 (synopsis "Native library for jansi")
9898 (description "This package provides the native library for jansi, a small
9899 Java library that allows you to use ANSI escape sequences to format your
9901 (license license:asl2.0)))
9903 (define-public java-jansi
9909 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9910 "jansi-project-" version ".tar.gz"))
9913 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9914 (build-system ant-build-system)
9916 `(#:jar-name "jansi.jar"
9917 #:source-dir "jansi/src/main/java"
9918 #:test-dir "jansi/src/test"
9920 (modify-phases %standard-phases
9921 (add-after 'check 'clear-term
9923 (invoke "echo" "-e" "\\e[0m"))))))
9925 `(("java-jansi-native" ,java-jansi-native)))
9927 `(("java-junit" ,java-junit)
9928 ("java-hamcrest-core" ,java-hamcrest-core)))
9929 (home-page "https://fusesource.github.io/jansi/")
9930 (synopsis "Portable ANSI escape sequences")
9931 (description "Jansi is a Java library that allows you to use ANSI escape
9932 sequences to format your console output which works on every platform.")
9933 (license license:asl2.0)))
9935 (define-public java-jboss-el-api-spec
9937 (name "java-jboss-el-api-spec")
9941 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9942 "archive/jboss-el-api_" version
9943 "_spec-1.0.7.Final.tar.gz"))
9946 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9947 (build-system ant-build-system)
9949 `(#:jar-name "java-jboss-el-api_spec.jar"
9952 `(("java-junit" ,java-junit)))
9953 (home-page "https://github.com/jboss/jboss-el-api_spec")
9954 (synopsis "JSR-341 expression language 3.0 API")
9955 (description "This package contains an implementation of the JSR-341
9956 specification for the expression language 3.0. It implements an expression
9957 language inspired by ECMAScript and XPath. This language is used with
9958 JavaServer Pages (JSP).")
9959 ;; Either GPL2 only or CDDL.
9960 (license (list license:gpl2 license:cddl1.1))))
9962 (define-public java-jboss-interceptors-api-spec
9964 (name "java-jboss-interceptors-api-spec")
9968 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9969 "archive/jboss-interceptors-api_" version
9970 "_spec-1.0.0.Final.tar.gz"))
9973 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9974 (build-system ant-build-system)
9976 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9979 #:tests? #f)); no tests
9980 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9981 (synopsis "Interceptors 1.2 API classes from JSR 318")
9982 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9983 API. Interceptors are used to interpose on business method invocations and
9985 ;; Either GPL2 only or CDDL.
9986 (license (list license:gpl2 license:cddl1.1))))
9988 (define-public java-cdi-api
9990 (name "java-cdi-api")
9994 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9996 (file-name (string-append name "-" version ".tar.gz"))
9999 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10000 (build-system ant-build-system)
10002 `(#:source-dir "api/src/main/java"
10003 #:jar-name "java-cdi-api.jar"
10004 #:test-dir "api/src/test"
10006 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10008 `(("java-javax-inject" ,java-javax-inject)
10009 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10010 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10012 `(("java-testng" ,java-testng)
10013 ("java-hamcrest-core" ,java-hamcrest-core)))
10014 (home-page "http://cdi-spec.org/")
10015 (synopsis "Contexts and Dependency Injection APIs")
10016 (description "Java-cdi-api contains the required APIs for Contexts and
10017 Dependency Injection (CDI).")
10018 (license license:asl2.0)))
10020 (define-public java-joda-convert
10022 (name "java-joda-convert")
10026 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10027 version ".tar.gz"))
10028 (file-name (string-append name "-" version ".tar.gz"))
10031 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10032 (build-system ant-build-system)
10034 `(#:jar-name (string-append ,name "-" ,version ".jar")
10035 #:source-dir "src/main/java"
10036 #:test-include (list "**/Test*.java")
10037 ;; Contains only interfaces and base classes (no test)
10038 #:test-exclude (list "**/test*/**.java")))
10040 `(("java-guava" ,java-guava)))
10042 `(("java-junit" ,java-junit)
10043 ("java-hamcrest-core" ,java-hamcrest-core)))
10044 (home-page "http://www.joda.org/joda-convert/")
10045 (synopsis "Conversion between Objects and Strings")
10046 (description "Joda-Convert provides a small set of classes to aid
10047 conversion between Objects and Strings. It is not intended to tackle the
10048 wider problem of Object to Object transformation.")
10049 (license license:asl2.0)))
10051 (define-public java-joda-time
10053 (name "java-joda-time")
10057 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10058 version ".tar.gz"))
10059 (file-name (string-append name "-" version ".tar.gz"))
10062 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10063 (build-system ant-build-system)
10065 `(#:jar-name "java-joda-time.jar"
10066 #:source-dir "src/main/java"
10067 #:test-include (list "**/Test*.java")
10068 ;; There is no runnable test in these files
10069 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10071 (modify-phases %standard-phases
10072 (add-after 'build 'build-resources
10074 (mkdir-p "build/classes/org/joda/time/tz/data")
10075 (mkdir-p "build/classes/org/joda/time/format")
10076 ;; This will produce the following exception:
10077 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10078 ;; which is normal, because it doesn't exist yet. It still generates
10079 ;; the same file as in the binary one can find on maven.
10080 (invoke "java" "-cp"
10081 (string-append "build/classes:" (getenv "CLASSPATH"))
10082 "org.joda.time.tz.ZoneInfoCompiler"
10083 "-src" "src/main/java/org/joda/time/tz/src"
10084 "-dst" "build/classes/org/joda/time/tz/data"
10085 "africa" "antarctica" "asia" "australasia"
10086 "europe" "northamerica" "southamerica"
10087 "pacificnew" "etcetera" "backward" "systemv")
10088 (for-each (lambda (f)
10089 (copy-file f (string-append
10090 "build/classes/org/joda/time/format/"
10092 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10094 (add-before 'install 'regenerate-jar
10096 ;; We need to regenerate the jar file to add generated data.
10097 (delete-file "build/jar/java-joda-time.jar")
10098 (invoke "ant" "jar")))
10099 (add-before 'check 'copy-test-resources
10101 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10102 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10103 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10104 (copy-recursively "src/test/resources" "build/test-classes")
10107 `(("java-joda-convert" ,java-joda-convert)))
10109 `(("java-junit" ,java-junit)
10110 ("java-hamcrest-core" ,java-hamcrest-core)
10111 ("tzdata" ,tzdata)))
10112 (home-page "http://www.joda.org/joda-time/")
10113 (synopsis "Replacement for the Java date and time classes")
10114 (description "Joda-Time is a replacement for the Java date and time
10115 classes prior to Java SE 8.")
10116 (license license:asl2.0)))
10118 (define-public java-xerces
10120 (name "java-xerces")
10125 (uri (string-append "mirror://apache/xerces/j/source/"
10126 "Xerces-J-src." version ".tar.gz"))
10128 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10129 (patches (search-patches
10130 "java-xerces-xjavac_taskdef.patch"
10131 "java-xerces-build_dont_unzip.patch"
10132 "java-xerces-bootclasspath.patch"))))
10133 (build-system ant-build-system)
10135 `(#:tests? #f;; Test files are not present
10136 #:test-target "test"
10139 (modify-phases %standard-phases
10140 (add-after 'unpack 'create-build.properties
10141 (lambda* (#:key inputs #:allow-other-keys)
10142 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10143 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10144 (with-output-to-file "build.properties"
10147 "jar.jaxp = ~a/share/java/jaxp.jar~@
10148 jar.apis-ext = ~a/share/java/jaxp.jar~@
10149 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10150 jaxp jaxp resolver)))
10151 ;; Make xerces use our version of jaxp in tests
10152 (substitute* "build.xml"
10154 (string-append jaxp "/share/java/jaxp.jar"))
10155 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10158 (replace 'install (install-jars "build")))))
10160 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10161 ("java-jaxp" ,java-jaxp)))
10162 (home-page "https://xerces.apache.org/xerces2-j/")
10163 (synopsis "Validating XML parser for Java with DOM level 3 support")
10164 (description "The Xerces2 Java parser is the reference implementation of
10165 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10168 Xerces2-J supports the following standards and APIs:
10171 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10172 @item Namespaces in XML Recommendation
10173 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10174 Range Recommendations
10175 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10176 @item Java APIs for XML Processing (JAXP) 1.2.01
10177 @item XML Schema 1.0 Structures and Datatypes Recommendations
10178 @item Experimental implementation of the Document Object Model (DOM) Level 3
10179 Core and Load/Save Working Drafts
10180 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10181 Candidate Recommendation
10184 Xerces is now able to parse documents written according to the XML 1.1
10185 Candidate Recommendation, except that it does not yet provide an option to
10186 enable normalization checking as described in section 2.13 of this
10187 specification. It also handles namespaces according to the XML Namespaces 1.1
10188 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10189 the DOM level 3 load/save API's are in use.")
10190 (license license:asl2.0)))
10192 (define-public java-jakarta-regexp
10194 (name "java-jakarta-regexp")
10199 (uri (string-append
10200 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10201 version ".tar.gz"))
10204 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10205 (build-system ant-build-system)
10207 `(#:test-target "test"
10209 (modify-phases %standard-phases
10211 (lambda* (#:key outputs #:allow-other-keys)
10212 (let* ((out (assoc-ref outputs "out"))
10213 (out-share (string-append out "/share/java")))
10214 (mkdir-p out-share)
10215 (for-each (lambda (name)
10216 (install-file name out-share))
10217 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10219 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10220 (synopsis "Regular expression parser generator for Java.")
10221 (description "@code{jakarta-regexp} is an old regular expression parser
10222 generator for Java.")
10223 (license license:asl2.0)))
10225 (define-public java-jline
10227 (name "java-jline")
10231 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10232 version ".tar.gz"))
10235 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10236 (build-system ant-build-system)
10238 `(#:jar-name "jline.jar"
10239 #:source-dir "src/main/java"
10240 #:test-dir "src/test"
10242 (modify-phases %standard-phases
10243 (add-before 'build 'copy-resources
10245 (copy-recursively "src/main/resources" "build/classes")
10248 `(("java-junit" ,java-junit)))
10249 (home-page "https://jline.github.io")
10250 (synopsis "Console input handling library")
10251 (description "JLine is a Java library for handling console input. It is
10252 similar in functionality to BSD editline and GNU readline but with additional
10253 features that bring it on par with the Z shell line editor.")
10254 (license license:bsd-3)))
10256 (define-public java-jline-2
10258 (inherit java-jline)
10262 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10263 version ".tar.gz"))
10266 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10269 ,@(package-arguments java-jline)))
10271 `(("java-jansi" ,java-jansi)
10272 ("java-jansi-native" ,java-jansi-native)))
10274 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10275 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10276 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10277 ("java-powermock-api-support" ,java-powermock-api-support)
10278 ("java-powermock-core" ,java-powermock-core)
10279 ("java-powermock-reflect" ,java-powermock-reflect)
10280 ("java-easymock" ,java-easymock)
10281 ("java-jboss-javassist" ,java-jboss-javassist)
10282 ("java-objenesis" ,java-objenesis)
10283 ("java-asm" ,java-asm)
10284 ("java-hamcrest-core" ,java-hamcrest-core)
10285 ("java-cglib" ,java-cglib)
10286 ("java-junit" ,java-junit)
10287 ("java-hawtjni" ,java-hawtjni)))))
10289 (define-public java-xmlunit
10291 (name "java-xmlunit")
10295 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10296 version ".tar.gz"))
10297 (file-name (string-append name "-" version ".tar.gz"))
10300 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10301 (build-system ant-build-system)
10303 `(#:jar-name "java-xmlunit.jar"
10304 #:source-dir "xmlunit-core/src/main/java"
10305 #:test-dir "xmlunit-core/src/test"
10307 (modify-phases %standard-phases
10308 (add-before 'check 'copy-test-resources
10309 (lambda* (#:key inputs #:allow-other-keys)
10310 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10313 `(("java-junit" ,java-junit)
10314 ("java-mockito-1" ,java-mockito-1)
10315 ("java-hamcrest-all" ,java-hamcrest-all)
10316 ("java-objenesis" ,java-objenesis)
10317 ("java-asm" ,java-asm)
10318 ("java-cglib" ,java-cglib)
10322 (uri (git-reference
10323 (url "https://github.com/xmlunit/test-resources.git")
10324 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10325 (file-name "java-xmlunit-test-resources")
10328 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10329 (home-page "http://www.xmlunit.org/")
10330 (synopsis "XML output testing")
10331 (description "XMLUnit provides you with the tools to verify the XML you
10332 emit is the one you want to create. It provides helpers to validate against
10333 an XML Schema, assert the values of XPath queries or compare XML documents
10334 against expected outcomes.")
10335 (license license:asl2.0)))
10337 (define-public java-xmlunit-legacy
10339 (inherit java-xmlunit)
10340 (name "java-xmlunit-legacy")
10342 `(#:jar-name "java-xmlunit-legacy.jar"
10343 #:source-dir "xmlunit-legacy/src/main/java"
10344 #:test-dir "xmlunit-legacy/src/test"))
10346 `(("java-xmlunit" ,java-xmlunit)
10347 ("java-junit" ,java-junit)))
10349 `(("java-mockito-1" ,java-mockito-1)))))
10351 (define-public java-xmlunit-matchers
10353 (inherit java-xmlunit)
10354 (name "java-xmlunit-matchers")
10356 `(#:jar-name "java-xmlunit-matchers.jar"
10357 #:source-dir "xmlunit-matchers/src/main/java"
10358 #:test-dir "xmlunit-matchers/src/test"
10360 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10361 (list "**/ValidationMatcherTest.java")
10363 (modify-phases %standard-phases
10364 (add-before 'build 'copy-test-class
10366 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10367 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10369 (add-before 'build 'fix-test-resources-path
10371 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10372 (("../test-resources") "test-resources"))
10374 (add-before 'check 'copy-test-resources
10375 (lambda* (#:key inputs #:allow-other-keys)
10376 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10379 `(("java-xmlunit" ,java-xmlunit)
10380 ("java-junit" ,java-junit)))))
10382 (define-public java-openchart2
10384 (name "java-openchart2")
10388 (uri (string-append "http://download.approximatrix.com/openchart2/"
10389 "openchart2-" version ".source.zip"))
10392 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10393 (build-system ant-build-system)
10395 `(#:test-target "test"
10397 (modify-phases %standard-phases
10398 (add-after 'unpack 'fix-junit-errors
10400 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10401 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10402 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10403 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10404 "model/DefaultChartDataModelConstraintsTest.java"
10405 "model/MultiScatterDataModelConstraintsTest.java"
10406 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10407 (("(assertEquals[^;]+);" before _)
10408 (string-append (string-drop-right before 2) ", 1E-6);"))))
10410 (replace 'install (install-jars ".")))))
10413 ("java-junit" ,java-junit)
10414 ("java-hamcrest-core" ,java-hamcrest-core)))
10415 (home-page "http://approximatrix.com/products/openchart2/")
10416 (synopsis "Simple plotting for Java")
10417 (description "Openchart2 provides a simple, yet powerful, interface for
10418 Java programmers to create two-dimensional charts and plots. The library
10419 features an assortment of graph styles, including advanced scatter plots, bar
10420 graphs, and pie charts.")
10421 (license license:lgpl2.1+)))
10423 (define-public java-commons-httpclient
10425 (name "java-commons-httpclient")
10429 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10430 "commons-httpclient/source/commons-httpclient-"
10431 version "-src.tar.gz"))
10434 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10435 (build-system ant-build-system)
10437 `(#:build-target "compile"
10438 #:test-target "test"
10439 #:tests? #f; requires junit-textui (junit 3)
10441 (modify-phases %standard-phases
10442 (add-before 'build 'fix-accent
10444 (for-each (lambda (file)
10445 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10447 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10448 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10449 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10450 "src/test/org/apache/commons/httpclient/TestHttps.java"
10451 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10454 (lambda* (#:key outputs #:allow-other-keys)
10455 (invoke "ant" "dist"
10456 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10460 `(("java-commons-logging" ,java-commons-logging-minimal)
10461 ("java-commons-codec" ,java-commons-codec)))
10462 (home-page "https://hc.apache.org")
10463 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10464 (description "This package contains an HTTP/1.1 compliant HTTP agent
10465 implementation. It also provides reusable components for client-side
10466 authentication, HTTP state management, and HTTP connection management.")
10467 (license license:asl2.0)))
10469 (define-public java-commons-vfs
10471 (name "java-commons-vfs")
10475 (uri (string-append "mirror://apache/commons/vfs/source/"
10476 "commons-vfs2-distribution-" version "-src.tar.gz"))
10477 (file-name (string-append name "-" version ".tar.gz"))
10480 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10481 (modules '((guix build utils)))
10484 (for-each delete-file
10485 (find-files "." "\\.jar$"))
10487 (build-system ant-build-system)
10489 `(#:jar-name "commons-vfs.jar"
10490 #:source-dir "commons-vfs2/src/main/java"
10491 #:test-dir "commons-vfs2/src/test"
10492 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10495 (modify-phases %standard-phases
10496 (add-before 'build 'remove-hadoop-and-webdav
10497 ; Remove these files as they are not required and depend on difficult
10500 (for-each delete-file-recursively
10501 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10502 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10505 `(("java-commons-collections4" ,java-commons-collections4)
10506 ("java-commons-compress" ,java-commons-compress)
10507 ("java-commons-httpclient" ,java-commons-httpclient)
10508 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10509 ("java-commons-net" ,java-commons-net)
10510 ("java-jsch" ,java-jsch)))
10511 (home-page "http://commons.apache.org/proper/commons-vfs/")
10512 (synopsis "Java file system library")
10513 (description "Commons VFS provides a single API for accessing various
10514 different file systems. It presents a uniform view of the files from various
10515 different sources, such as the files on local disk, on an HTTP server, or
10516 inside a Zip archive.")
10517 (license license:asl2.0)))
10519 (define-public java-jakarta-oro
10521 (name "java-jakarta-oro")
10525 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10526 "jakarta-oro-" version ".tar.gz"))
10529 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10530 (modules '((guix build utils)))
10533 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10535 (build-system ant-build-system)
10537 `(#:build-target "package"
10538 #:tests? #f; tests are run as part of the build process
10540 (modify-phases %standard-phases
10542 (install-jars ,(string-append "jakarta-oro-" version))))))
10543 (home-page "https://jakarta.apache.org/oro/")
10544 (synopsis "Text-processing for Java")
10545 (description "The Jakarta-ORO Java classes are a set of text-processing
10546 Java classes that provide Perl5 compatible regular expressions, AWK-like
10547 regular expressions, glob expressions, and utility classes for performing
10548 substitutions, splits, filtering filenames, etc. This library is the successor
10549 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10551 (license license:asl1.1)))
10553 (define-public java-native-access
10555 (name "java-native-access")
10559 (uri (string-append "https://github.com/java-native-access/jna/"
10560 "archive/" version ".tar.gz"))
10561 (file-name (string-append name "-" version ".tar.gz"))
10564 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10565 (modules '((guix build utils)))
10568 (for-each delete-file (find-files "." ".*.jar"))
10569 (delete-file-recursively "native/libffi")
10570 (delete-file-recursively "dist")
10572 (build-system ant-build-system)
10574 `(#:tests? #f; FIXME: tests require reflections.jar
10575 #:test-target "test"
10576 #:make-flags (list "-Ddynlink.native=true")
10578 (modify-phases %standard-phases
10579 (add-before 'build 'fix-build.xml
10580 (lambda* (#:key inputs #:allow-other-keys)
10581 (substitute* "build.xml"
10582 ;; Since we removed the bundled ant.jar, give the correct path
10583 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10584 ;; We removed generated native libraries. We can only rebuild one
10585 ;; so don't fail if we can't find a native library for another architecture.
10586 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10587 ;; Copy test dependencies
10588 (copy-file (string-append (assoc-ref inputs "java-junit")
10589 "/share/java/junit.jar")
10591 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10592 "/share/java/hamcrest-core.jar")
10593 "lib/hamcrest-core.jar")
10594 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10596 (add-before 'build 'build-native
10598 (invoke "ant" "-Ddynlink.native=true" "native")
10601 (install-jars "build")))))
10603 `(("libffi" ,libffi)
10607 `(("java-junit" ,java-junit)
10608 ("java-hamcrest-core" ,java-hamcrest-core)))
10609 (home-page "https://github.com/java-native-access/jna")
10610 (synopsis "Access to native shared libraries from Java")
10611 (description "JNA provides Java programs easy access to native shared
10612 libraries without writing anything but Java code - no JNI or native code is
10613 required. JNA allows you to call directly into native functions using natural
10614 Java method invocation.")
10615 ;; Java Native Access project (JNA) is dual-licensed under 2
10616 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10619 license:lgpl2.1+))))
10621 (define-public java-native-access-platform
10623 (inherit java-native-access)
10624 (name "java-native-access-platform")
10626 `(#:test-target "test"
10627 #:tests? #f; require jna-test.jar
10629 (modify-phases %standard-phases
10630 (add-before 'build 'chdir
10632 (chdir "contrib/platform")
10634 (add-after 'chdir 'fix-ant
10635 (lambda* (#:key inputs #:allow-other-keys)
10636 (substitute* "nbproject/project.properties"
10637 (("../../build/jna.jar")
10638 (string-append (assoc-ref inputs "java-native-access")
10639 "/share/java/jna.jar"))
10640 (("../../lib/hamcrest-core-.*.jar")
10641 (string-append (assoc-ref inputs "java-hamcrest-core")
10642 "/share/java/hamcrest-core.jar"))
10643 (("../../lib/junit.jar")
10644 (string-append (assoc-ref inputs "java-junit")
10645 "/share/java/junit.jar")))
10648 (install-jars "dist")))))
10650 `(("java-native-access" ,java-native-access)))
10651 (synopsis "Cross-platform mappings for jna")
10652 (description "java-native-access-platfrom has cross-platform mappings
10653 and mappings for a number of commonly used platform functions, including a
10654 large number of Win32 mappings as well as a set of utility classes that
10655 simplify native access.")))
10657 (define-public java-jsch-agentproxy-core
10659 (name "java-jsch-agentproxy-core")
10663 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10664 version ".tar.gz"))
10665 (file-name (string-append name "-" version ".tar.gz"))
10668 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10669 (build-system ant-build-system)
10671 `(#:jar-name "jsch-agentproxy-core.jar"
10672 #:source-dir "jsch-agent-proxy-core/src/main/java"
10673 #:tests? #f)); no tests
10674 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10675 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10676 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10677 and Pageant included Putty. It will be easily integrated into JSch, and users
10678 will be allowed to use these programs for authentication.")
10679 (license license:bsd-3)))
10681 (define-public java-jsch-agentproxy-sshagent
10683 (inherit java-jsch-agentproxy-core)
10684 (name "java-jsch-agentproxy-sshagent")
10686 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10687 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10688 #:tests? #f)); no tests
10690 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10691 (synopsis "Proxy to ssh-agent")
10692 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10693 and Pageant included in Putty. This component contains the code for a proxy to
10696 (define-public java-jsch-agentproxy-usocket-jna
10698 (inherit java-jsch-agentproxy-core)
10699 (name "java-jsch-agentproxy-usocket-jna")
10701 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10702 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10703 #:tests? #f)); no tests
10705 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10706 ("java-native-access" ,java-native-access)))
10707 (synopsis "USocketFactory implementation using JNA")
10708 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10709 and Pageant included in Putty. This component contains an implementation of
10710 USocketFactory using @dfn{JNA} (Java Native Access).")))
10712 (define-public java-jsch-agentproxy-pageant
10714 (inherit java-jsch-agentproxy-core)
10715 (name "java-jsch-agentproxy-pageant")
10717 `(#:jar-name "jsch-agentproxy-pageant.jar"
10718 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10719 #:tests? #f)); no tests
10721 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10722 ("java-native-access" ,java-native-access)
10723 ("java-native-access-platform" ,java-native-access-platform)))
10724 (synopsis "Proxy to pageant")
10725 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10726 and Pageant included in Putty. This component contains the code for a proxy to
10729 (define-public java-jsch-agentproxy-usocket-nc
10731 (inherit java-jsch-agentproxy-core)
10732 (name "java-jsch-agentproxy-usocket-nc")
10734 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10735 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10736 #:tests? #f)); no tests
10738 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10739 (synopsis "USocketFactory implementation using netcat")
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 netcat.")))
10744 (define-public java-jsch-agentproxy-connector-factory
10746 (inherit java-jsch-agentproxy-core)
10747 (name "java-jsch-agentproxy-connector-factory")
10749 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10750 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10751 #:tests? #f)); no tests
10753 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10754 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10755 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10756 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10757 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10758 (synopsis "Connector factory for jsch agent proxy")
10759 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10760 and Pageant included in Putty. This component contains a connector factory.")))
10762 (define-public java-jsch-agentproxy-jsch
10764 (inherit java-jsch-agentproxy-core)
10765 (name "java-jsch-agentproxy-jsch")
10767 `(#:jar-name "jsch-agentproxy-jsch.jar"
10768 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10769 #:tests? #f)); no tests
10771 `(("java-jsch" ,java-jsch)
10772 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10773 (synopsis "JSch integration library for agentproxy")
10774 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10775 and Pageant included in Putty. This component contains a library to use
10776 jsch-agent-proxy with JSch.")))
10778 (define-public java-apache-ivy
10780 (name "java-apache-ivy")
10784 (uri (string-append "mirror://apache//ant/ivy/" version
10785 "/apache-ivy-" version "-src.tar.gz"))
10788 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10791 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10792 (build-system ant-build-system)
10794 `(#:jar-name "ivy.jar"
10797 (modify-phases %standard-phases
10798 (add-before 'build 'remove-example
10800 (delete-file-recursively "src/example")
10802 (add-before 'build 'copy-resources
10804 (with-directory-excursion "src/java"
10805 (for-each (lambda (file)
10806 (install-file file (string-append "../../build/classes/" (dirname file))))
10808 (find-files "." ".*.css")
10809 (find-files "." ".*.ent")
10810 (find-files "." ".*.html")
10811 (find-files "." ".*.properties")
10812 (find-files "." ".*.xsd")
10813 (find-files "." ".*.xsl")
10814 (find-files "." ".*.xml"))))
10816 (add-before 'build 'fix-vfs
10819 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10820 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10821 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10823 (add-before 'install 'copy-manifest
10825 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10827 (add-before 'install 'repack
10829 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10830 "-C" "build/classes" ".")))
10831 (add-after 'install 'install-bin
10832 (lambda* (#:key outputs #:allow-other-keys)
10833 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10834 (ivy (string-append bin "/ivy"))
10835 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10837 (with-output-to-file ivy
10839 (display (string-append
10840 "#!" (which "sh") "\n"
10841 "if [[ -z $CLASSPATH ]]; then\n"
10842 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10844 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10846 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10850 `(("java-bouncycastle" ,java-bouncycastle)
10851 ("java-commons-cli" ,java-commons-cli)
10852 ("java-commons-collections" ,java-commons-collections)
10853 ("java-commons-httpclient" ,java-commons-httpclient)
10854 ("java-commons-lang" ,java-commons-lang)
10855 ("java-commons-vfs" ,java-commons-vfs)
10856 ("java-jakarta-oro" ,java-jakarta-oro)
10857 ("java-jsch" ,java-jsch)
10858 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10859 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10860 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10861 ("java-junit" ,java-junit)))
10862 (home-page "https://ant.apache.org/ivy")
10863 (synopsis "Dependency manager for the Java programming language")
10864 (description "Ivy is a tool for managing (recording, tracking, resolving
10865 and reporting) project dependencies. It is characterized by the following:
10868 @item flexibility and configurability - Ivy is essentially process agnostic
10869 and is not tied to any methodology or structure. Instead it provides the
10870 necessary flexibility and configurability to be adapted to a broad range
10871 of dependency management and build processes.
10872 @item tight integration with Apache Ant - while available as a standalone tool,
10873 Ivy works particularly well with Apache Ant providing a number of
10874 powerful Ant tasks ranging from dependency resolution to dependency
10875 reporting and publication.
10877 (license license:asl2.0)))
10879 (define-public java-eclipse-sisu-inject
10881 (name "java-eclipse-sisu-inject")
10885 (uri (git-reference
10886 (url "https://github.com/eclipse/sisu.inject/")
10887 (commit "releases/0.3.3")))
10888 (file-name (git-file-name name version))
10891 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
10892 (build-system ant-build-system)
10894 `(#:jar-name "eclipse-sisu-inject.jar"
10895 #:source-dir "org.eclipse.sisu.inject/src"
10897 #:tests? #f)); no tests
10899 `(("java-guice" ,java-guice)
10900 ("java-guice-servlet" ,java-guice-servlet)
10901 ("java-javax-inject" ,java-javax-inject)
10902 ("java-javaee-servletapi" ,java-javaee-servletapi)
10903 ("java-junit" ,java-junit)
10904 ("java-slf4j-api" ,java-slf4j-api)
10905 ("java-jsr305" ,java-jsr305)
10906 ("java-jsr250" ,java-jsr250)
10907 ("java-cdi-api" ,java-cdi-api)
10908 ("java-osgi-framework" ,java-osgi-framework)
10909 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10910 ("java-testng" ,java-testng)))
10911 (home-page "https://www.eclipse.org/sisu/")
10912 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10913 (description "Sisu is a modular JSR330-based container that supports
10914 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10915 Google-Guice to perform dependency injection and provide the core JSR330
10916 support, but removes the need to write explicit bindings in Guice modules.
10917 Integration with other containers via the Eclipse Extension Registry and the
10918 OSGi Service Registry is a goal of this project.")
10919 (license license:epl1.0)))
10921 (define-public java-eclipse-sisu-plexus
10923 (name "java-eclipse-sisu-plexus")
10927 (uri (git-reference
10928 (url "https://github.com/eclipse/sisu.plexus.git")
10929 (commit (string-append "releases/" version))))
10930 (file-name (git-file-name name version))
10933 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
10934 (modules '((guix build utils)))
10937 (for-each delete-file (find-files "." ".*.jar"))
10938 (rename-file "org.eclipse.sisu.plexus.tests/src"
10939 "org.eclipse.sisu.plexus.tests/java")
10941 (build-system ant-build-system)
10943 `(#:jar-name "eclipse-sisu-plexus.jar"
10944 #:source-dir "org.eclipse.sisu.plexus/src"
10945 #:test-dir "org.eclipse.sisu.plexus.tests"
10948 ;; This test fails probably because we can't generate the necessary
10950 "**/PlexusLoggingTest.*"
10951 ;; FIXME: This test fails because of some injection error
10952 "**/PlexusRequirementTest.*")
10955 (modify-phases %standard-phases
10956 (add-before 'build 'copy-resources
10958 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10959 "build/classes/META-INF/plexus")
10961 (add-before 'check 'build-test-jar
10963 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10965 (with-directory-excursion "java"
10966 (apply invoke "javac" "-cp"
10967 (string-append (getenv "CLASSPATH")
10968 ":../../../../../build/classes")
10969 (find-files "." ".*.java"))
10970 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10971 (find-files "." ".*.jar")))
10972 (mkdir-p "build/META-INF/plexus")
10973 (copy-file "resources/META-INF/plexus/components.xml"
10974 "build/META-INF/plexus/components.xml")
10975 (with-directory-excursion "build"
10976 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10977 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10978 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10979 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10980 (("resources/component-jar")
10981 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10984 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10985 ("java-plexus-util" ,java-plexus-utils)
10986 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10987 ("java-osgi-framework" ,java-osgi-framework)
10988 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10989 ("java-guice" ,java-guice)
10990 ("java-javax-inject" ,java-javax-inject)
10991 ("java-slf4j-api" ,java-slf4j-api)
10992 ("java-junit" ,java-junit)))
10994 `(("java-guava" ,java-guava)
10995 ("java-aopalliance" ,java-aopalliance)
10996 ("java-cglib" ,java-cglib)
10997 ("java-asm" ,java-asm)))
10998 (home-page "https://www.eclipse.org/sisu/")
10999 (synopsis "Plexus support for the sisu container")
11000 (description "Sisu is a modular JSR330-based container that supports
11001 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11002 adds Plexus support to the Sisu-Inject container.")
11003 (license license:epl1.0)))
11005 (define-public java-commons-compiler
11007 (name "java-commons-compiler")
11011 (uri (git-reference
11012 (url "https://github.com/janino-compiler/janino")
11013 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11014 (file-name (string-append name "-" version))
11017 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11018 (modules '((guix build utils)))
11021 (for-each delete-file
11022 (find-files "." "\\.jar$"))
11024 (build-system ant-build-system)
11026 `(#:jar-name "commons-compiler.jar"
11027 #:source-dir "commons-compiler/src/main"
11028 #:tests? #f)); no tests
11029 (home-page "https://github.com/janino-compiler/janino")
11030 (synopsis "Java compiler")
11031 (description "Commons-compiler contains an API for janino, including the
11032 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11033 and @code{ISimpleCompiler} interfaces.")
11034 (license license:bsd-3)))
11036 (define-public java-janino
11038 (inherit java-commons-compiler)
11039 (name "java-janino")
11041 `(#:jar-name "janino.jar"
11042 #:source-dir "src/main/java"
11044 (modify-phases %standard-phases
11045 (add-before 'configure 'chdir
11050 `(("java-commons-compiler" ,java-commons-compiler)))
11052 `(("java-junit" ,java-junit)
11053 ("java-hamcrest-core" ,java-hamcrest-core)))
11054 (description "Janino is a Java compiler. Janino can compile a set of
11055 source files to a set of class files like @code{javac}, but also compile a
11056 Java expression, block, class body or source file in memory, load the bytecode
11057 and execute it directly in the same JVM. @code{janino} can also be used for
11058 static code analysis or code manipulation.")))
11060 (define-public java-logback-core
11062 (name "java-logback-core")
11066 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11067 version ".tar.gz"))
11068 (file-name (string-append name "-" version ".tar.gz"))
11071 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11072 (modules '((guix build utils)))
11075 (delete-file-recursively "logback-access/lib")
11077 (build-system ant-build-system)
11079 `(#:jar-name "logback.jar"
11080 #:source-dir "src/main/java"
11081 #:test-dir "src/test"
11083 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11084 ;; which creates FastClasses
11085 (list "**/AllCoreTest.*"
11086 "**/AutoFlushingObjectWriterTest.*"
11088 "**/ResilientOutputStreamTest.*"
11089 ;; And we still don't want to run abstract classes
11092 (modify-phases %standard-phases
11093 (add-before 'configure 'chdir
11095 (chdir "logback-core")
11098 `(("java-javax-mail" ,java-javax-mail)
11099 ("servlet" ,java-javaee-servletapi)
11100 ("java-commons-compiler" ,java-commons-compiler)
11101 ("java-janino" ,java-janino)))
11103 `(("java-junit" ,java-junit)
11104 ("java-hamcrest-core" ,java-hamcrest-core)
11105 ("java-mockito-1" ,java-mockito-1)
11106 ("java-cglib" ,java-cglib)
11107 ("java-asm" ,java-asm)
11108 ("java-objenesis" ,java-objenesis)
11109 ("java-joda-time" ,java-joda-time)))
11110 (home-page "https://logback.qos.ch")
11111 (synopsis "Logging for java")
11112 (description "Logback is intended as a successor to the popular log4j project.
11113 This module lays the groundwork for the other two modules.")
11114 ;; Either epl1.0 or lgpl2.1
11115 (license (list license:epl1.0
11116 license:lgpl2.1))))
11118 (define-public java-logback-classic
11120 (inherit java-logback-core)
11121 (name "java-logback-classic")
11123 `(#:jar-name "logback-classic.jar"
11124 #:source-dir "src/main/java"
11125 #:test-dir "src/test"
11126 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11129 (modify-phases %standard-phases
11130 (add-before 'configure 'chdir
11132 (chdir "logback-classic")
11135 (lambda* (#:key inputs #:allow-other-keys)
11136 (mkdir-p "build/classes")
11137 (setenv "CLASSPATH"
11139 (apply append (map (lambda (input)
11140 (find-files (assoc-ref inputs input)
11142 '("java-logback-core" "java-slf4j-api"
11143 "java-commons-compiler" "servlet"
11146 (apply invoke "groovyc" "-d" "build/classes" "-j"
11147 (find-files "src/main/" ".*\\.(groovy|java)$"))
11148 (invoke "ant" "jar")
11151 `(("java-logback-core" ,java-logback-core)
11152 ("java-slf4j-api" ,java-slf4j-api)
11153 ,@(package-inputs java-logback-core)))
11155 `(("groovy" ,groovy)))
11156 (description "Logback is intended as a successor to the popular log4j project.
11157 This module can be assimilated to a significantly improved version of log4j.
11158 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11159 can readily switch back and forth between logback and other logging frameworks
11160 such as log4j or @code{java.util.logging} (JUL).")))
11162 (define-public java-qdox
11165 ; Newer version exists, but this version is required by java-plexus-component-metadata
11169 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
11170 ;; Older releases at https://github.com/codehaus/qdox/
11171 ;; Note: The release at maven is pre-generated. The release at
11172 ;; github requires jflex.
11173 (uri (string-append "http://central.maven.org/maven2/"
11174 "com/thoughtworks/qdox/qdox/" version
11175 "/qdox-" version "-sources.jar"))
11178 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
11179 (build-system ant-build-system)
11181 `(#:jar-name "qdox.jar"
11182 #:tests? #f)); no tests
11183 (home-page "http://qdox.codehaus.org/")
11184 (synopsis "Parse definitions from Java source files")
11185 (description "QDox is a high speed, small footprint parser for extracting
11186 class/interface/method definitions from source files complete with JavaDoc
11187 @code{@@tags}. It is designed to be used by active code generators or
11188 documentation tools.")
11189 (license license:asl2.0)))
11191 (define-public java-jgit
11194 (version "4.7.0.201704051617-r")
11197 (uri (string-append "https://repo1.maven.org/maven2/"
11198 "org/eclipse/jgit/org.eclipse.jgit/"
11199 version "/org.eclipse.jgit-"
11200 version "-sources.jar"))
11203 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11204 (build-system ant-build-system)
11206 `(#:tests? #f ; There are no tests to run.
11207 #:jar-name "jgit.jar"
11208 ;; JGit must be built with a JDK supporting Java 8.
11210 ;; Target our older default JDK.
11211 #:make-flags (list "-Dtarget=1.7")
11213 (modify-phases %standard-phases
11214 ;; The jar file generated by the default build.xml does not include
11215 ;; the text properties files, so we need to add them.
11216 (add-after 'build 'add-properties
11217 (lambda* (#:key jar-name #:allow-other-keys)
11218 (with-directory-excursion "src"
11219 (apply invoke "jar" "-uf"
11220 (string-append "../build/jar/" jar-name)
11221 (find-files "." "\\.properties$")))
11224 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11225 ("java-javaewah" ,java-javaewah)
11226 ("java-jsch" ,java-jsch)
11227 ("java-slf4j-api" ,java-slf4j-api)))
11228 (home-page "https://eclipse.org/jgit/")
11229 (synopsis "Java library implementing the Git version control system")
11230 (description "JGit is a lightweight, pure Java library implementing the
11231 Git version control system, providing repository access routines, support for
11232 network protocols, and core version control algorithms.")
11233 (license license:edl1.0)))
11235 ;; For axoloti. This package can still be built with icedtea-7, which is
11236 ;; currently used as the default JDK.
11237 (define-public java-jgit-4.2
11238 (package (inherit java-jgit)
11239 (version "4.2.0.201601211800-r")
11242 (uri (string-append "https://repo1.maven.org/maven2/"
11243 "org/eclipse/jgit/org.eclipse.jgit/"
11244 version "/org.eclipse.jgit-"
11245 version "-sources.jar"))
11248 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11249 (build-system ant-build-system)
11251 (substitute-keyword-arguments (package-arguments java-jgit)
11252 ;; Build for default JDK.
11253 ((#:jdk _) icedtea-7)
11255 `(modify-phases ,phases
11256 (add-after 'unpack 'use-latest-javaewah-API
11258 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11259 (("wordinbits") "WORD_IN_BITS"))
11262 `(("java-javaewah" ,java-javaewah)
11263 ("java-jsch" ,java-jsch)
11264 ("java-slf4j-api" ,java-slf4j-api)))))
11266 (define-public abcl
11273 (uri (string-append "https://abcl.org/releases/"
11274 version "/abcl-src-" version ".tar.gz"))
11277 "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj"))
11280 "abcl-fix-build-xml.patch"))))
11281 (build-system ant-build-system)
11283 `(("java-junit" ,java-junit)))
11285 `(#:build-target "abcl.jar"
11286 #:test-target "abcl.test"
11288 (modify-phases %standard-phases
11290 (lambda* (#:key outputs #:allow-other-keys)
11291 (let ((share (string-append (assoc-ref outputs "out")
11293 (bin (string-append (assoc-ref outputs "out")
11296 (install-file "dist/abcl.jar" share)
11297 (install-file "dist/abcl-contrib.jar" share)
11299 (with-output-to-file (string-append bin "abcl")
11301 (let ((classpath (string-append
11304 share "abcl-contrib.jar")))
11305 (display (string-append
11306 "#!" (which "sh") "\n"
11307 "if [[ -z $CLASSPATH ]]; then\n"
11308 " cp=\"" classpath "\"\n"
11310 " cp=\"" classpath ":$CLASSPATH\"\n"
11312 "exec " (which "java")
11313 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11314 (chmod (string-append bin "abcl") #o755)
11316 (home-page "https://abcl.org/")
11317 (synopsis "Common Lisp Implementation on the JVM")
11319 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11320 Lisp language featuring both an interpreter and a compiler, running in the
11321 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11322 in any Java application. Additionally, it can be used to implement (parts of)
11323 the application using Java to Lisp integration APIs.")
11324 (license (list license:gpl2+
11325 ;; named-readtables is released under 3 clause BSD
11327 ;; jfli is released under CPL 1.0
11330 (define-public java-jsonp-api
11332 (name "java-jsonp-api")
11336 (uri (git-reference
11337 (url "https://github.com/eclipse-ee4j/jsonp")
11338 (commit (string-append version "-RELEASE"))))
11339 (file-name (git-file-name name version))
11342 "0nxq16lrx7i87hgyj5rzcwilvr67h0i299gygfn8f5vs4n7n59vy"))))
11343 (build-system ant-build-system)
11345 `(#:jar-name "jsonp-api.jar"
11347 #:source-dir "api/src/main/java"
11348 #:test-dir "api/src/test"))
11349 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11350 (synopsis "JSON Processing in Java")
11351 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11352 parse, generate, transform and query) JSON messages. It produces and
11353 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11354 and allows to build a Java object model for JSON text using API classes
11355 (similar to DOM API for XML).")
11356 ;; either gpl2 only with classpath exception, or epl2.0.
11357 (license (list license:gpl2
11360 (define-public java-jsonp-impl
11362 (inherit java-jsonp-api)
11363 (name "java-jsonp-impl")
11365 `(#:jar-name "jsonp-impl.jar"
11367 #:source-dir "impl/src/main/java"
11368 #:test-dir "impl/src/test"))
11370 `(("java-jsonp-api" ,java-jsonp-api)))
11371 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11372 parse, generate, transform and query) JSON messages. This package contains
11373 a reference implementation of that API.")))
11375 (define-public java-xmp
11381 (uri (string-append "http://download.macromedia.com/pub/developer"
11382 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11385 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11386 (build-system ant-build-system)
11388 `(#:build-target "build"
11389 #:tests? #f; no tests
11391 (modify-phases %standard-phases
11392 (add-after 'unpack 'chdir
11396 (add-before 'build 'fix-timestamp
11398 (substitute* "build.xml"
11399 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11402 (install-jars "."))
11403 (add-after 'install 'install-doc
11404 (lambda* (#:key outputs #:allow-other-keys)
11407 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11410 `(("unzip" ,unzip)))
11411 (home-page "https://www.adobe.com/devnet/xmp.html")
11412 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11413 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11414 technology that allows you to embed data about a file, known as metadata,
11415 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11416 library and the API is similar.")
11417 (license license:bsd-3)))
11419 (define-public java-metadata-extractor
11421 (name "java-metadata-extractor")
11425 (uri (git-reference
11426 (url "https://github.com/drewnoakes/metadata-extractor")
11428 (file-name (git-file-name name version))
11431 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11432 (build-system ant-build-system)
11434 `(#:jar-name "metadata-extractor.jar"
11435 #:source-dir "Source"
11438 (modify-phases %standard-phases
11439 (add-before 'check 'fix-test-dir
11441 (substitute* "build.xml"
11442 (("/java\">") "\">"))
11445 `(("java-xmp" ,java-xmp)))
11447 `(("java-hamcrest-core" ,java-hamcrest-core)
11448 ("java-junit" ,java-junit)))
11449 (home-page "https://github.com/drewnoakes/metadata-extractor")
11450 (synopsis "Extract metadata from image and video files")
11451 (description "Metadata-extractor is a straightforward Java library for
11452 reading metadata from image files. It is able to read metadata in Exif,
11453 IPTC, XMP, ICC and more formats.")
11454 (license license:asl2.0)))