gnu: clojure: Update to 1.9.0.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages java)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix hg-download)
31 #:use-module (guix git-download)
32 #:use-module (guix svn-download)
33 #:use-module (guix utils)
34 #:use-module (guix build-system ant)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system trivial)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages attr)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages bash)
42 #:use-module (gnu packages certs)
43 #:use-module (gnu packages cpio)
44 #:use-module (gnu packages cups)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages fontutils)
47 #:use-module (gnu packages gawk)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages gcc)
50 #:use-module (gnu packages gl)
51 #:use-module (gnu packages gnuzilla) ;nss
52 #:use-module (gnu packages ghostscript) ;lcms
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages guile)
56 #:use-module (gnu packages icu4c)
57 #:use-module (gnu packages image)
58 #:use-module (gnu packages libffi)
59 #:use-module (gnu packages linux) ;alsa
60 #:use-module (gnu packages web)
61 #:use-module (gnu packages wget)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages popt)
65 #:use-module (gnu packages kerberos)
66 #:use-module (gnu packages xml)
67 #:use-module (gnu packages xorg)
68 #:use-module (gnu packages texinfo)
69 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
70 #:use-module (srfi srfi-11)
71 #:use-module (ice-9 match))
72
73 \f
74 ;;;
75 ;;; Java bootstrap toolchain.
76 ;;;
77
78 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
79 ;; use it to build the SableVM standard library and virtual machine, which are
80 ;; written in a simpler dialect of Java and C, respectively. This is
81 ;; sufficient to build an older version of Ant, which is needed to build an
82 ;; older version of ECJ, an incremental Java compiler, both of which are
83 ;; written in Java.
84 ;;
85 ;; ECJ is needed to build the latest release of GNU Classpath (0.99).
86 ;; Classpath (> 0.98) is a requirement for JamVM, a more modern implementation
87 ;; of the Java virtual machine.
88 ;;
89 ;; With JamVM we can build the latest development version of GNU Classpath,
90 ;; which has much more support for Java 1.6 than the latest release. Since
91 ;; the previous build of JamVM is limited by the use of GNU Classpath 0.99 we
92 ;; rebuild it with the latest development version of GNU Classpath.
93 ;;
94 ;; Finally, we use the bootstrap toolchain to build the OpenJDK with the
95 ;; Icedtea 1.x build framework. We then build the more recent JDKs Icedtea
96 ;; 2.x and Icedtea 3.x.
97
98 (define jikes
99 (package
100 (name "jikes")
101 (version "1.22")
102 (source (origin
103 (method url-fetch)
104 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
105 version "/jikes-" version ".tar.bz2"))
106 (sha256
107 (base32
108 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
109 (build-system gnu-build-system)
110 (home-page "http://jikes.sourceforge.net/")
111 (synopsis "Compiler for the Java language")
112 (description "Jikes is a compiler that translates Java source files as
113 defined in The Java Language Specification into the bytecoded instruction set
114 and binary format defined in The Java Virtual Machine Specification.")
115 (license license:ibmpl1.0)))
116
117 (define sablevm-classpath
118 (package
119 (name "sablevm-classpath")
120 (version "1.13")
121 (source (origin
122 (method url-fetch)
123 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
124 version "/sablevm-classpath-" version ".tar.gz"))
125 (sha256
126 (base32
127 "1qyhyfz8idghxdam16hdgpa24r2x4xbg9z8c8asa3chnd79h3zw2"))))
128 (build-system gnu-build-system)
129 (arguments
130 `(#:configure-flags
131 (list "--with-jikes"
132 "--disable-Werror"
133 "--disable-gmp"
134 "--disable-gtk-peer"
135 "--disable-plugin"
136 "--disable-dssi"
137 "--disable-alsa"
138 "--disable-gjdoc")))
139 (inputs
140 `(("gconf" ,gconf)
141 ("gtk+" ,gtk+-2)))
142 (native-inputs
143 `(("jikes" ,jikes)
144 ("fastjar" ,fastjar)
145 ("pkg-config" ,pkg-config)))
146 (home-page "http://sablevm.org/")
147 (synopsis "Java Virtual Machine")
148 (description "SableVM is a clean-room, highly portable and efficient Java
149 virtual machine. Its goals are to be reasonably small, fast, and compliant
150 with the various specifications (JVM specification, JNI, invocation interface,
151 etc.). SableVM is no longer maintained.
152
153 This package provides the classpath library.")
154 (license license:lgpl2.1+)))
155
156 (define sablevm
157 (package
158 (name "sablevm")
159 (version "1.13")
160 (source (origin
161 (method url-fetch)
162 (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
163 version "/sablevm-" version ".tar.gz"))
164 (sha256
165 (base32
166 "1jyg4bsym6igz94wps5443c7wiwlzinqzkchcw972nz4kf1cql6g"))))
167 (build-system gnu-build-system)
168 (arguments
169 `(#:configure-flags
170 (list "--with-internal-libffi=no"
171 "--with-internal-libpopt=no")
172 #:phases
173 (modify-phases %standard-phases
174 (add-after 'unpack 'remove-timestamp-for-reproducibility
175 (lambda _
176 (substitute* "src/sablevm/Makefile.in"
177 (("\\$\\(SVMCOMPILETIME\\)") "(unknown)"))
178 #t))
179 (add-after 'unpack 'link-with-popt
180 (lambda _
181 (substitute* "src/sablevm/Makefile.in"
182 (("\\$\\(SVMADD\\)" match)
183 (string-append match " -lpopt")))
184 #t))
185 (add-after 'unpack 'patch-path-to-classpath
186 (lambda* (#:key inputs #:allow-other-keys)
187 (substitute* "Makefile.in"
188 (("@datadir@/sablevm-classpath")
189 (string-append (assoc-ref inputs "classpath")
190 "/share/sablevm-classpath")))
191 (substitute* "src/libsablevm/Makefile.in"
192 (("\\$\\(libdir\\)/sablevm-classpath")
193 (string-append (assoc-ref inputs "classpath")
194 "/lib/sablevm-classpath"))
195 (("\\$\\(datadir\\)/sablevm-classpath")
196 (string-append (assoc-ref inputs "classpath")
197 "/share/sablevm-classpath")))
198 #t)))))
199 (inputs
200 `(("classpath" ,sablevm-classpath)
201 ("jikes" ,jikes)
202 ("zlib" ,zlib)
203 ("popt" ,popt)
204 ("libffi" ,libffi)))
205 (native-inputs
206 `(("libltdl" ,libltdl)))
207 (home-page "http://sablevm.org/")
208 (synopsis "Java Virtual Machine")
209 (description "SableVM is a clean-room, highly portable and efficient Java
210 virtual machine. Its goals are to be reasonably small, fast, and compliant
211 with the various specifications (JVM specification, JNI, invocation interface,
212 etc.). SableVM is no longer maintained.
213
214 This package provides the virtual machine.")
215 (license license:lgpl2.1+)))
216
217 (define ant-bootstrap
218 (package
219 (name "ant-bootstrap")
220 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
221 ;; are not supported. The 1.8.x series is the last to use only features
222 ;; supported by Jikes, but it cannot seem to be built with sablevm.
223 (version "1.7.1")
224 (source (origin
225 (method url-fetch)
226 (uri (string-append "http://archive.apache.org/dist/"
227 "ant/source/apache-ant-"
228 version "-src.tar.bz2"))
229 (sha256
230 (base32
231 "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d"))))
232 (build-system gnu-build-system)
233 (arguments
234 `(#:tests? #f ; no "check" target
235 #:phases
236 (modify-phases %standard-phases
237 (delete 'configure)
238 (replace 'build
239 (lambda* (#:key inputs #:allow-other-keys)
240 (setenv "JAVA_HOME"
241 (string-append (assoc-ref inputs "sablevm")
242 "/lib/sablevm"))
243 (setenv "JAVACMD"
244 (string-append (assoc-ref inputs "sablevm")
245 "/bin/java-sablevm"))
246 (setenv "JAVAC"
247 (string-append (assoc-ref inputs "sablevm")
248 "/bin/javac-sablevm"))
249
250 ;; Use jikes instead of javac for <javac ...> tags in build.xml
251 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
252
253 ;; jikes produces lots of warnings, but they are not very
254 ;; interesting, so we silence them.
255 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
256
257 ;; Disable tests because we are bootstrapping and thus don't have
258 ;; any of the dependencies required to build and run the tests.
259 (substitute* "build.xml"
260 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
261 (zero? (system* "bash" "bootstrap.sh"
262 (string-append "-Ddist.dir="
263 (assoc-ref %outputs "out"))))))
264 (delete 'install))))
265 (native-inputs
266 `(("jikes" ,jikes)
267 ("sablevm" ,sablevm)))
268 (home-page "http://ant.apache.org")
269 (synopsis "Build tool for Java")
270 (description
271 "Ant is a platform-independent build tool for Java. It is similar to
272 make but is implemented using the Java language, requires the Java platform,
273 and is best suited to building Java projects. Ant uses XML to describe the
274 build process and its dependencies, whereas Make uses Makefile format.")
275 (license license:asl2.0)))
276
277 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
278 ;; compiler for Java 1.5.
279 (define ecj-bootstrap
280 (package
281 (name "ecj-bootstrap")
282 (version "3.2.2")
283 (source (origin
284 (method url-fetch)
285 (uri (string-append "http://archive.eclipse.org/eclipse/"
286 "downloads/drops/R-" version
287 "-200702121330/ecjsrc.zip"))
288 (sha256
289 (base32
290 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
291 ;; It would be so much easier if we could use the ant-build-system, but we
292 ;; cannot as we don't have ant at this point. We use ecj for
293 ;; bootstrapping the JDK.
294 (build-system gnu-build-system)
295 (arguments
296 `(#:modules ((guix build gnu-build-system)
297 (guix build utils)
298 (srfi srfi-1))
299 #:tests? #f ; there are no tests
300 #:phases
301 (modify-phases %standard-phases
302 (replace 'configure
303 (lambda* (#:key inputs #:allow-other-keys)
304 (setenv "CLASSPATH"
305 (string-join
306 (find-files (string-append (assoc-ref inputs "ant-bootstrap")
307 "/lib")
308 "\\.jar$")
309 ":"))
310 #t))
311 (replace 'build
312 (lambda* (#:key inputs #:allow-other-keys)
313 ;; The unpack phase enters the "org" directory by mistake.
314 (chdir "..")
315
316 ;; Create a simple manifest to make ecj executable.
317 (with-output-to-file "manifest"
318 (lambda _
319 (display "Manifest-Version: 1.0
320 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
321
322 ;; Compile it all!
323 (and (zero? (apply system* "javac-sablevm"
324 (find-files "." "\\.java$")))
325 (zero? (system* "fastjar" "cvfm"
326 "ecj-bootstrap.jar" "manifest" ".")))))
327 (replace 'install
328 (lambda* (#:key outputs #:allow-other-keys)
329 (let ((share (string-append (assoc-ref outputs "out")
330 "/share/java/")))
331 (mkdir-p share)
332 (install-file "ecj-bootstrap.jar" share)
333 #t))))))
334 (native-inputs
335 `(("ant-bootstrap" ,ant-bootstrap)
336 ("unzip" ,unzip)
337 ("sablevm" ,sablevm)
338 ("fastjar" ,fastjar)))
339 (home-page "https://eclipse.org")
340 (synopsis "Eclipse Java development tools core batch compiler")
341 (description "This package provides the Eclipse Java core batch compiler
342 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
343 requirement for all GNU Classpath releases after version 0.93.")
344 (license license:epl1.0)))
345
346 (define ecj-javac-wrapper
347 (package (inherit ecj-bootstrap)
348 (name "ecj-javac-wrapper")
349 (source #f)
350 (build-system trivial-build-system)
351 (arguments
352 `(#:modules ((guix build utils))
353 #:builder
354 (let ((backend 'sablevm))
355 (use-modules (guix build utils))
356 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
357 (target (string-append bin "/javac"))
358 (guile (string-append (assoc-ref %build-inputs "guile")
359 "/bin/guile"))
360 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
361 "/share/java/ecj-bootstrap.jar"))
362 (java (case backend
363 ((sablevm)
364 (string-append (assoc-ref %build-inputs "sablevm")
365 "/lib/sablevm/bin/java"))
366 ((jamvm)
367 (string-append (assoc-ref %build-inputs "jamvm")
368 "/bin/jamvm"))))
369 (bootcp (case backend
370 ((sablevm)
371 (let ((jvmlib (string-append
372 (assoc-ref %build-inputs "sablevm-classpath")
373 "/lib/sablevm")))
374 (string-append jvmlib "/jre/lib/rt.jar")))
375 ((jamvm)
376 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
377 "/share/classpath")))
378 (string-append jvmlib "/lib/glibj.zip:"
379 jvmlib "/lib/tools.zip"))))))
380 (mkdir-p bin)
381 (with-output-to-file target
382 (lambda _
383 (format #t "#!~a --no-auto-compile\n!#\n" guile)
384 (write
385 `(begin (use-modules (ice-9 match)
386 (ice-9 receive)
387 (ice-9 hash-table)
388 (srfi srfi-1)
389 (srfi srfi-26))
390 (define defaults
391 '(("-bootclasspath" ,bootcp)
392 ("-source" "1.5")
393 ("-target" "1.5")
394 ("-cp" ".")))
395 (define (main args)
396 (let ((classpath (getenv "CLASSPATH")))
397 (setenv "CLASSPATH"
398 (string-append ,ecj
399 (if classpath
400 (string-append ":" classpath)
401 ""))))
402 (receive (vm-args other-args)
403 ;; Separate VM arguments from arguments to ECJ.
404 (partition (cut string-prefix? "-J" <>)
405 (fold (lambda (default acc)
406 (if (member (first default) acc)
407 acc (append default acc)))
408 args defaults))
409 (apply system* ,java
410 (append
411 ;; Remove "-J" prefix
412 (map (cut string-drop <> 2) vm-args)
413 '("org.eclipse.jdt.internal.compiler.batch.Main")
414 (cons "-nowarn" other-args)))))
415 ;; Entry point
416 (let ((args (cdr (command-line))))
417 (if (null? args)
418 (format (current-error-port) "javac: no arguments given!\n")
419 (main args)))))))
420 (chmod target #o755)
421 #t))))
422 (native-inputs
423 `(("guile" ,guile-2.2)
424 ("ecj-bootstrap" ,ecj-bootstrap)
425 ("sablevm" ,sablevm)
426 ("sablevm-classpath" ,sablevm-classpath)))
427 (description "This package provides a wrapper around the @dfn{Eclipse
428 compiler for Java} (ecj) with a command line interface that is compatible with
429 the standard javac executable.")))
430
431 ;; Note: All the tool wrappers (e.g. for javah, javac, etc) fail with
432 ;; java.lang.UnsupportedClassVersionError. They simply won't run on the old
433 ;; sablevm. We use Classpath 0.99 to build JamVM, on which the Classpath
434 ;; tools do run. Using these Classpath tools on JamVM we can then build the
435 ;; development version of GNU Classpath.
436 (define classpath-on-sablevm
437 (package
438 (name "classpath")
439 (version "0.99")
440 (source (origin
441 (method url-fetch)
442 (uri (string-append "mirror://gnu/classpath/classpath-"
443 version ".tar.gz"))
444 (sha256
445 (base32
446 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))))
447 (build-system gnu-build-system)
448 (arguments
449 `(#:configure-flags
450 (list (string-append "--with-ecj-jar="
451 (assoc-ref %build-inputs "ecj-bootstrap")
452 "/share/java/ecj-bootstrap.jar")
453 (string-append "JAVAC="
454 (assoc-ref %build-inputs "ecj-javac-wrapper")
455 "/bin/javac")
456 (string-append "JAVA="
457 (assoc-ref %build-inputs "sablevm")
458 "/bin/java-sablevm")
459 "GCJ_JAVAC_TRUE=no"
460 "ac_cv_prog_java_works=yes" ; trust me
461 "--disable-Werror"
462 "--disable-gmp"
463 "--disable-gtk-peer"
464 "--disable-gconf-peer"
465 "--disable-plugin"
466 "--disable-dssi"
467 "--disable-alsa"
468 "--disable-gjdoc")
469 #:phases
470 (modify-phases %standard-phases
471 (add-after 'install 'install-data
472 (lambda _ (zero? (system* "make" "install-data")))))))
473 (native-inputs
474 `(("ecj-bootstrap" ,ecj-bootstrap)
475 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
476 ("fastjar" ,fastjar)
477 ("sablevm" ,sablevm)
478 ("sablevm-classpath" ,sablevm-classpath)
479 ("libltdl" ,libltdl)
480 ("pkg-config" ,pkg-config)))
481 (home-page "https://www.gnu.org/software/classpath/")
482 (synopsis "Essential libraries for Java")
483 (description "GNU Classpath is a project to create core class libraries
484 for use with runtimes, compilers and tools for the Java programming
485 language.")
486 ;; GPLv2 or later, with special linking exception.
487 (license license:gpl2+)))
488
489 (define jamvm-bootstrap
490 (package
491 (name "jamvm")
492 (version "2.0.0")
493 (source (origin
494 (method url-fetch)
495 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
496 "JamVM%20" version "/jamvm-"
497 version ".tar.gz"))
498 (sha256
499 (base32
500 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
501 (build-system gnu-build-system)
502 (arguments
503 `(#:configure-flags
504 (list (string-append "--with-classpath-install-dir="
505 (assoc-ref %build-inputs "classpath")))))
506 (inputs
507 `(("classpath" ,classpath-on-sablevm)
508 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
509 ("zlib" ,zlib)))
510 (home-page "http://jamvm.sourceforge.net/")
511 (synopsis "Small Java Virtual Machine")
512 (description "JamVM is a Java Virtual Machine conforming to the JVM
513 specification edition 2 (blue book). It is extremely small. However, unlike
514 other small VMs it supports the full spec, including object finalisation and
515 JNI.")
516 (license license:gpl2+)))
517
518 ;; We need this because the tools provided by the latest release of GNU
519 ;; Classpath don't actually work with sablevm.
520 (define classpath-jamvm-wrappers
521 (package (inherit classpath-on-sablevm)
522 (name "classpath-jamvm-wrappers")
523 (source #f)
524 (build-system trivial-build-system)
525 (arguments
526 `(#:modules ((guix build utils))
527 #:builder
528 (begin
529 (use-modules (guix build utils))
530 (let* ((bash (assoc-ref %build-inputs "bash"))
531 (jamvm (assoc-ref %build-inputs "jamvm"))
532 (classpath (assoc-ref %build-inputs "classpath"))
533 (bin (string-append (assoc-ref %outputs "out")
534 "/bin/")))
535 (mkdir-p bin)
536 (for-each (lambda (tool)
537 (with-output-to-file (string-append bin tool)
538 (lambda _
539 (format #t "#!~a/bin/sh
540 ~a/bin/jamvm -classpath ~a/share/classpath/tools.zip \
541 gnu.classpath.tools.~a.~a $@"
542 bash jamvm classpath tool
543 (if (string=? "native2ascii" tool)
544 "Native2ASCII" "Main"))))
545 (chmod (string-append bin tool) #o755))
546 (list "javah"
547 "rmic"
548 "rmid"
549 "orbd"
550 "rmiregistry"
551 "native2ascii"))
552 #t))))
553 (native-inputs
554 `(("bash" ,bash)
555 ("jamvm" ,jamvm-bootstrap)
556 ("classpath" ,classpath-on-sablevm)))
557 (inputs '())
558 (synopsis "Executables from GNU Classpath")
559 (description "This package provides wrappers around the tools provided by
560 the GNU Classpath library. They are executed by the JamVM virtual
561 machine.")))
562
563 (define ecj-javac-on-jamvm-wrapper
564 (package (inherit ecj-javac-wrapper)
565 (name "ecj-javac-on-jamvm-wrapper")
566 (arguments
567 `(#:modules ((guix build utils))
568 #:builder
569 ;; TODO: This builder is exactly the same as in ecj-javac-wrapper,
570 ;; except that the backend is 'jamvm here. Can we reuse the same
571 ;; builder somehow?
572 (let ((backend 'jamvm))
573 (use-modules (guix build utils))
574 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
575 (target (string-append bin "/javac"))
576 (guile (string-append (assoc-ref %build-inputs "guile")
577 "/bin/guile"))
578 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
579 "/share/java/ecj-bootstrap.jar"))
580 (java (case backend
581 ((sablevm)
582 (string-append (assoc-ref %build-inputs "sablevm")
583 "/lib/sablevm/bin/java"))
584 ((jamvm)
585 (string-append (assoc-ref %build-inputs "jamvm")
586 "/bin/jamvm"))))
587 (bootcp (case backend
588 ((sablevm)
589 (let ((jvmlib (string-append
590 (assoc-ref %build-inputs "sablevm-classpath")
591 "/lib/sablevm")))
592 (string-append jvmlib "/jre/lib/rt.jar")))
593 ((jamvm)
594 (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
595 "/share/classpath")))
596 (string-append jvmlib "/lib/glibj.zip:"
597 jvmlib "/lib/tools.zip"))))))
598 (mkdir-p bin)
599 (with-output-to-file target
600 (lambda _
601 (format #t "#!~a --no-auto-compile\n!#\n" guile)
602 (write
603 `(begin (use-modules (ice-9 match)
604 (ice-9 receive)
605 (ice-9 hash-table)
606 (srfi srfi-1)
607 (srfi srfi-26))
608 (define defaults
609 '(("-bootclasspath" ,bootcp)
610 ("-source" "1.5")
611 ("-target" "1.5")
612 ("-cp" ".")))
613 (define (main args)
614 (let ((classpath (getenv "CLASSPATH")))
615 (setenv "CLASSPATH"
616 (string-append ,ecj
617 (if classpath
618 (string-append ":" classpath)
619 ""))))
620 (receive (vm-args other-args)
621 ;; Separate VM arguments from arguments to ECJ.
622 (partition (cut string-prefix? "-J" <>)
623 (fold (lambda (default acc)
624 (if (member (first default) acc)
625 acc (append default acc)))
626 args defaults))
627 (apply system* ,java
628 (append
629 ;; Remove "-J" prefix
630 (map (cut string-drop <> 2) vm-args)
631 '("org.eclipse.jdt.internal.compiler.batch.Main")
632 (cons "-nowarn" other-args)))))
633 ;; Entry point
634 (let ((args (cdr (command-line))))
635 (if (null? args)
636 (format (current-error-port) "javac: no arguments given!\n")
637 (main args)))))))
638 (chmod target #o755)
639 #t))))
640 (native-inputs
641 `(("guile" ,guile-2.2)
642 ("ecj-bootstrap" ,ecj-bootstrap)
643 ("jamvm" ,jamvm-bootstrap)
644 ("classpath" ,classpath-on-sablevm)))
645 (description "This package provides a wrapper around the @dfn{Eclipse
646 compiler for Java} (ecj) with a command line interface that is compatible with
647 the standard javac executable. The tool runs on JamVM instead of SableVM.")))
648
649 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
650 ;; then Classpath has gained much more support for Java 1.6.
651 (define-public classpath-devel
652 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
653 (revision "1"))
654 (package (inherit classpath-on-sablevm)
655 (version (string-append "0.99-" revision "." (string-take commit 9)))
656 (source (origin
657 (method git-fetch)
658 (uri (git-reference
659 (url "https://git.savannah.gnu.org/git/classpath.git")
660 (commit commit)))
661 (file-name (string-append "classpath-" version "-checkout"))
662 (sha256
663 (base32
664 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
665 (arguments
666 `(#:make-flags
667 ;; Ensure that the initial heap size is smaller than the maximum
668 ;; size. By default only Xmx is set, which can lead to invalid
669 ;; memory settings on some machines with a lot of memory.
670 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
671 #:configure-flags
672 (list (string-append "--with-ecj-jar="
673 (assoc-ref %build-inputs "ecj-bootstrap")
674 "/share/java/ecj-bootstrap.jar")
675 (string-append "--with-javac="
676 (assoc-ref %build-inputs "ecj-javac-wrapper")
677 "/bin/javac")
678 (string-append "JAVA="
679 (assoc-ref %build-inputs "jamvm")
680 "/bin/jamvm")
681 "GCJ_JAVAC_TRUE=no"
682 "ac_cv_prog_java_works=yes" ; trust me
683 "--disable-Werror"
684 "--disable-gmp"
685 "--disable-gtk-peer"
686 "--disable-gconf-peer"
687 "--disable-plugin"
688 "--disable-dssi"
689 "--disable-alsa"
690 "--disable-gjdoc")
691 #:phases
692 (modify-phases %standard-phases
693 (add-after 'unpack 'bootstrap
694 (lambda _
695 (zero? (system* "autoreconf" "-vif"))))
696 (add-after 'unpack 'remove-unsupported-annotations
697 (lambda _
698 (substitute* (find-files "java" "\\.java$")
699 (("@Override") ""))
700 #t))
701 (add-after 'install 'install-data
702 (lambda _ (zero? (system* "make" "install-data")))))))
703 (native-inputs
704 `(("autoconf" ,autoconf)
705 ("automake" ,automake)
706 ("libtool" ,libtool)
707 ("gettext" ,gettext-minimal)
708 ("texinfo" ,texinfo)
709 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
710 ("ecj-bootstrap" ,ecj-bootstrap)
711 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
712 ("fastjar" ,fastjar)
713 ("jamvm" ,jamvm-bootstrap)
714 ("libltdl" ,libltdl)
715 ("pkg-config" ,pkg-config))))))
716
717 (define-public jamvm
718 (package (inherit jamvm-bootstrap)
719 (inputs
720 `(("classpath" ,classpath-devel)
721 ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
722 ("zlib" ,zlib)))))
723
724 (define ecj-javac-on-jamvm-wrapper-final
725 (package (inherit ecj-javac-on-jamvm-wrapper)
726 (native-inputs
727 `(("guile" ,guile-2.2)
728 ("ecj-bootstrap" ,ecj-bootstrap)
729 ("jamvm" ,jamvm)
730 ("classpath" ,classpath-devel)))))
731
732 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
733 ;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because
734 ;; it's written in Java 7. It can, however, build the unmaintained Icedtea
735 ;; 1.x, which uses Java 6 only.
736 (define-public icedtea-6
737 (package
738 (name "icedtea")
739 (version "1.13.13")
740 (source (origin
741 (method url-fetch)
742 (uri (string-append
743 "http://icedtea.wildebeest.org/download/source/icedtea6-"
744 version ".tar.xz"))
745 (sha256
746 (base32
747 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
748 (modules '((guix build utils)))
749 (snippet
750 '(substitute* "Makefile.in"
751 ;; do not leak information about the build host
752 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
753 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
754 (build-system gnu-build-system)
755 (outputs '("out" ; Java Runtime Environment
756 "jdk" ; Java Development Kit
757 "doc")) ; all documentation
758 (arguments
759 `(;; There are many failing tests and many are known to fail upstream.
760 #:tests? #f
761
762 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
763 ;; gremlin) doesn't support it yet, so skip this phase.
764 #:validate-runpath? #f
765
766 #:modules ((guix build utils)
767 (guix build gnu-build-system)
768 (srfi srfi-19))
769
770 #:configure-flags
771 `("--enable-bootstrap"
772 "--enable-nss"
773 "--without-rhino"
774 "--with-parallel-jobs"
775 "--disable-downloading"
776 "--disable-tests"
777 ,(string-append "--with-ecj="
778 (assoc-ref %build-inputs "ecj")
779 "/share/java/ecj-bootstrap.jar")
780 ,(string-append "--with-jar="
781 (assoc-ref %build-inputs "fastjar")
782 "/bin/fastjar")
783 ,(string-append "--with-jdk-home="
784 (assoc-ref %build-inputs "classpath"))
785 ,(string-append "--with-java="
786 (assoc-ref %build-inputs "jamvm")
787 "/bin/jamvm"))
788 #:phases
789 (modify-phases %standard-phases
790 (replace 'unpack
791 (lambda* (#:key source inputs #:allow-other-keys)
792 (and (zero? (system* "tar" "xvf" source))
793 (begin
794 (chdir (string-append "icedtea6-" ,version))
795 (mkdir "openjdk")
796 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
797 ;; The convenient OpenJDK source bundle is no longer
798 ;; available for download, so we have to take the sources
799 ;; from the Mercurial repositories and change the Makefile
800 ;; to avoid tests for the OpenJDK zip archive.
801 (with-directory-excursion "openjdk"
802 (for-each (lambda (part)
803 (mkdir part)
804 (copy-recursively
805 (assoc-ref inputs
806 (string-append part "-src"))
807 part))
808 '("jdk" "hotspot" "corba"
809 "langtools" "jaxp" "jaxws")))
810 (substitute* "Makefile.in"
811 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
812 "echo \"trust me\";")
813 ;; The contents of the bootstrap directory must be
814 ;; writeable but when copying from the store they are
815 ;; not.
816 (("mkdir -p lib/rt" line)
817 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
818 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
819 #t))))
820 (add-after 'unpack 'use-classpath
821 (lambda* (#:key inputs #:allow-other-keys)
822 (let ((jvmlib (assoc-ref inputs "classpath")))
823 ;; Classpath does not provide rt.jar.
824 (substitute* "Makefile.in"
825 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
826 (string-append jvmlib "/share/classpath/glibj.zip")))
827 ;; Make sure we can find all classes.
828 (setenv "CLASSPATH"
829 (string-append jvmlib "/share/classpath/glibj.zip:"
830 jvmlib "/share/classpath/tools.zip"))
831 (setenv "JAVACFLAGS"
832 (string-append "-cp "
833 jvmlib "/share/classpath/glibj.zip:"
834 jvmlib "/share/classpath/tools.zip")))
835 #t))
836 (add-after 'unpack 'patch-patches
837 (lambda _
838 ;; shebang in patches so that they apply cleanly
839 (substitute* '("patches/jtreg-jrunscript.patch"
840 "patches/hotspot/hs23/drop_unlicensed_test.patch")
841 (("#!/bin/sh") (string-append "#!" (which "sh"))))
842 #t))
843 (add-after 'unpack 'patch-paths
844 (lambda* (#:key inputs #:allow-other-keys)
845 ;; buildtree.make generates shell scripts, so we need to replace
846 ;; the generated shebang
847 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
848 (("/bin/sh") (which "bash")))
849
850 (let ((corebin (string-append
851 (assoc-ref inputs "coreutils") "/bin/"))
852 (binbin (string-append
853 (assoc-ref inputs "binutils") "/bin/"))
854 (grepbin (string-append
855 (assoc-ref inputs "grep") "/bin/")))
856 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
857 "openjdk/corba/make/common/shared/Defs-linux.gmk")
858 (("UNIXCOMMAND_PATH = /bin/")
859 (string-append "UNIXCOMMAND_PATH = " corebin))
860 (("USRBIN_PATH = /usr/bin/")
861 (string-append "USRBIN_PATH = " corebin))
862 (("DEVTOOLS_PATH *= */usr/bin/")
863 (string-append "DEVTOOLS_PATH = " corebin))
864 (("COMPILER_PATH *= */usr/bin/")
865 (string-append "COMPILER_PATH = "
866 (assoc-ref inputs "gcc") "/bin/"))
867 (("DEF_OBJCOPY *=.*objcopy")
868 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
869
870 ;; fix path to alsa header
871 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
872 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
873 (string-append "ALSA_INCLUDE="
874 (assoc-ref inputs "alsa-lib")
875 "/include/alsa/version.h")))
876
877 ;; fix hard-coded utility paths
878 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
879 "openjdk/corba/make/common/shared/Defs-utils.gmk")
880 (("ECHO *=.*echo")
881 (string-append "ECHO = " (which "echo")))
882 (("^GREP *=.*grep")
883 (string-append "GREP = " (which "grep")))
884 (("EGREP *=.*egrep")
885 (string-append "EGREP = " (which "egrep")))
886 (("CPIO *=.*cpio")
887 (string-append "CPIO = " (which "cpio")))
888 (("READELF *=.*readelf")
889 (string-append "READELF = " (which "readelf")))
890 (("^ *AR *=.*ar")
891 (string-append "AR = " (which "ar")))
892 (("^ *TAR *=.*tar")
893 (string-append "TAR = " (which "tar")))
894 (("AS *=.*as")
895 (string-append "AS = " (which "as")))
896 (("LD *=.*ld")
897 (string-append "LD = " (which "ld")))
898 (("STRIP *=.*strip")
899 (string-append "STRIP = " (which "strip")))
900 (("NM *=.*nm")
901 (string-append "NM = " (which "nm")))
902 (("^SH *=.*sh")
903 (string-append "SH = " (which "bash")))
904 (("^FIND *=.*find")
905 (string-append "FIND = " (which "find")))
906 (("LDD *=.*ldd")
907 (string-append "LDD = " (which "ldd")))
908 (("NAWK *=.*(n|g)awk")
909 (string-append "NAWK = " (which "gawk")))
910 (("XARGS *=.*xargs")
911 (string-append "XARGS = " (which "xargs")))
912 (("UNZIP *=.*unzip")
913 (string-append "UNZIP = " (which "unzip")))
914 (("ZIPEXE *=.*zip")
915 (string-append "ZIPEXE = " (which "zip")))
916 (("SED *=.*sed")
917 (string-append "SED = " (which "sed"))))
918
919 ;; Some of these timestamps cause problems as they are more than
920 ;; 10 years ago, failing the build process.
921 (substitute*
922 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
923 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
924 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
925 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
926 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
927 #t)))
928 (add-before 'configure 'set-additional-paths
929 (lambda* (#:key inputs #:allow-other-keys)
930 (setenv "CPATH"
931 (string-append (assoc-ref inputs "libxrender")
932 "/include/X11/extensions" ":"
933 (assoc-ref inputs "libxtst")
934 "/include/X11/extensions" ":"
935 (assoc-ref inputs "libxinerama")
936 "/include/X11/extensions" ":"
937 (or (getenv "CPATH") "")))
938 (setenv "ALT_CUPS_HEADERS_PATH"
939 (string-append (assoc-ref inputs "cups")
940 "/include"))
941 (setenv "ALT_FREETYPE_HEADERS_PATH"
942 (string-append (assoc-ref inputs "freetype")
943 "/include"))
944 (setenv "ALT_FREETYPE_LIB_PATH"
945 (string-append (assoc-ref inputs "freetype")
946 "/lib"))
947 #t))
948 (replace 'install
949 (lambda* (#:key outputs #:allow-other-keys)
950 (let ((doc (string-append (assoc-ref outputs "doc")
951 "/share/doc/icedtea"))
952 (jre (assoc-ref outputs "out"))
953 (jdk (assoc-ref outputs "jdk")))
954 (copy-recursively "openjdk.build/docs" doc)
955 (copy-recursively "openjdk.build/j2re-image" jre)
956 (copy-recursively "openjdk.build/j2sdk-image" jdk))
957 #t)))))
958 (native-inputs
959 `(("ant" ,ant-bootstrap)
960 ("alsa-lib" ,alsa-lib)
961 ("attr" ,attr)
962 ("classpath" ,classpath-devel)
963 ("coreutils" ,coreutils)
964 ("cpio" ,cpio)
965 ("cups" ,cups)
966 ("ecj" ,ecj-bootstrap)
967 ("ecj-javac" ,ecj-javac-on-jamvm-wrapper-final)
968 ("fastjar" ,fastjar)
969 ("fontconfig" ,fontconfig)
970 ("freetype" ,freetype)
971 ("gtk" ,gtk+-2)
972 ("gawk" ,gawk)
973 ("giflib" ,giflib)
974 ("grep" ,grep)
975 ("jamvm" ,jamvm)
976 ("lcms" ,lcms)
977 ("libjpeg" ,libjpeg)
978 ("libpng" ,libpng)
979 ("libtool" ,libtool)
980 ("libx11" ,libx11)
981 ("libxcomposite" ,libxcomposite)
982 ("libxi" ,libxi)
983 ("libxinerama" ,libxinerama)
984 ("libxrender" ,libxrender)
985 ("libxslt" ,libxslt) ;for xsltproc
986 ("libxt" ,libxt)
987 ("libxtst" ,libxtst)
988 ("mit-krb5" ,mit-krb5)
989 ("nss" ,nss)
990 ("nss-certs" ,nss-certs)
991 ("perl" ,perl)
992 ("pkg-config" ,pkg-config)
993 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
994 ("unzip" ,unzip)
995 ("wget" ,wget)
996 ("which" ,which)
997 ("zip" ,zip)
998 ("zlib" ,zlib)
999 ("openjdk-src"
1000 ,(origin
1001 (method hg-fetch)
1002 (uri (hg-reference
1003 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1004 (changeset "jdk6-b41")))
1005 (sha256
1006 (base32
1007 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1008 ("jdk-src"
1009 ,(origin
1010 (method hg-fetch)
1011 (uri (hg-reference
1012 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1013 (changeset "jdk6-b41")))
1014 (sha256
1015 (base32
1016 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1017 ("hotspot-src"
1018 ,(origin
1019 (method hg-fetch)
1020 (uri (hg-reference
1021 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1022 (changeset "jdk6-b41")))
1023 (sha256
1024 (base32
1025 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1026 ("corba-src"
1027 ,(origin
1028 (method hg-fetch)
1029 (uri (hg-reference
1030 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1031 (changeset "jdk6-b41")))
1032 (sha256
1033 (base32
1034 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1035 ("langtools-src"
1036 ,(origin
1037 (method hg-fetch)
1038 (uri (hg-reference
1039 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1040 (changeset "jdk6-b41")))
1041 (sha256
1042 (base32
1043 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1044 ("jaxp-src"
1045 ,(origin
1046 (method hg-fetch)
1047 (uri (hg-reference
1048 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1049 (changeset "jdk6-b41")))
1050 (sha256
1051 (base32
1052 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1053 ("jaxws-src"
1054 ,(origin
1055 (method hg-fetch)
1056 (uri (hg-reference
1057 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1058 (changeset "jdk6-b41")))
1059 (sha256
1060 (base32
1061 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1062 (home-page "http://icedtea.classpath.org")
1063 (synopsis "Java development kit")
1064 (description
1065 "This package provides the OpenJDK built with the IcedTea build harness.
1066 This version of the OpenJDK is no longer maintained and is only used for
1067 bootstrapping purposes.")
1068 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1069 ;; same license as both GNU Classpath and OpenJDK.
1070 (license license:gpl2+)))
1071
1072 (define-public icedtea-7
1073 (let* ((version "2.6.12")
1074 (drop (lambda (name hash)
1075 (origin
1076 (method url-fetch)
1077 (uri (string-append
1078 "http://icedtea.classpath.org/download/drops"
1079 "/icedtea7/" version "/" name ".tar.bz2"))
1080 (sha256 (base32 hash))))))
1081 (package
1082 (name "icedtea")
1083 (version version)
1084 (source (origin
1085 (method url-fetch)
1086 (uri (string-append
1087 "http://icedtea.wildebeest.org/download/source/icedtea-"
1088 version ".tar.xz"))
1089 (sha256
1090 (base32
1091 "0s0zh0mj1sab99kb516lsgq3859vsc951phc565gwix4l5g9zppk"))
1092 (modules '((guix build utils)))
1093 (snippet
1094 '(substitute* "Makefile.in"
1095 ;; do not leak information about the build host
1096 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1097 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
1098 (build-system gnu-build-system)
1099 (outputs '("out" ; Java Runtime Environment
1100 "jdk" ; Java Development Kit
1101 "doc")) ; all documentation
1102 (arguments
1103 `(;; There are many test failures. Some are known to
1104 ;; fail upstream, others relate to not having an X
1105 ;; server running at test time, yet others are a
1106 ;; complete mystery to me.
1107
1108 ;; hotspot: passed: 241; failed: 45; error: 2
1109 ;; langtools: passed: 1,934; failed: 26
1110 ;; jdk: unknown
1111 #:tests? #f
1112
1113 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1114 ;; gremlin) doesn't support it yet, so skip this phase.
1115 #:validate-runpath? #f
1116
1117 ;; Apparently, the C locale is needed for some of the tests.
1118 #:locale "C"
1119
1120 #:modules ((guix build utils)
1121 (guix build gnu-build-system)
1122 (ice-9 match)
1123 (ice-9 popen)
1124 (srfi srfi-19)
1125 (srfi srfi-26))
1126
1127 #:configure-flags
1128 ;; TODO: package pcsc and sctp, and add to inputs
1129 `("--disable-system-pcsc"
1130 "--disable-system-sctp"
1131 "--enable-bootstrap"
1132 "--enable-nss"
1133 "--without-rhino"
1134 "--disable-downloading"
1135 "--disable-tests" ;they are run in the check phase instead
1136 "--with-openjdk-src-dir=./openjdk.src"
1137 ,(string-append "--with-jdk-home="
1138 (assoc-ref %build-inputs "jdk")))
1139
1140 #:phases
1141 (modify-phases %standard-phases
1142 (replace 'unpack
1143 (lambda* (#:key source inputs #:allow-other-keys)
1144 (let ((target (string-append "icedtea-" ,version))
1145 (unpack (lambda* (name #:optional dir)
1146 (let ((dir (or dir
1147 (string-drop-right name 5))))
1148 (mkdir dir)
1149 (zero? (system* "tar" "xvf"
1150 (assoc-ref inputs name)
1151 "-C" dir
1152 "--strip-components=1"))))))
1153 (mkdir target)
1154 (and
1155 (zero? (system* "tar" "xvf" source
1156 "-C" target "--strip-components=1"))
1157 (chdir target)
1158 (unpack "openjdk-src" "openjdk.src")
1159 (with-directory-excursion "openjdk.src"
1160 (for-each unpack
1161 (filter (cut string-suffix? "-drop" <>)
1162 (map (match-lambda
1163 ((name . _) name))
1164 inputs))))
1165 #t))))
1166 (add-after 'unpack 'fix-x11-extension-include-path
1167 (lambda* (#:key inputs #:allow-other-keys)
1168 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1169 (((string-append "\\$\\(firstword \\$\\(wildcard "
1170 "\\$\\(OPENWIN_HOME\\)"
1171 "/include/X11/extensions\\).*$"))
1172 (string-append (assoc-ref inputs "libxrender")
1173 "/include/X11/extensions"
1174 " -I" (assoc-ref inputs "libxtst")
1175 "/include/X11/extensions"
1176 " -I" (assoc-ref inputs "libxinerama")
1177 "/include/X11/extensions"))
1178 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1179 #t))
1180 (add-after 'unpack 'patch-paths
1181 (lambda _
1182 ;; buildtree.make generates shell scripts, so we need to replace
1183 ;; the generated shebang
1184 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1185 (("/bin/sh") (which "bash")))
1186
1187 (let ((corebin (string-append
1188 (assoc-ref %build-inputs "coreutils") "/bin/"))
1189 (binbin (string-append
1190 (assoc-ref %build-inputs "binutils") "/bin/"))
1191 (grepbin (string-append
1192 (assoc-ref %build-inputs "grep") "/bin/")))
1193 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1194 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1195 (("UNIXCOMMAND_PATH = /bin/")
1196 (string-append "UNIXCOMMAND_PATH = " corebin))
1197 (("USRBIN_PATH = /usr/bin/")
1198 (string-append "USRBIN_PATH = " corebin))
1199 (("DEVTOOLS_PATH *= */usr/bin/")
1200 (string-append "DEVTOOLS_PATH = " corebin))
1201 (("COMPILER_PATH *= */usr/bin/")
1202 (string-append "COMPILER_PATH = "
1203 (assoc-ref %build-inputs "gcc") "/bin/"))
1204 (("DEF_OBJCOPY *=.*objcopy")
1205 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1206
1207 ;; fix path to alsa header
1208 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1209 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1210 (string-append "ALSA_INCLUDE="
1211 (assoc-ref %build-inputs "alsa-lib")
1212 "/include/alsa/version.h")))
1213
1214 ;; fix hard-coded utility paths
1215 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1216 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1217 (("ECHO *=.*echo")
1218 (string-append "ECHO = " (which "echo")))
1219 (("^GREP *=.*grep")
1220 (string-append "GREP = " (which "grep")))
1221 (("EGREP *=.*egrep")
1222 (string-append "EGREP = " (which "egrep")))
1223 (("CPIO *=.*cpio")
1224 (string-append "CPIO = " (which "cpio")))
1225 (("READELF *=.*readelf")
1226 (string-append "READELF = " (which "readelf")))
1227 (("^ *AR *=.*ar")
1228 (string-append "AR = " (which "ar")))
1229 (("^ *TAR *=.*tar")
1230 (string-append "TAR = " (which "tar")))
1231 (("AS *=.*as")
1232 (string-append "AS = " (which "as")))
1233 (("LD *=.*ld")
1234 (string-append "LD = " (which "ld")))
1235 (("STRIP *=.*strip")
1236 (string-append "STRIP = " (which "strip")))
1237 (("NM *=.*nm")
1238 (string-append "NM = " (which "nm")))
1239 (("^SH *=.*sh")
1240 (string-append "SH = " (which "bash")))
1241 (("^FIND *=.*find")
1242 (string-append "FIND = " (which "find")))
1243 (("LDD *=.*ldd")
1244 (string-append "LDD = " (which "ldd")))
1245 (("NAWK *=.*(n|g)awk")
1246 (string-append "NAWK = " (which "gawk")))
1247 (("XARGS *=.*xargs")
1248 (string-append "XARGS = " (which "xargs")))
1249 (("UNZIP *=.*unzip")
1250 (string-append "UNZIP = " (which "unzip")))
1251 (("ZIPEXE *=.*zip")
1252 (string-append "ZIPEXE = " (which "zip")))
1253 (("SED *=.*sed")
1254 (string-append "SED = " (which "sed"))))
1255
1256 ;; Some of these timestamps cause problems as they are more than
1257 ;; 10 years ago, failing the build process.
1258 (substitute*
1259 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1260 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1261 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1262 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1263 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1264 #t))
1265 (add-before 'configure 'set-additional-paths
1266 (lambda* (#:key inputs #:allow-other-keys)
1267 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1268 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1269 (string-append "ALSA_INCLUDE="
1270 (assoc-ref inputs "alsa-lib")
1271 "/include/alsa/version.h")))
1272 (setenv "CC" "gcc")
1273 (setenv "CPATH"
1274 (string-append (assoc-ref inputs "libxcomposite")
1275 "/include/X11/extensions" ":"
1276 (assoc-ref inputs "libxrender")
1277 "/include/X11/extensions" ":"
1278 (assoc-ref inputs "libxtst")
1279 "/include/X11/extensions" ":"
1280 (assoc-ref inputs "libxinerama")
1281 "/include/X11/extensions" ":"
1282 (or (getenv "CPATH") "")))
1283 (setenv "ALT_OBJCOPY" (which "objcopy"))
1284 (setenv "ALT_CUPS_HEADERS_PATH"
1285 (string-append (assoc-ref inputs "cups")
1286 "/include"))
1287 (setenv "ALT_FREETYPE_HEADERS_PATH"
1288 (string-append (assoc-ref inputs "freetype")
1289 "/include"))
1290 (setenv "ALT_FREETYPE_LIB_PATH"
1291 (string-append (assoc-ref inputs "freetype")
1292 "/lib"))
1293 #t))
1294 (add-before 'check 'fix-test-framework
1295 (lambda _
1296 ;; Fix PATH in test environment
1297 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1298 (("PATH=/bin:/usr/bin")
1299 (string-append "PATH=" (getenv "PATH"))))
1300 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1301 (("/usr/bin/env") (which "env")))
1302 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1303 (("/bin/rm") (which "rm"))
1304 (("/bin/cp") (which "cp"))
1305 (("/bin/mv") (which "mv")))
1306 #t))
1307 (add-before 'check 'fix-hotspot-tests
1308 (lambda _
1309 (with-directory-excursion "openjdk.src/hotspot/test/"
1310 (substitute* "jprt.config"
1311 (("PATH=\"\\$\\{path4sdk\\}\"")
1312 (string-append "PATH=" (getenv "PATH")))
1313 (("make=/usr/bin/make")
1314 (string-append "make=" (which "make"))))
1315 (substitute* '("runtime/6626217/Test6626217.sh"
1316 "runtime/7110720/Test7110720.sh")
1317 (("/bin/rm") (which "rm"))
1318 (("/bin/cp") (which "cp"))
1319 (("/bin/mv") (which "mv"))))
1320 #t))
1321 (add-before 'check 'fix-jdk-tests
1322 (lambda _
1323 (with-directory-excursion "openjdk.src/jdk/test/"
1324 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1325 (("/bin/pwd") (which "pwd")))
1326 (substitute* "com/sun/jdi/ShellScaffold.sh"
1327 (("/bin/kill") (which "kill")))
1328 (substitute* "start-Xvfb.sh"
1329 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1330 (("/usr/bin/nohup") (which "nohup")))
1331 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1332 (("/bin/rm") (which "rm")))
1333 (substitute* "tools/launcher/MultipleJRE.sh"
1334 (("echo \"#!/bin/sh\"")
1335 (string-append "echo \"#!" (which "rm") "\""))
1336 (("/usr/bin/zip") (which "zip")))
1337 (substitute* "com/sun/jdi/OnThrowTest.java"
1338 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1339 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1340 (("/usr/bin/uptime") (which "uptime")))
1341 (substitute* "java/lang/ProcessBuilder/Basic.java"
1342 (("/usr/bin/env") (which "env"))
1343 (("/bin/false") (which "false"))
1344 (("/bin/true") (which "true"))
1345 (("/bin/cp") (which "cp"))
1346 (("/bin/sh") (which "sh")))
1347 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1348 (("/bin/sh") (which "sh")))
1349 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1350 (("/usr/bin/perl") (which "perl"))
1351 (("/bin/ps") (which "ps"))
1352 (("/bin/true") (which "true")))
1353 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1354 (("/usr/bin/tee") (which "tee")))
1355 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1356 (("/bin/true") (which "true")))
1357 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1358 (("/bin/cat") (which "cat")))
1359 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1360 (("/bin/sh") (which "sh"))
1361 (("/bin/true") (which "true"))
1362 (("/bin/kill") (which "kill")))
1363 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1364 (("/usr/bin/echo") (which "echo")))
1365 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1366 (("/usr/bin/cat") (which "cat")))
1367 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1368 (("/bin/cat") (which "cat"))
1369 (("/bin/sleep") (which "sleep"))
1370 (("/bin/sh") (which "sh")))
1371 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1372 (("/bin/cat") (which "cat")))
1373 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1374 (("/bin/chmod") (which "chmod")))
1375 (substitute* "java/util/zip/ZipFile/Assortment.java"
1376 (("/bin/sh") (which "sh"))))
1377 #t))
1378 (replace 'check
1379 (lambda _
1380 ;; The "make check-*" targets always return zero, so we need to
1381 ;; check for errors in the associated log files to determine
1382 ;; whether any tests have failed.
1383 (use-modules (ice-9 rdelim))
1384 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1385 (checker (lambda (port)
1386 (let loop ()
1387 (let ((line (read-line port)))
1388 (cond
1389 ((eof-object? line) #t)
1390 ((regexp-exec error-pattern line) #f)
1391 (else (loop)))))))
1392 (run-test (lambda (test)
1393 (system* "make" test)
1394 (call-with-input-file
1395 (string-append "test/" test ".log")
1396 checker))))
1397 (or #t ; skip tests
1398 (and (run-test "check-hotspot")
1399 (run-test "check-langtools")
1400 (run-test "check-jdk"))))))
1401 (replace 'install
1402 (lambda* (#:key outputs #:allow-other-keys)
1403 (let ((doc (string-append (assoc-ref outputs "doc")
1404 "/share/doc/icedtea"))
1405 (jre (assoc-ref outputs "out"))
1406 (jdk (assoc-ref outputs "jdk")))
1407 (copy-recursively "openjdk.build/docs" doc)
1408 (copy-recursively "openjdk.build/j2re-image" jre)
1409 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1410 #t))
1411 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1412 ;; But that shared object is located in the server/ folder, so it
1413 ;; cannot be found. This phase creates a symbolic link in the
1414 ;; lib/amd64 folder so that the other libraries can find it.
1415 ;;
1416 ;; See:
1417 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1418 ;;
1419 ;; FIXME: Find the bug in the build system, so that this symlink is
1420 ;; not needed.
1421 (add-after 'install 'install-libjvm
1422 (lambda* (#:key inputs outputs #:allow-other-keys)
1423 (let* ((lib-path (string-append (assoc-ref outputs "out")
1424 "/lib/amd64")))
1425 (symlink (string-append lib-path "/server/libjvm.so")
1426 (string-append lib-path "/libjvm.so")))
1427 #t))
1428 ;; By default IcedTea only generates an empty keystore. In order to
1429 ;; be able to use certificates in Java programs we need to generate a
1430 ;; keystore from a set of certificates. For convenience we use the
1431 ;; certificates from the nss-certs package.
1432 (add-after 'install 'install-keystore
1433 (lambda* (#:key inputs outputs #:allow-other-keys)
1434 (let* ((keystore "cacerts")
1435 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1436 "/etc/ssl/certs"))
1437 (keytool (string-append (assoc-ref outputs "jdk")
1438 "/bin/keytool")))
1439 (define (extract-cert file target)
1440 (call-with-input-file file
1441 (lambda (in)
1442 (call-with-output-file target
1443 (lambda (out)
1444 (let loop ((line (read-line in 'concat))
1445 (copying? #f))
1446 (cond
1447 ((eof-object? line) #t)
1448 ((string-prefix? "-----BEGIN" line)
1449 (display line out)
1450 (loop (read-line in 'concat) #t))
1451 ((string-prefix? "-----END" line)
1452 (display line out)
1453 #t)
1454 (else
1455 (when copying? (display line out))
1456 (loop (read-line in 'concat) copying?)))))))))
1457 (define (import-cert cert)
1458 (format #t "Importing certificate ~a\n" (basename cert))
1459 (let ((temp "tmpcert"))
1460 (extract-cert cert temp)
1461 (let ((port (open-pipe* OPEN_WRITE keytool
1462 "-import"
1463 "-alias" (basename cert)
1464 "-keystore" keystore
1465 "-storepass" "changeit"
1466 "-file" temp)))
1467 (display "yes\n" port)
1468 (when (not (zero? (status:exit-val (close-pipe port))))
1469 (format #t "failed to import ~a\n" cert)))
1470 (delete-file temp)))
1471
1472 ;; This is necessary because the certificate directory contains
1473 ;; files with non-ASCII characters in their names.
1474 (setlocale LC_ALL "en_US.utf8")
1475 (setenv "LC_ALL" "en_US.utf8")
1476
1477 (for-each import-cert (find-files certs-dir "\\.pem$"))
1478 (mkdir-p (string-append (assoc-ref outputs "out")
1479 "/lib/security"))
1480 (mkdir-p (string-append (assoc-ref outputs "jdk")
1481 "/jre/lib/security"))
1482
1483 ;; The cacerts files we are going to overwrite are chmod'ed as
1484 ;; read-only (444) in icedtea-8 (which derives from this
1485 ;; package). We have to change this so we can overwrite them.
1486 (chmod (string-append (assoc-ref outputs "out")
1487 "/lib/security/" keystore) #o644)
1488 (chmod (string-append (assoc-ref outputs "jdk")
1489 "/jre/lib/security/" keystore) #o644)
1490
1491 (install-file keystore
1492 (string-append (assoc-ref outputs "out")
1493 "/lib/security"))
1494 (install-file keystore
1495 (string-append (assoc-ref outputs "jdk")
1496 "/jre/lib/security"))
1497 #t))))))
1498 (native-inputs
1499 `(("openjdk-src"
1500 ,(drop "openjdk"
1501 "15qf3nfidgnigh2zny6djfp8bhfwjnwk9i06mxs2jbq6na953ql2"))
1502 ("corba-drop"
1503 ,(drop "corba"
1504 "1phvn8fyl5mw2n2sn97f17nm442k75xsz2023bfw4h66ywzkqhqy"))
1505 ("jaxp-drop"
1506 ,(drop "jaxp"
1507 "0j4ms6lmnfa2cwfh9yfqdfg1bnn3fc40ay4x6k8zqa8yvspik5w5"))
1508 ("jaxws-drop"
1509 ,(drop "jaxws"
1510 "09sddj73k7n29s39hvdk14r130mvlknbxkpd2w58f34sq5sgpdrg"))
1511 ("jdk-drop"
1512 ,(drop "jdk"
1513 "0q896zz8wyswmksy225q1k27nz3v3l27052dcvvpv20ryykz8yp7"))
1514 ("langtools-drop"
1515 ,(drop "langtools"
1516 "0niicyfccim4a9is4akh87jd7wbl8jrazdaab957mcv9l1x3bnqc"))
1517 ("hotspot-drop"
1518 ,(drop "hotspot"
1519 "1jw42qhbm3wfavk39304m53lmqipcllrvjqiab2f42mjs10i8gfx"))
1520 ("ant" ,ant-bootstrap)
1521 ("attr" ,attr)
1522 ("coreutils" ,coreutils)
1523 ("diffutils" ,diffutils) ;for tests
1524 ("gawk" ,gawk)
1525 ("grep" ,grep)
1526 ("libtool" ,libtool)
1527 ("pkg-config" ,pkg-config)
1528 ("wget" ,wget)
1529 ("which" ,which)
1530 ("cpio" ,cpio)
1531 ("zip" ,zip)
1532 ("unzip" ,unzip)
1533 ("fastjar" ,fastjar)
1534 ("libxslt" ,libxslt) ;for xsltproc
1535 ("nss-certs" ,nss-certs)
1536 ("perl" ,perl)
1537 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1538 ("jdk" ,icedtea-6 "jdk")))
1539 (inputs
1540 `(("alsa-lib" ,alsa-lib)
1541 ("cups" ,cups)
1542 ("libx11" ,libx11)
1543 ("libxcomposite" ,libxcomposite)
1544 ("libxt" ,libxt)
1545 ("libxtst" ,libxtst)
1546 ("libxi" ,libxi)
1547 ("libxinerama" ,libxinerama)
1548 ("libxrender" ,libxrender)
1549 ("libjpeg" ,libjpeg)
1550 ("libpng" ,libpng)
1551 ("mit-krb5" ,mit-krb5)
1552 ("nss" ,nss)
1553 ("giflib" ,giflib)
1554 ("fontconfig" ,fontconfig)
1555 ("freetype" ,freetype)
1556 ("lcms" ,lcms)
1557 ("zlib" ,zlib)
1558 ("gtk" ,gtk+-2)))
1559 (home-page "http://icedtea.classpath.org")
1560 (synopsis "Java development kit")
1561 (description
1562 "This package provides the Java development kit OpenJDK built with the
1563 IcedTea build harness.")
1564 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1565 ;; same license as both GNU Classpath and OpenJDK.
1566 (license license:gpl2+))))
1567
1568 (define-public icedtea-8
1569 (let* ((version "3.6.0")
1570 (drop (lambda (name hash)
1571 (origin
1572 (method url-fetch)
1573 (uri (string-append
1574 "http://icedtea.classpath.org/download/drops"
1575 "/icedtea8/" version "/" name ".tar.xz"))
1576 (sha256 (base32 hash))))))
1577 (package (inherit icedtea-7)
1578 (version "3.6.0")
1579 (source (origin
1580 (method url-fetch)
1581 (uri (string-append
1582 "http://icedtea.wildebeest.org/download/source/icedtea-"
1583 version ".tar.xz"))
1584 (sha256
1585 (base32
1586 "0zj192zrrxqh6j1ywc3399gk2ycay9w8pvzcvvr2kvdkb37ak86h"))
1587 (modules '((guix build utils)))
1588 (snippet
1589 '(begin
1590 (substitute* "acinclude.m4"
1591 ;; Do not embed build time
1592 (("(DIST_ID=\"Custom build).*$" _ prefix)
1593 (string-append prefix "\"\n"))
1594 ;; Do not leak information about the build host
1595 (("DIST_NAME=\"\\$build_os\"")
1596 "DIST_NAME=\"guix\""))
1597 #t))))
1598 (arguments
1599 (substitute-keyword-arguments (package-arguments icedtea-7)
1600 ((#:configure-flags flags)
1601 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1602 `(;;"--disable-bootstrap"
1603 "--enable-bootstrap"
1604 "--enable-nss"
1605 "--disable-downloading"
1606 "--disable-system-pcsc"
1607 "--disable-system-sctp"
1608 "--disable-tests" ;they are run in the check phase instead
1609 "--with-openjdk-src-dir=./openjdk.src"
1610 ,(string-append "--with-jdk-home=" jdk))))
1611 ((#:phases phases)
1612 `(modify-phases ,phases
1613 (delete 'fix-x11-extension-include-path)
1614 (delete 'patch-paths)
1615 (delete 'set-additional-paths)
1616 (delete 'patch-patches)
1617 (add-after 'unpack 'patch-jni-libs
1618 ;; Hardcode dynamically loaded libraries.
1619 (lambda _
1620 (let* ((library-path (search-path-as-string->list
1621 (getenv "LIBRARY_PATH")))
1622 (find-library (lambda (name)
1623 (search-path
1624 library-path
1625 (string-append "lib" name ".so")))))
1626 (for-each
1627 (lambda (file)
1628 (catch 'decoding-error
1629 (lambda ()
1630 (substitute* file
1631 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1632 _ name version)
1633 (format #f "\"~a\"" (find-library name)))
1634 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1635 (format #f "\"~a\"" (find-library name)))))
1636 (lambda _
1637 ;; Those are safe to skip.
1638 (format (current-error-port)
1639 "warning: failed to substitute: ~a~%"
1640 file))))
1641 (find-files "openjdk.src/jdk/src/solaris/native"
1642 "\\.c|\\.h"))
1643 #t)))
1644 (replace 'install
1645 (lambda* (#:key outputs #:allow-other-keys)
1646 (let ((doc (string-append (assoc-ref outputs "doc")
1647 "/share/doc/icedtea"))
1648 (jre (assoc-ref outputs "out"))
1649 (jdk (assoc-ref outputs "jdk")))
1650 (copy-recursively "openjdk.build/docs" doc)
1651 (copy-recursively "openjdk.build/images/j2re-image" jre)
1652 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1653 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1654 ;; support via NSS.
1655 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1656 (string-append jre "/lib/security/nss.cfg"))
1657 #t)))))))
1658 (native-inputs
1659 `(("jdk" ,icedtea-7 "jdk")
1660 ("openjdk-src"
1661 ,(drop "openjdk"
1662 "0mqxh81kq05z4wydkik0yrr81ibf84xmwsdcw9n2gfrzs4f5jxnb"))
1663 ("aarch32-drop"
1664 ,(drop "aarch32"
1665 "0b207g2n6kn510zf5vwh58bsxgqrmkvrna4p20r74v9cwcwx83n2"))
1666 ("corba-drop"
1667 ,(drop "corba"
1668 "0qinc1q4w01nkr9klhfyd8caxvyrrfxjrz32nd7kgyja2bj8x7dd"))
1669 ("jaxp-drop"
1670 ,(drop "jaxp"
1671 "07azrp3g86vk2laybmr5xfn0yrljkxs0rlm1q48385br225bgdxi"))
1672 ("jaxws-drop"
1673 ,(drop "jaxws"
1674 "018fd2hq57zp3pq06wlxy5pabqcyk36xi8hk0d6xk3a90wsjvyik"))
1675 ("jdk-drop"
1676 ,(drop "jdk"
1677 "0vs488kq5j2cc6kplc78jbhfxwq4fn06l34xrbq4d6y17777arg8"))
1678 ("langtools-drop"
1679 ,(drop "langtools"
1680 "04f6d1wvck5jrpvrcw5gsbzxnihcry9zrf1v85czdm959q21zv9c"))
1681 ("hotspot-drop"
1682 ,(drop "hotspot"
1683 "1mfgpzyr6zzy9klf8nn3z6d41fydb9ghpfpqzjq3cl95axfbdl1g"))
1684 ("nashorn-drop"
1685 ,(drop "nashorn"
1686 "1a26cmzbs50gkh4rmmmxls7zljx62vfp1wq02gsfd5jqs4xvlibj"))
1687 ("shenandoah-drop"
1688 ,(drop "shenandoah"
1689 "11hmn9mwmvryfddcanzx3qffjm8bbiv18nwv3iy9cswrvxjy010f"))
1690 ,@(fold alist-delete (package-native-inputs icedtea-7)
1691 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1692 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1693
1694 (define-public icedtea icedtea-7)
1695
1696 \f
1697 (define-public ant/java8
1698 (package (inherit ant-bootstrap)
1699 (name "ant")
1700 (version "1.10.1")
1701 (source (origin
1702 (method url-fetch)
1703 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1704 version "-src.tar.gz"))
1705 (sha256
1706 (base32
1707 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1708 (modules '((guix build utils)))
1709 (snippet
1710 '(begin
1711 (for-each delete-file
1712 (find-files "lib/optional" "\\.jar$"))
1713 #t))))
1714 (arguments
1715 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1716 ((#:phases phases)
1717 `(modify-phases ,phases
1718 (add-after 'unpack 'remove-scripts
1719 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1720 ;; wrappers.
1721 (lambda _
1722 (for-each delete-file
1723 (find-files "src/script"
1724 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1725 #t))
1726 (replace 'build
1727 (lambda* (#:key inputs outputs #:allow-other-keys)
1728 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1729
1730 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1731 ;; Ant to build. This is necessary in addition to disabling the
1732 ;; "check" phase, because the dependency on "test-jar" would always
1733 ;; result in the tests to be run.
1734 (substitute* "build.xml"
1735 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1736 (zero? (system* "bash" "bootstrap.sh"
1737 (string-append "-Ddist.dir="
1738 (assoc-ref outputs "out"))))))))))
1739 (native-inputs
1740 `(("jdk" ,icedtea-8 "jdk")))))
1741
1742 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1743 ;; requires Java 8.
1744 (define-public ant
1745 (package (inherit ant/java8)
1746 (version "1.9.9")
1747 (source (origin
1748 (method url-fetch)
1749 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1750 version "-src.tar.gz"))
1751 (sha256
1752 (base32
1753 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1754 (native-inputs
1755 `(("jdk" ,icedtea-7 "jdk")))))
1756
1757 (define-public ant-apache-bcel
1758 (package
1759 (inherit ant/java8)
1760 (name "ant-apache-bcel")
1761 (arguments
1762 (substitute-keyword-arguments (package-arguments ant/java8)
1763 ((#:phases phases)
1764 `(modify-phases ,phases
1765 (add-after 'unpack 'link-bcel
1766 (lambda* (#:key inputs #:allow-other-keys)
1767 (for-each (lambda (file)
1768 (symlink file
1769 (string-append "lib/optional/"
1770 (basename file))))
1771 (find-files (assoc-ref inputs "java-commons-bcel")
1772 "\\.jar$"))
1773 #t))
1774 (add-after 'build 'install
1775 (lambda* (#:key outputs #:allow-other-keys)
1776 (let* ((out (assoc-ref outputs "out"))
1777 (share (string-append out "/share/java"))
1778 (bin (string-append out "/bin"))
1779 (lib (string-append out "/lib")))
1780 (mkdir-p share)
1781 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1782 (delete-file-recursively bin)
1783 (delete-file-recursively lib)
1784 #t)))))))
1785 (inputs
1786 `(("java-commons-bcel" ,java-commons-bcel)
1787 ,@(package-inputs ant/java8)))))
1788
1789 (define-public ant-junit
1790 (package
1791 (inherit ant/java8)
1792 (name "ant-junit")
1793 (arguments
1794 (substitute-keyword-arguments (package-arguments ant/java8)
1795 ((#:phases phases)
1796 `(modify-phases ,phases
1797 (add-after 'unpack 'link-junit
1798 (lambda* (#:key inputs #:allow-other-keys)
1799 (for-each (lambda (file)
1800 (symlink file
1801 (string-append "lib/optional/"
1802 (basename file))))
1803 (find-files (assoc-ref inputs "java-junit")
1804 "\\.jar$"))
1805 #t))
1806 (add-after 'build 'install
1807 (lambda* (#:key outputs #:allow-other-keys)
1808 (let* ((out (assoc-ref outputs "out"))
1809 (share (string-append out "/share/java"))
1810 (bin (string-append out "/bin"))
1811 (lib (string-append out "/lib")))
1812 (mkdir-p share)
1813 (install-file (string-append lib "/ant-junit.jar") share)
1814 (delete-file-recursively bin)
1815 (delete-file-recursively lib)
1816 #t)))))))
1817 (inputs
1818 `(("java-junit" ,java-junit)
1819 ,@(package-inputs ant/java8)))))
1820
1821 (define-public clojure
1822 (let* ((remove-archives '(begin
1823 (for-each delete-file
1824 (find-files "." ".*\\.(jar|zip)"))
1825 #t))
1826 (submodule (lambda (prefix version hash)
1827 (origin
1828 (method url-fetch)
1829 (uri (string-append "https://github.com/clojure/"
1830 prefix version ".tar.gz"))
1831 (sha256 (base32 hash))
1832 (modules '((guix build utils)))
1833 (snippet remove-archives)))))
1834 (package
1835 (name "clojure")
1836 (version "1.9.0")
1837 (source
1838 (origin
1839 (method url-fetch)
1840 (uri
1841 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1842 version ".tar.gz"))
1843 (sha256
1844 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1845 (modules '((guix build utils)))
1846 (snippet remove-archives)))
1847 (build-system ant-build-system)
1848 (arguments
1849 `(#:modules ((guix build ant-build-system)
1850 (guix build utils)
1851 (ice-9 ftw)
1852 (ice-9 regex)
1853 (srfi srfi-1)
1854 (srfi srfi-26))
1855 #:test-target "test"
1856 #:phases
1857 (modify-phases %standard-phases
1858 (add-after 'unpack 'unpack-submodule-sources
1859 (lambda* (#:key inputs #:allow-other-keys)
1860 (for-each
1861 (lambda (name)
1862 (mkdir-p name)
1863 (with-directory-excursion name
1864 (or (zero? (system* "tar"
1865 ;; Use xz for repacked tarball.
1866 "--xz"
1867 "--extract"
1868 "--verbose"
1869 "--file" (assoc-ref inputs name)
1870 "--strip-components=1"))
1871 (error "failed to unpack tarball" name)))
1872 (copy-recursively (string-append name "/src/main/clojure/")
1873 "src/clj/"))
1874 '("core-specs-alpha-src"
1875 "data-generators-src"
1876 "spec-alpha-src"
1877 "test-check-src"
1878 "test-generative-src"
1879 "tools-namespace-src"))
1880 #t))
1881 ;; The javadoc target is not built by default.
1882 (add-after 'build 'build-doc
1883 (lambda _
1884 (zero? (system* "ant" "javadoc"))))
1885 ;; Needed since no install target is provided.
1886 (replace 'install
1887 (lambda* (#:key outputs #:allow-other-keys)
1888 (let ((java-dir (string-append (assoc-ref outputs "out")
1889 "/share/java/")))
1890 ;; Install versioned to avoid collisions.
1891 (install-file (string-append "clojure-" ,version ".jar")
1892 java-dir)
1893 #t)))
1894 ;; Needed since no install-doc target is provided.
1895 (add-after 'install 'install-doc
1896 (lambda* (#:key outputs #:allow-other-keys)
1897 (let ((doc-dir (string-append (assoc-ref outputs "out")
1898 "/share/doc/clojure-"
1899 ,version "/")))
1900 (copy-recursively "doc/clojure" doc-dir)
1901 (copy-recursively "target/javadoc/"
1902 (string-append doc-dir "javadoc/"))
1903 (for-each (cut install-file <> doc-dir)
1904 (filter (cut string-match
1905 ".*\\.(html|markdown|md|txt)"
1906 <>)
1907 (scandir "./")))
1908 #t))))))
1909 ;; The native-inputs below are needed to run the tests.
1910 (native-inputs
1911 `(("core-specs-alpha-src"
1912 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1913 "0.1.24"
1914 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1915 ("data-generators-src"
1916 ,(submodule "data.generators/archive/data.generators-"
1917 "0.1.2"
1918 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1919 ("spec-alpha-src"
1920 ,(submodule "spec.alpha/archive/spec.alpha-"
1921 "0.1.143"
1922 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1923 ("test-check-src"
1924 ,(submodule "test.check/archive/test.check-"
1925 "0.9.0"
1926 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1927 ("test-generative-src"
1928 ,(submodule "test.generative/archive/test.generative-"
1929 "0.5.2"
1930 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1931 ("tools-namespace-src"
1932 ,(submodule "tools.namespace/archive/tools.namespace-"
1933 "0.2.11"
1934 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1935 (home-page "https://clojure.org/")
1936 (synopsis "Lisp dialect running on the JVM")
1937 (description "Clojure is a dynamic, general-purpose programming language,
1938 combining the approachability and interactive development of a scripting
1939 language with an efficient and robust infrastructure for multithreaded
1940 programming. Clojure is a compiled language, yet remains completely dynamic
1941 – every feature supported by Clojure is supported at runtime. Clojure
1942 provides easy access to the Java frameworks, with optional type hints and type
1943 inference, to ensure that calls to Java can avoid reflection.
1944
1945 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1946 and a powerful macro system. Clojure is predominantly a functional programming
1947 language, and features a rich set of immutable, persistent data structures.
1948 When mutable state is needed, Clojure offers a software transactional memory
1949 system and reactive Agent system that ensure clean, correct, multithreaded
1950 designs.")
1951 ;; Clojure is licensed under EPL1.0
1952 ;; ASM bytecode manipulation library is licensed under BSD-3
1953 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1954 ;; src/clj/repl.clj is licensed under CPL1.0
1955 ;;
1956 ;; See readme.html or readme.txt for details.
1957 (license (list license:epl1.0
1958 license:bsd-3
1959 license:asl2.0
1960 license:cpl1.0)))))
1961
1962 (define-public javacc
1963 (package
1964 (name "javacc")
1965 (version "7.0.3")
1966 (source (origin
1967 (method url-fetch)
1968 (uri (string-append "https://github.com/javacc/javacc/"
1969 "archive/" version ".tar.gz"))
1970 (file-name (string-append "javacc-" version ".tar.gz"))
1971 (sha256
1972 (base32
1973 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1974 (build-system ant-build-system)
1975 (arguments
1976 `(#:test-target "test"
1977 #:phases
1978 (modify-phases %standard-phases
1979 (add-after 'unpack 'delete-bundled-libs
1980 (lambda _
1981 (delete-file-recursively "lib") #t))
1982 (replace 'install (install-jars "target")))))
1983 (home-page "https://javacc.org/")
1984 (synopsis "Java parser generator")
1985 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1986 generator for use with Java applications. A parser generator is a tool that
1987 reads a grammar specification and converts it to a Java program that can
1988 recognize matches to the grammar. In addition to the parser generator itself,
1989 JavaCC provides other standard capabilities related to parser generation such
1990 as tree building (via a tool called JJTree included with JavaCC), actions,
1991 debugging, etc.")
1992 (license license:bsd-3)))
1993
1994 (define-public javacc-4
1995 (package (inherit javacc)
1996 (version "4.1")
1997 (source (origin
1998 (method git-fetch)
1999 (uri (git-reference
2000 (url "https://github.com/javacc/javacc.git")
2001 (commit "release_41")))
2002 (file-name (string-append "javacc-" version "-checkout"))
2003 (sha256
2004 (base32
2005 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
2006 ;; Tests fail with
2007 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2008 ;; JAVACODE failed
2009 (arguments
2010 `(#:tests? #f
2011 #:phases
2012 (modify-phases %standard-phases
2013 (add-after 'unpack 'delete-bundled-libs
2014 (lambda _
2015 (delete-file-recursively "lib") #t))
2016 (replace 'install (install-jars "bin/lib")))))))
2017
2018 (define-public java-classpathx-servletapi
2019 (package
2020 (name "java-classpathx-servletapi")
2021 (version "3.0")
2022 (source (origin
2023 (method url-fetch)
2024 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2025 "servletapi-" version ".tar.gz"))
2026 (sha256
2027 (base32
2028 "0y9489pk4as9q6x300sk3ycc0psqfxcd4b0xvbmf3rhgli8q1kx3"))))
2029 (build-system ant-build-system)
2030 (arguments
2031 `(#:tests? #f ; there is no test target
2032 #:build-target "compile"
2033 ;; NOTE: This package does not build with Java 8 because of a type
2034 ;; mismatch in
2035 ;; "source/javax/servlet/jsp/el/ImplicitObjectELResolver.java". It
2036 ;; defines the return value of ScopeMap's "remove" method to be of type
2037 ;; "Object", whereas Map's "remove" method returns boolean.
2038 #:make-flags
2039 (list "-Dbuild.compiler=javac1.7"
2040 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2041 #:phases
2042 (modify-phases %standard-phases
2043 (replace 'install
2044 (lambda* (#:key make-flags #:allow-other-keys)
2045 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2046 (home-page "https://www.gnu.org/software/classpathx/")
2047 (synopsis "Java servlet API implementation")
2048 (description "This is the GNU servlet API distribution, part of the
2049 ClasspathX project. It provides implementations of version 3.0 of the servlet
2050 API and version 2.1 of the Java ServerPages API.")
2051 (license license:gpl3+)))
2052
2053 (define-public java-swt
2054 (package
2055 (name "java-swt")
2056 (version "4.7.1a")
2057 (source
2058 ;; The types of many variables and procedures differ in the sources
2059 ;; dependent on whether the target architecture is a 32-bit system or a
2060 ;; 64-bit system. Instead of patching the sources on demand in a build
2061 ;; phase we download either the 32-bit archive (which mostly uses "int"
2062 ;; types) or the 64-bit archive (which mostly uses "long" types).
2063 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2064 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2065 (file32 "x86")
2066 (file64 "x86_64"))
2067 (let-values (((hash file)
2068 (match (or (%current-target-system) (%current-system))
2069 ("x86_64-linux" (values hash64 file64))
2070 (_ (values hash32 file32)))))
2071 (origin
2072 (method url-fetch)
2073 (uri (string-append
2074 "http://download.eclipse.org/eclipse/downloads/drops4/"
2075 "R-" version "-201710090410/swt-" version
2076 "-gtk-linux-" file ".zip"))
2077 (sha256 (base32 hash))))))
2078 (build-system ant-build-system)
2079 (arguments
2080 `(#:jar-name "swt.jar"
2081 #:jdk ,icedtea-8
2082 #:tests? #f ; no "check" target
2083 #:phases
2084 (modify-phases %standard-phases
2085 (replace 'unpack
2086 (lambda* (#:key source #:allow-other-keys)
2087 (and (mkdir "swt")
2088 (zero? (system* "unzip" source "-d" "swt"))
2089 (chdir "swt")
2090 (mkdir "src")
2091 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2092 ;; The classpath contains invalid icecat jars. Since we don't need
2093 ;; anything other than the JDK on the classpath, we can simply unset
2094 ;; it.
2095 (add-after 'configure 'unset-classpath
2096 (lambda _ (unsetenv "CLASSPATH") #t))
2097 (add-before 'build 'build-native
2098 (lambda* (#:key inputs outputs #:allow-other-keys)
2099 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2100 ;; Build shared libraries. Users of SWT have to set the system
2101 ;; property swt.library.path to the "lib" directory of this
2102 ;; package output.
2103 (mkdir-p lib)
2104 (setenv "OUTPUT_DIR" lib)
2105 (with-directory-excursion "src"
2106 (zero? (system* "bash" "build.sh"))))))
2107 (add-after 'install 'install-native
2108 (lambda* (#:key outputs #:allow-other-keys)
2109 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2110 (for-each (lambda (file)
2111 (install-file file lib))
2112 (find-files "." "\\.so$"))
2113 #t))))))
2114 (inputs
2115 `(("gtk" ,gtk+-2)
2116 ("libxtst" ,libxtst)
2117 ("libxt" ,libxt)
2118 ("mesa" ,mesa)
2119 ("glu" ,glu)))
2120 (native-inputs
2121 `(("pkg-config" ,pkg-config)
2122 ("unzip" ,unzip)))
2123 (home-page "https://www.eclipse.org/swt/")
2124 (synopsis "Widget toolkit for Java")
2125 (description
2126 "SWT is a widget toolkit for Java designed to provide efficient, portable
2127 access to the user-interface facilities of the operating systems on which it
2128 is implemented.")
2129 ;; SWT code is licensed under EPL1.0
2130 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2131 ;; Cairo bindings contain code under MPL1.1
2132 ;; XULRunner 1.9 bindings contain code under MPL2.0
2133 (license (list
2134 license:epl1.0
2135 license:mpl1.1
2136 license:mpl2.0
2137 license:lgpl2.1+))))
2138
2139 (define-public java-xz
2140 (package
2141 (name "java-xz")
2142 (version "1.6")
2143 (source (origin
2144 (method url-fetch)
2145 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2146 (sha256
2147 (base32
2148 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2149 (build-system ant-build-system)
2150 (arguments
2151 `(#:tests? #f ; There are no tests to run.
2152 #:jar-name ,(string-append "xz-" version ".jar")
2153 #:phases
2154 (modify-phases %standard-phases
2155 ;; The unpack phase enters the "maven" directory by accident.
2156 (add-after 'unpack 'chdir
2157 (lambda _ (chdir "..") #t)))))
2158 (native-inputs
2159 `(("unzip" ,unzip)))
2160 (home-page "https://tukaani.org/xz/java.html")
2161 (synopsis "Implementation of XZ data compression in pure Java")
2162 (description "This library aims to be a complete implementation of XZ data
2163 compression in pure Java. Single-threaded streamed compression and
2164 decompression and random access decompression have been fully implemented.")
2165 (license license:public-domain)))
2166
2167 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2168 ;; of the latest release.
2169 (define-public java-qdox-1.12
2170 (package
2171 (name "java-qdox")
2172 (version "1.12.1")
2173 (source (origin
2174 (method url-fetch)
2175 (uri (string-append "http://central.maven.org/maven2/"
2176 "com/thoughtworks/qdox/qdox/" version
2177 "/qdox-" version "-sources.jar"))
2178 (sha256
2179 (base32
2180 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2181 (build-system ant-build-system)
2182 (arguments
2183 `(;; Tests require junit
2184 #:tests? #f
2185 #:jar-name "qdox.jar"
2186 #:phases
2187 (modify-phases %standard-phases
2188 (replace 'unpack
2189 (lambda* (#:key source #:allow-other-keys)
2190 (mkdir "src")
2191 (with-directory-excursion "src"
2192 (zero? (system* "jar" "-xf" source)))))
2193 ;; At this point we don't have junit, so we must remove the API
2194 ;; tests.
2195 (add-after 'unpack 'delete-tests
2196 (lambda _
2197 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2198 #t)))))
2199 (home-page "http://qdox.codehaus.org/")
2200 (synopsis "Parse definitions from Java source files")
2201 (description
2202 "QDox is a high speed, small footprint parser for extracting
2203 class/interface/method definitions from source files complete with JavaDoc
2204 @code{@@tags}. It is designed to be used by active code generators or
2205 documentation tools.")
2206 (license license:asl2.0)))
2207
2208 (define-public java-jarjar
2209 (package
2210 (name "java-jarjar")
2211 (version "1.4")
2212 (source (origin
2213 (method url-fetch)
2214 (uri (string-append
2215 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2216 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2217 (sha256
2218 (base32
2219 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2220 (build-system ant-build-system)
2221 (arguments
2222 `(;; Tests require junit, which ultimately depends on this package.
2223 #:tests? #f
2224 #:build-target "jar"
2225 #:phases
2226 (modify-phases %standard-phases
2227 (replace 'install
2228 (lambda* (#:key outputs #:allow-other-keys)
2229 (let ((target (string-append (assoc-ref outputs "out")
2230 "/share/java")))
2231 (install-file (string-append "dist/jarjar-" ,version ".jar")
2232 target))
2233 #t)))))
2234 (native-inputs
2235 `(("unzip" ,unzip)))
2236 (home-page "https://code.google.com/archive/p/jarjar/")
2237 (synopsis "Repackage Java libraries")
2238 (description
2239 "Jar Jar Links is a utility that makes it easy to repackage Java
2240 libraries and embed them into your own distribution. Jar Jar Links includes
2241 an Ant task that extends the built-in @code{jar} task.")
2242 (license license:asl2.0)))
2243
2244 (define-public java-hamcrest-core
2245 (package
2246 (name "java-hamcrest-core")
2247 (version "1.3")
2248 (source (origin
2249 (method url-fetch)
2250 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2251 "archive/hamcrest-java-" version ".tar.gz"))
2252 (sha256
2253 (base32
2254 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2255 (modules '((guix build utils)))
2256 (snippet
2257 '(begin
2258 ;; Delete bundled thirds-party jar archives.
2259 (delete-file-recursively "lib")
2260 #t))))
2261 (build-system ant-build-system)
2262 (arguments
2263 `(#:tests? #f ; Tests require junit
2264 #:modules ((guix build ant-build-system)
2265 (guix build utils)
2266 (srfi srfi-1))
2267 #:make-flags (list (string-append "-Dversion=" ,version))
2268 #:test-target "unit-test"
2269 #:build-target "core"
2270 #:phases
2271 (modify-phases %standard-phases
2272 ;; Disable unit tests, because they require junit, which requires
2273 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2274 ;; attribute from the manifest for reproducibility.
2275 (add-before 'configure 'patch-build.xml
2276 (lambda _
2277 (substitute* "build.xml"
2278 (("unit-test, ") "")
2279 (("\\$\\{build.timestamp\\}") "guix"))
2280 #t))
2281 ;; Java's "getMethods()" returns methods in an unpredictable order.
2282 ;; To make the output of the generated code deterministic we must
2283 ;; sort the array of methods.
2284 (add-after 'unpack 'make-method-order-deterministic
2285 (lambda _
2286 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2287 (("import java\\.util\\.Iterator;" line)
2288 (string-append line "\n"
2289 "import java.util.Arrays; import java.util.Comparator;"))
2290 (("allMethods = cls\\.getMethods\\(\\);" line)
2291 (string-append "_" line
2292 "
2293 private Method[] getSortedMethods() {
2294 Arrays.sort(_allMethods, new Comparator<Method>() {
2295 @Override
2296 public int compare(Method a, Method b) {
2297 return a.toString().compareTo(b.toString());
2298 }
2299 });
2300 return _allMethods;
2301 }
2302
2303 private Method[] allMethods = getSortedMethods();")))))
2304 (add-before 'build 'do-not-use-bundled-qdox
2305 (lambda* (#:key inputs #:allow-other-keys)
2306 (substitute* "build.xml"
2307 (("lib/generator/qdox-1.12.jar")
2308 (string-append (assoc-ref inputs "java-qdox-1.12")
2309 "/share/java/qdox.jar")))
2310 #t))
2311 ;; build.xml searches for .jar files in this directoy, which
2312 ;; we remove from the source archive.
2313 (add-before 'build 'create-dummy-directories
2314 (lambda _
2315 (mkdir-p "lib/integration")
2316 #t))
2317 (replace 'install
2318 (lambda* (#:key outputs #:allow-other-keys)
2319 (let* ((target (string-append (assoc-ref outputs "out")
2320 "/share/java/"))
2321 (version-suffix ,(string-append "-" version ".jar"))
2322 (install-without-version-suffix
2323 (lambda (jar)
2324 (copy-file jar
2325 (string-append target
2326 (basename jar version-suffix)
2327 ".jar")))))
2328 (mkdir-p target)
2329 (for-each
2330 install-without-version-suffix
2331 (find-files "build"
2332 (lambda (name _)
2333 (and (string-suffix? ".jar" name)
2334 (not (string-suffix? "-sources.jar" name)))))))
2335 #t)))))
2336 (native-inputs
2337 `(("java-qdox-1.12" ,java-qdox-1.12)
2338 ("java-jarjar" ,java-jarjar)))
2339 (home-page "http://hamcrest.org/")
2340 (synopsis "Library of matchers for building test expressions")
2341 (description
2342 "This package provides a library of matcher objects (also known as
2343 constraints or predicates) allowing @code{match} rules to be defined
2344 declaratively, to be used in other frameworks. Typical scenarios include
2345 testing frameworks, mocking libraries and UI validation rules.")
2346 (license license:bsd-2)))
2347
2348 (define-public java-junit
2349 (package
2350 (name "java-junit")
2351 (version "4.12")
2352 (source (origin
2353 (method url-fetch)
2354 (uri (string-append "https://github.com/junit-team/junit/"
2355 "archive/r" version ".tar.gz"))
2356 (file-name (string-append name "-" version ".tar.gz"))
2357 (sha256
2358 (base32
2359 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2360 (modules '((guix build utils)))
2361 (snippet
2362 '(begin
2363 ;; Delete bundled jar archives.
2364 (delete-file-recursively "lib")
2365 #t))))
2366 (build-system ant-build-system)
2367 (arguments
2368 `(#:tests? #f ; no tests
2369 #:jar-name "junit.jar"))
2370 (inputs
2371 `(("java-hamcrest-core" ,java-hamcrest-core)))
2372 (home-page "http://junit.org/")
2373 (synopsis "Test framework for Java")
2374 (description
2375 "JUnit is a simple framework to write repeatable tests for Java projects.
2376 JUnit provides assertions for testing expected results, test fixtures for
2377 sharing common test data, and test runners for running tests.")
2378 (license license:epl1.0)))
2379
2380 (define-public java-plexus-utils
2381 (package
2382 (name "java-plexus-utils")
2383 (version "3.0.24")
2384 (source (origin
2385 (method url-fetch)
2386 (uri (string-append "https://github.com/codehaus-plexus/"
2387 "plexus-utils/archive/plexus-utils-"
2388 version ".tar.gz"))
2389 (sha256
2390 (base32
2391 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2392 (build-system ant-build-system)
2393 ;; FIXME: The default build.xml does not include a target to install
2394 ;; javadoc files.
2395 (arguments
2396 `(#:jar-name "plexus-utils.jar"
2397 #:source-dir "src/main"
2398 #:phases
2399 (modify-phases %standard-phases
2400 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2401 (lambda _
2402 (substitute* "src/main/java/org/codehaus/plexus/util/\
2403 cli/shell/BourneShell.java"
2404 (("/bin/sh") (which "sh"))
2405 (("/usr/") (getcwd)))
2406 #t))
2407 (add-after 'unpack 'fix-or-disable-broken-tests
2408 (lambda _
2409 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2410 (substitute* '("cli/CommandlineTest.java"
2411 "cli/shell/BourneShellTest.java")
2412 (("/bin/sh") (which "sh"))
2413 (("/bin/echo") (which "echo")))
2414
2415 ;; This test depends on MavenProjectStub, but we don't have
2416 ;; a package for Maven.
2417 (delete-file "introspection/ReflectionValueExtractorTest.java")
2418
2419 ;; FIXME: The command line tests fail, maybe because they use
2420 ;; absolute paths.
2421 (delete-file "cli/CommandlineTest.java"))
2422 #t)))))
2423 (native-inputs
2424 `(("java-junit" ,java-junit)))
2425 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2426 (synopsis "Common utilities for the Plexus framework")
2427 (description "This package provides various Java utility classes for the
2428 Plexus framework to ease working with strings, files, command lines, XML and
2429 more.")
2430 (license license:asl2.0)))
2431
2432 (define-public java-plexus-interpolation
2433 (package
2434 (name "java-plexus-interpolation")
2435 (version "1.23")
2436 (source (origin
2437 (method url-fetch)
2438 (uri (string-append "https://github.com/codehaus-plexus/"
2439 "plexus-interpolation/archive/"
2440 "plexus-interpolation-" version ".tar.gz"))
2441 (sha256
2442 (base32
2443 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2444 (build-system ant-build-system)
2445 (arguments
2446 `(#:jar-name "plexus-interpolation.jar"
2447 #:source-dir "src/main"))
2448 (native-inputs
2449 `(("java-junit" ,java-junit)
2450 ("java-hamcrest-core" ,java-hamcrest-core)))
2451 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2452 (synopsis "Java components for interpolating ${} strings and the like")
2453 (description "Plexus interpolator is a modular, flexible interpolation
2454 framework for the expression language style commonly seen in Maven, Plexus,
2455 and other related projects.
2456
2457 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2458 package within @code{plexus-utils}, but has been separated in order to allow
2459 these two libraries to vary independently of one another.")
2460 (license license:asl2.0)))
2461
2462 (define-public java-plexus-classworlds
2463 (package
2464 (name "java-plexus-classworlds")
2465 (version "2.5.2")
2466 (source (origin
2467 (method url-fetch)
2468 (uri (string-append "https://github.com/codehaus-plexus/"
2469 "plexus-classworlds/archive/plexus-classworlds-"
2470 version ".tar.gz"))
2471 (sha256
2472 (base32
2473 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2474 (build-system ant-build-system)
2475 (arguments
2476 `(#:jar-name "plexus-classworlds.jar"
2477 #:source-dir "src/main"
2478 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2479 (native-inputs
2480 `(("java-junit" ,java-junit)))
2481 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2482 (synopsis "Java class loader framework")
2483 (description "Plexus classworlds replaces the native @code{ClassLoader}
2484 mechanism of Java. It is especially useful for dynamic loading of application
2485 components.")
2486 (license license:asl2.0)))
2487
2488 (define-public java-plexus-container-default-bootstrap
2489 (package
2490 (name "java-plexus-container-default-bootstrap")
2491 (version "1.7.1")
2492 (source (origin
2493 (method url-fetch)
2494 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2495 "/archive/plexus-containers-" version ".tar.gz"))
2496 (sha256
2497 (base32
2498 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2499 (build-system ant-build-system)
2500 (arguments
2501 `(#:jar-name "container-default.jar"
2502 #:source-dir "plexus-container-default/src/main/java"
2503 #:test-dir "plexus-container-default/src/test"
2504 #:jdk ,icedtea-8
2505 #:tests? #f; requires plexus-archiver, which depends on this package
2506 #:phases
2507 (modify-phases %standard-phases
2508 (add-before 'build 'copy-resources
2509 (lambda _
2510 (copy-recursively
2511 "plexus-container-default/src/main/resources/"
2512 "build/classes")
2513 #t)))))
2514 (inputs
2515 `(("worldclass" ,java-plexus-classworlds)
2516 ("xbean" ,java-geronimo-xbean-reflect)
2517 ("utils" ,java-plexus-utils)
2518 ("junit" ,java-junit)
2519 ("guava" ,java-guava)))
2520 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2521 (synopsis "Inversion-of-control container")
2522 (description "Plexus-default-container is Plexus' inversion-of-control
2523 (@dfn{IoC}) container. It is composed of its public API and its default
2524 implementation.")
2525 (license license:asl2.0)))
2526
2527 (define-public java-plexus-io
2528 (package
2529 (name "java-plexus-io")
2530 (version "3.0.0")
2531 (source (origin
2532 (method url-fetch)
2533 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2534 "/archive/plexus-io-" version ".tar.gz"))
2535 (sha256
2536 (base32
2537 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2538 (build-system ant-build-system)
2539 (arguments
2540 `(#:jar-name "plexus-io.jar"
2541 #:source-dir "src/main/java"
2542 #:test-dir "src/test"
2543 #:jdk ,icedtea-8
2544 #:phases
2545 (modify-phases %standard-phases
2546 (add-before 'build 'copy-resources
2547 (lambda _
2548 (mkdir-p "build/classes/META-INF/plexus")
2549 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2550 "build/classes/META-INF/plexus/components.xml")
2551 #t)))))
2552 (inputs
2553 `(("utils" ,java-plexus-utils)
2554 ("commons-io" ,java-commons-io)
2555 ("java-jsr305" ,java-jsr305)))
2556 (native-inputs
2557 `(("junit" ,java-junit)
2558 ("hamcrest" ,java-hamcrest-core)
2559 ("guava" ,java-guava)
2560 ("classworlds" ,java-plexus-classworlds)
2561 ("xbean" ,java-geronimo-xbean-reflect)
2562 ("container-default" ,java-plexus-container-default-bootstrap)))
2563 (home-page "https://github.com/codehaus-plexus/plexus-io")
2564 (synopsis "I/O plexus components")
2565 (description "Plexus IO is a set of plexus components, which are designed
2566 for use in I/O operations. This implementation using plexus components allows
2567 reusing it in maven.")
2568 (license license:asl2.0)))
2569
2570 (define-public java-plexus-archiver
2571 (package
2572 (name "java-plexus-archiver")
2573 (version "3.5")
2574 (source (origin
2575 (method url-fetch)
2576 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
2577 "/archive/plexus-archiver-" version ".tar.gz"))
2578 (sha256
2579 (base32
2580 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
2581 (build-system ant-build-system)
2582 (arguments
2583 `(#:jar-name "plexus-archiver.jar"
2584 #:source-dir "src/main/java"
2585 #:jdk ,icedtea-8
2586 #:test-dir "src/test"
2587 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
2588 #:phases
2589 (modify-phases %standard-phases
2590 (add-before 'check 'remove-failing
2591 (lambda _
2592 ;; Requires an older version of plexus container
2593 (delete-file
2594 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
2595 (add-before 'build 'copy-resources
2596 (lambda _
2597 (mkdir-p "build/classes/META-INF/plexus")
2598 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2599 "build/classes/META-INF/plexus/components.xml")
2600 #t)))))
2601 (inputs
2602 `(("utils" ,java-plexus-utils)
2603 ("commons-io" ,java-commons-io)
2604 ("snappy" ,java-iq80-snappy)
2605 ("io" ,java-plexus-io)
2606 ("compress" ,java-commons-compress)
2607 ("container-default" ,java-plexus-container-default-bootstrap)
2608 ("snappy" ,java-snappy)
2609 ("java-jsr305" ,java-jsr305)))
2610 (native-inputs
2611 `(("junit" ,java-junit)
2612 ("classworld" ,java-plexus-classworlds)
2613 ("xbean" ,java-geronimo-xbean-reflect)
2614 ("xz" ,java-tukaani-xz)
2615 ("guava" ,java-guava)))
2616 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
2617 (synopsis "Archiver component of the Plexus project")
2618 (description "Plexus-archiver contains a component to deal with project
2619 archives (jar).")
2620 (license license:asl2.0)))
2621
2622 (define-public java-plexus-container-default
2623 (package
2624 (inherit java-plexus-container-default-bootstrap)
2625 (name "java-plexus-container-default")
2626 (arguments
2627 `(#:jar-name "container-default.jar"
2628 #:source-dir "plexus-container-default/src/main/java"
2629 #:test-dir "plexus-container-default/src/test"
2630 #:test-exclude (list ;"**/*Test.java"
2631 "**/Abstract*.java"
2632 ;; Requires plexus-hierarchy
2633 "**/PlexusHierarchyTest.java"
2634 ;; Failures
2635 "**/ComponentRealmCompositionTest.java"
2636 "**/PlexusContainerTest.java")
2637 #:jdk ,icedtea-8
2638 #:phases
2639 (modify-phases %standard-phases
2640 (add-before 'build 'copy-resources
2641 (lambda _
2642 (copy-recursively
2643 "plexus-container-default/src/main/resources/"
2644 "build/classes")
2645 #t))
2646 (add-before 'check 'fix-paths
2647 (lambda _
2648 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
2649 (substitute*
2650 (string-append
2651 dir "/plexus/component/composition/"
2652 "ComponentRealmCompositionTest.java")
2653 (("src/test") "plexus-container-default/src/test"))
2654 #t))))))
2655 (inputs
2656 `(("worldclass" ,java-plexus-classworlds)
2657 ("xbean" ,java-geronimo-xbean-reflect)
2658 ("utils" ,java-plexus-utils)
2659 ("junit" ,java-junit)
2660 ("guava" ,java-guava)))
2661 (native-inputs
2662 `(("archiver" ,java-plexus-archiver)
2663 ("hamcrest" ,java-hamcrest-core)))))
2664
2665 (define-public java-asm
2666 (package
2667 (name "java-asm")
2668 (version "5.2")
2669 (source (origin
2670 (method url-fetch)
2671 (uri (string-append "http://download.forge.ow2.org/asm/"
2672 "asm-" version ".tar.gz"))
2673 (sha256
2674 (base32
2675 "0kxvmv5275rnjl7jv0442k3wjnq03ngkb7sghs78avf45pzm4qgr"))))
2676 (build-system ant-build-system)
2677 (arguments
2678 `(#:build-target "compile"
2679 ;; The tests require an old version of Janino, which no longer compiles
2680 ;; with the JDK7.
2681 #:tests? #f
2682 ;; We don't need these extra ant tasks, but the build system asks us to
2683 ;; provide a path anyway.
2684 #:make-flags (list (string-append "-Dobjectweb.ant.tasks.path=foo"))
2685 #:phases
2686 (modify-phases %standard-phases
2687 (add-before 'install 'build-jars
2688 (lambda* (#:key make-flags #:allow-other-keys)
2689 ;; We cannot use the "jar" target because it depends on a couple
2690 ;; of unpackaged, complicated tools.
2691 (mkdir "dist")
2692 (zero? (system* "jar"
2693 "-cf" (string-append "dist/asm-" ,version ".jar")
2694 "-C" "output/build/tmp" "."))))
2695 (replace 'install
2696 (install-jars "dist")))))
2697 (native-inputs
2698 `(("java-junit" ,java-junit)))
2699 (home-page "http://asm.ow2.org/")
2700 (synopsis "Very small and fast Java bytecode manipulation framework")
2701 (description "ASM is an all purpose Java bytecode manipulation and
2702 analysis framework. It can be used to modify existing classes or dynamically
2703 generate classes, directly in binary form. The provided common
2704 transformations and analysis algorithms allow to easily assemble custom
2705 complex transformations and code analysis tools.")
2706 (license license:bsd-3)))
2707
2708 (define-public java-cglib
2709 (package
2710 (name "java-cglib")
2711 (version "3.2.4")
2712 (source (origin
2713 (method url-fetch)
2714 (uri (string-append
2715 "https://github.com/cglib/cglib/archive/RELEASE_"
2716 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
2717 ".tar.gz"))
2718 (file-name (string-append "cglib-" version ".tar.gz"))
2719 (sha256
2720 (base32
2721 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
2722 (build-system ant-build-system)
2723 (arguments
2724 `(;; FIXME: tests fail because junit runs
2725 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
2726 ;; to describe a test at all.
2727 #:tests? #f
2728 #:jar-name "cglib.jar"
2729 #:phases
2730 (modify-phases %standard-phases
2731 (add-after 'unpack 'chdir
2732 (lambda _ (chdir "cglib") #t)))))
2733 (inputs
2734 `(("java-asm" ,java-asm)
2735 ("java-junit" ,java-junit)))
2736 (home-page "https://github.com/cglib/cglib/")
2737 (synopsis "Java byte code generation library")
2738 (description "The byte code generation library CGLIB is a high level API
2739 to generate and transform Java byte code.")
2740 (license license:asl2.0)))
2741
2742 (define-public java-objenesis
2743 (package
2744 (name "java-objenesis")
2745 (version "2.5.1")
2746 (source (origin
2747 (method url-fetch)
2748 (uri (string-append "https://github.com/easymock/objenesis/"
2749 "archive/" version ".tar.gz"))
2750 (file-name (string-append "objenesis-" version ".tar.gz"))
2751 (sha256
2752 (base32
2753 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
2754 (build-system ant-build-system)
2755 (arguments
2756 `(#:jar-name "objenesis.jar"
2757 #:source-dir "main/src/"
2758 #:test-dir "main/src/test/"))
2759 (native-inputs
2760 `(("java-junit" ,java-junit)
2761 ("java-hamcrest-core" ,java-hamcrest-core)))
2762 (home-page "http://objenesis.org/")
2763 (synopsis "Bypass the constructor when creating an object")
2764 (description "Objenesis is a small Java library that serves one purpose:
2765 to instantiate a new object of a particular class. It is common to see
2766 restrictions in libraries stating that classes must require a default
2767 constructor. Objenesis aims to overcome these restrictions by bypassing the
2768 constructor on object instantiation.")
2769 (license license:asl2.0)))
2770
2771 (define-public java-easymock
2772 (package
2773 (name "java-easymock")
2774 (version "3.4")
2775 (source (origin
2776 (method url-fetch)
2777 (uri (string-append "https://github.com/easymock/easymock/"
2778 "archive/easymock-" version ".tar.gz"))
2779 (sha256
2780 (base32
2781 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
2782 (build-system ant-build-system)
2783 (arguments
2784 `(#:jar-name "easymock.jar"
2785 #:source-dir "core/src/main"
2786 #:test-dir "core/src/test"
2787 #:phases
2788 (modify-phases %standard-phases
2789 ;; FIXME: Android support requires the following packages to be
2790 ;; available: com.google.dexmaker.stock.ProxyBuilder
2791 (add-after 'unpack 'delete-android-support
2792 (lambda _
2793 (with-directory-excursion "core/src/main/java/org/easymock/internal"
2794 (substitute* "MocksControl.java"
2795 (("AndroidSupport.isAndroid\\(\\)") "false")
2796 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
2797 (delete-file "AndroidClassProxyFactory.java"))
2798 #t))
2799 (add-after 'unpack 'delete-broken-tests
2800 (lambda _
2801 (with-directory-excursion "core/src/test/java/org/easymock"
2802 ;; This test depends on dexmaker.
2803 (delete-file "tests2/ClassExtensionHelperTest.java")
2804
2805 ;; This is not a test.
2806 (delete-file "tests/BaseEasyMockRunnerTest.java")
2807
2808 ;; This test should be executed with a different runner...
2809 (delete-file "tests2/EasyMockAnnotationsTest.java")
2810 ;; ...but deleting it means that we also have to delete these
2811 ;; dependent files.
2812 (delete-file "tests2/EasyMockRunnerTest.java")
2813 (delete-file "tests2/EasyMockRuleTest.java")
2814
2815 ;; This test fails because the file "easymock.properties" does
2816 ;; not exist.
2817 (delete-file "tests2/EasyMockPropertiesTest.java"))
2818 #t)))))
2819 (inputs
2820 `(("java-asm" ,java-asm)
2821 ("java-cglib" ,java-cglib)
2822 ("java-objenesis" ,java-objenesis)))
2823 (native-inputs
2824 `(("java-junit" ,java-junit)
2825 ("java-hamcrest-core" ,java-hamcrest-core)))
2826 (home-page "http://easymock.org")
2827 (synopsis "Java library providing mock objects for unit tests")
2828 (description "EasyMock is a Java library that provides an easy way to use
2829 mock objects in unit testing.")
2830 (license license:asl2.0)))
2831
2832 (define-public java-jmock-1
2833 (package
2834 (name "java-jmock")
2835 (version "1.2.0")
2836 (source (origin
2837 (method url-fetch)
2838 (uri (string-append "https://github.com/jmock-developers/"
2839 "jmock-library/archive/" version ".tar.gz"))
2840 (file-name (string-append "jmock-" version ".tar.gz"))
2841 (sha256
2842 (base32
2843 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
2844 (build-system ant-build-system)
2845 (arguments
2846 `(#:build-target "jars"
2847 #:test-target "run.tests"
2848 #:phases
2849 (modify-phases %standard-phases
2850 (replace 'install (install-jars "build")))))
2851 (home-page "http://www.jmock.org")
2852 (synopsis "Mock object library for test-driven development")
2853 (description "JMock is a library that supports test-driven development of
2854 Java code with mock objects. Mock objects help you design and test the
2855 interactions between the objects in your programs.
2856
2857 The jMock library
2858
2859 @itemize
2860 @item makes it quick and easy to define mock objects
2861 @item lets you precisely specify the interactions between
2862 your objects, reducing the brittleness of your tests
2863 @item plugs into your favourite test framework
2864 @item is easy to extend.
2865 @end itemize\n")
2866 (license license:bsd-3)))
2867
2868 (define-public java-jmock
2869 (package
2870 (inherit java-jmock-1)
2871 (name "java-jmock")
2872 (version "2.8.2")
2873 (source (origin
2874 (method url-fetch)
2875 (uri (string-append "https://github.com/jmock-developers/"
2876 "jmock-library/archive/" version ".tar.gz"))
2877 (file-name (string-append name "-" version ".tar.gz"))
2878 (sha256
2879 (base32
2880 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
2881 (inputs
2882 `(("java-hamcrest-all" ,java-hamcrest-all)
2883 ("java-asm" ,java-asm)
2884 ("java-bsh" ,java-bsh)
2885 ("java-junit" ,java-junit)))
2886 (native-inputs
2887 `(("cglib" ,java-cglib)))
2888 (arguments
2889 `(#:jar-name "java-jmock.jar"
2890 #:source-dir "jmock/src/main/java"
2891 #:test-dir "jmock/src/test"))))
2892
2893 (define-public java-jmock-junit4
2894 (package
2895 (inherit java-jmock)
2896 (name "java-jmock-junit4")
2897 (arguments
2898 `(#:jar-name "java-jmock-junit4.jar"
2899 #:source-dir "jmock-junit4/src/main/java"
2900 #:test-dir "jmock-junit4/src/test"))
2901 (inputs
2902 `(("java-hamcrest-all" ,java-hamcrest-all)
2903 ("java-asm" ,java-asm)
2904 ("java-bsh" ,java-bsh)
2905 ("java-jmock" ,java-jmock)
2906 ("java-jumit" ,java-junit)))))
2907
2908 (define-public java-jmock-legacy
2909 (package
2910 (inherit java-jmock)
2911 (name "java-jmock-legacy")
2912 (arguments
2913 `(#:jar-name "java-jmock-legacy.jar"
2914 #:source-dir "jmock-legacy/src/main/java"
2915 #:test-dir "jmock-legacy/src/test"
2916 #:phases
2917 (modify-phases %standard-phases
2918 (add-before 'check 'copy-tests
2919 (lambda _
2920 ;; This file is a dependancy of some tests
2921 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
2922 (copy-file (string-append "jmock/src/test/java/" file)
2923 (string-append "jmock-legacy/src/test/java/" file))
2924 #t))))))
2925 (inputs
2926 `(("java-hamcrest-all" ,java-hamcrest-all)
2927 ("java-objenesis" ,java-objenesis)
2928 ("java-cglib" ,java-cglib)
2929 ("java-jmock" ,java-jmock)
2930 ("java-asm" ,java-asm)
2931 ("java-bsh" ,java-bsh)
2932 ("java-junit" ,java-junit)))
2933 (native-inputs
2934 `(("java-jmock-junit4" ,java-jmock-junit4)))))
2935
2936 (define-public java-hamcrest-all
2937 (package (inherit java-hamcrest-core)
2938 (name "java-hamcrest-all")
2939 (arguments
2940 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
2941 ;; FIXME: a unit test fails because org.hamcrest.SelfDescribing is not
2942 ;; found, although it is part of the hamcrest-core library that has
2943 ;; just been built.
2944 ;;
2945 ;; Fixing this one test is insufficient, though, and upstream confirmed
2946 ;; that the latest hamcrest release fails its unit tests when built
2947 ;; with Java 7. See https://github.com/hamcrest/JavaHamcrest/issues/30
2948 ((#:tests? _) #f)
2949 ((#:build-target _) "bigjar")
2950 ((#:phases phases)
2951 `(modify-phases ,phases
2952 ;; Some build targets override the classpath, so we need to patch
2953 ;; the build.xml to ensure that required dependencies are on the
2954 ;; classpath.
2955 (add-after 'unpack 'patch-classpath-for-integration
2956 (lambda* (#:key inputs #:allow-other-keys)
2957 (substitute* "build.xml"
2958 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
2959 (string-join
2960 (cons line
2961 (append
2962 (find-files (assoc-ref inputs "java-hamcrest-core") "\\.jar$")
2963 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
2964 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
2965 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2966 ";")))
2967 #t))))))
2968 (inputs
2969 `(("java-junit" ,java-junit)
2970 ("java-jmock" ,java-jmock-1)
2971 ("java-easymock" ,java-easymock)
2972 ("java-hamcrest-core" ,java-hamcrest-core)
2973 ,@(package-inputs java-hamcrest-core)))))
2974
2975 (define-public java-jopt-simple
2976 (package
2977 (name "java-jopt-simple")
2978 (version "5.0.3")
2979 (source (origin
2980 (method url-fetch)
2981 (uri (string-append "http://repo1.maven.org/maven2/"
2982 "net/sf/jopt-simple/jopt-simple/"
2983 version "/jopt-simple-"
2984 version "-sources.jar"))
2985 (sha256
2986 (base32
2987 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
2988 (build-system ant-build-system)
2989 (arguments
2990 `(#:tests? #f ; there are no tests
2991 #:jar-name "jopt-simple.jar"))
2992 (home-page "https://pholser.github.io/jopt-simple/")
2993 (synopsis "Java library for parsing command line options")
2994 (description "JOpt Simple is a Java library for parsing command line
2995 options, such as those you might pass to an invocation of @code{javac}. In
2996 the interest of striving for simplicity, as closely as possible JOpt Simple
2997 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
2998 GNU @code{getopt_long}. It also aims to make option parser configuration and
2999 retrieval of options and their arguments simple and expressive, without being
3000 overly clever.")
3001 (license license:expat)))
3002
3003 (define-public java-commons-math3
3004 (package
3005 (name "java-commons-math3")
3006 (version "3.6.1")
3007 (source (origin
3008 (method url-fetch)
3009 (uri (string-append "mirror://apache/commons/math/source/"
3010 "commons-math3-" version "-src.tar.gz"))
3011 (sha256
3012 (base32
3013 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3014 (build-system ant-build-system)
3015 (arguments
3016 `(#:build-target "jar"
3017 #:test-target "test"
3018 #:make-flags
3019 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3020 (junit (assoc-ref %build-inputs "java-junit")))
3021 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3022 (string-append "-Dhamcrest.jar=" hamcrest
3023 "/share/java/hamcrest-core.jar")))
3024 #:phases
3025 (modify-phases %standard-phases
3026 ;; We want to build the jar in the build phase and run the tests
3027 ;; later in a separate phase.
3028 (add-after 'unpack 'untangle-targets
3029 (lambda _
3030 (substitute* "build.xml"
3031 (("name=\"jar\" depends=\"test\"")
3032 "name=\"jar\" depends=\"compile\""))
3033 #t))
3034 ;; There is no install target.
3035 (replace 'install
3036 (install-jars "target")))))
3037 (native-inputs
3038 `(("java-junit" ,java-junit)
3039 ("java-hamcrest-core" ,java-hamcrest-core)))
3040 (home-page "http://commons.apache.org/math/")
3041 (synopsis "Apache Commons mathematics library")
3042 (description "Commons Math is a library of lightweight, self-contained
3043 mathematics and statistics components addressing the most common problems not
3044 available in the Java programming language or Commons Lang.")
3045 (license license:asl2.0)))
3046
3047 (define-public java-jmh
3048 (package
3049 (name "java-jmh")
3050 (version "1.17.5")
3051 (source (origin
3052 (method hg-fetch)
3053 (uri (hg-reference
3054 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3055 (changeset version)))
3056 (file-name (string-append name "-" version "-checkout"))
3057 (sha256
3058 (base32
3059 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3060 (build-system ant-build-system)
3061 (arguments
3062 `(#:jar-name "jmh-core.jar"
3063 #:source-dir "jmh-core/src/main"
3064 #:test-dir "jmh-core/src/test"
3065 #:phases
3066 (modify-phases %standard-phases
3067 ;; This seems to be a bug in the JDK. It may not be necessary in
3068 ;; future versions of the JDK.
3069 (add-after 'unpack 'fix-bug
3070 (lambda _
3071 (with-directory-excursion
3072 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3073 (substitute* '("IntegerValueConverter.java"
3074 "ThreadsValueConverter.java")
3075 (("public Class<Integer> valueType")
3076 "public Class<? extends Integer> valueType")))
3077 #t)))))
3078 (inputs
3079 `(("java-jopt-simple" ,java-jopt-simple)
3080 ("java-commons-math3" ,java-commons-math3)))
3081 (native-inputs
3082 `(("java-junit" ,java-junit)
3083 ("java-hamcrest-core" ,java-hamcrest-core)))
3084 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3085 (synopsis "Benchmark harness for the JVM")
3086 (description "JMH is a Java harness for building, running, and analysing
3087 nano/micro/milli/macro benchmarks written in Java and other languages
3088 targeting the JVM.")
3089 ;; GPLv2 only
3090 (license license:gpl2)))
3091
3092 (define-public java-commons-collections4
3093 (package
3094 (name "java-commons-collections4")
3095 (version "4.1")
3096 (source (origin
3097 (method url-fetch)
3098 (uri (string-append "mirror://apache/commons/collections/source/"
3099 "commons-collections4-" version "-src.tar.gz"))
3100 (sha256
3101 (base32
3102 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
3103 (build-system ant-build-system)
3104 (arguments
3105 `(#:test-target "test"
3106 #:make-flags
3107 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3108 (junit (assoc-ref %build-inputs "java-junit"))
3109 (easymock (assoc-ref %build-inputs "java-easymock")))
3110 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3111 (string-append "-Dhamcrest.jar=" hamcrest
3112 "/share/java/hamcrest-core.jar")
3113 (string-append "-Deasymock.jar=" easymock
3114 "/share/java/easymock.jar")))
3115 #:phases
3116 (modify-phases %standard-phases
3117 (replace 'install
3118 (install-jars "target")))))
3119 (native-inputs
3120 `(("java-junit" ,java-junit)
3121 ("java-hamcrest-core" ,java-hamcrest-core)
3122 ("java-easymock" ,java-easymock)))
3123 (home-page "http://commons.apache.org/collections/")
3124 (synopsis "Collections framework")
3125 (description "The Java Collections Framework is the recognised standard
3126 for collection handling in Java. Commons-Collections seek to build upon the
3127 JDK classes by providing new interfaces, implementations and utilities. There
3128 are many features, including:
3129
3130 @itemize
3131 @item @code{Bag} interface for collections that have a number of copies of
3132 each object
3133 @item @code{BidiMap} interface for maps that can be looked up from value to
3134 key as well and key to value
3135 @item @code{MapIterator} interface to provide simple and quick iteration over
3136 maps
3137 @item Transforming decorators that alter each object as it is added to the
3138 collection
3139 @item Composite collections that make multiple collections look like one
3140 @item Ordered maps and sets that retain the order elements are added in,
3141 including an LRU based map
3142 @item Reference map that allows keys and/or values to be garbage collected
3143 under close control
3144 @item Many comparator implementations
3145 @item Many iterator implementations
3146 @item Adapter classes from array and enumerations to collections
3147 @item Utilities to test or create typical set-theory properties of collections
3148 such as union, intersection, and closure.
3149 @end itemize\n")
3150 (license license:asl2.0)))
3151
3152 (define-public java-commons-collections
3153 (package
3154 (inherit java-commons-collections4)
3155 (name "java-commons-collections")
3156 (version "3.2.2")
3157 (source (origin
3158 (method url-fetch)
3159 (uri (string-append "mirror://apache/commons/collections/source/"
3160 "commons-collections-" version "-src.tar.gz"))
3161 (sha256
3162 (base32
3163 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
3164 (arguments
3165 (substitute-keyword-arguments (package-arguments java-commons-collections4)
3166 ((#:phases phases)
3167 `(modify-phases ,phases
3168 ;; The manifest is required by the build procedure
3169 (add-before 'build 'add-manifest
3170 (lambda _
3171 (mkdir-p "build/conf")
3172 (call-with-output-file "build/conf/MANIFEST.MF"
3173 (lambda (file)
3174 (format file "Manifest-Version: 1.0\n")))))
3175 (replace 'install
3176 (install-jars "build"))))))))
3177
3178 (define java-commons-collections-test-classes
3179 (package
3180 (inherit java-commons-collections)
3181 (arguments
3182 `(#:jar-name "commons-collections-test-classes.jar"
3183 #:source-dir "src/test"
3184 #:tests? #f))
3185 (inputs
3186 `(("collection" ,java-commons-collections)))))
3187
3188 (define-public java-commons-beanutils
3189 (package
3190 (name "java-commons-beanutils")
3191 (version "1.9.3")
3192 (source (origin
3193 (method url-fetch)
3194 (uri (string-append "mirror://apache/commons/beanutils/source/"
3195 "commons-beanutils-" version "-src.tar.gz"))
3196 (sha256
3197 (base32
3198 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
3199 (build-system ant-build-system)
3200 (arguments
3201 `(#:test-target "test"
3202 #:tests? #f
3203 #:phases
3204 (modify-phases %standard-phases
3205 (replace 'install
3206 (lambda* (#:key outputs #:allow-other-keys)
3207 (rename-file (string-append "dist/commons-beanutils-" ,version
3208 "-SNAPSHOT.jar")
3209 "commons-beanutils.jar")
3210 (install-file "commons-beanutils.jar"
3211 (string-append (assoc-ref outputs "out") "/share/java/"))
3212 #t)))))
3213 (inputs
3214 `(("logging" ,java-commons-logging-minimal)
3215 ("collections" ,java-commons-collections)))
3216 (native-inputs
3217 `(("junit" ,java-junit)
3218 ("collections-test" ,java-commons-collections-test-classes)))
3219 (home-page "http://commons.apache.org/beanutils/")
3220 (synopsis "Dynamically set or get properties in Java")
3221 (description "BeanUtils provides a simplified interface to reflection and
3222 introspection to set or get dynamically determined properties through their
3223 setter and getter method.")
3224 (license license:asl2.0)))
3225
3226 (define-public java-commons-io
3227 (package
3228 (name "java-commons-io")
3229 (version "2.5")
3230 (source
3231 (origin
3232 (method url-fetch)
3233 (uri (string-append "mirror://apache/commons/io/source/"
3234 "commons-io-" version "-src.tar.gz"))
3235 (sha256
3236 (base32
3237 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
3238 (build-system ant-build-system)
3239 (outputs '("out" "doc"))
3240 (arguments
3241 `(#:test-target "test"
3242 #:make-flags
3243 (list (string-append "-Djunit.jar="
3244 (assoc-ref %build-inputs "java-junit")
3245 "/share/java/junit.jar"))
3246 #:phases
3247 (modify-phases %standard-phases
3248 (add-after 'build 'build-javadoc ant-build-javadoc)
3249 (replace 'install (install-jars "target"))
3250 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3251 (native-inputs
3252 `(("java-junit" ,java-junit)
3253 ("java-hamcrest-core" ,java-hamcrest-core)))
3254 (home-page "http://commons.apache.org/io/")
3255 (synopsis "Common useful IO related classes")
3256 (description "Commons-IO contains utility classes, stream implementations,
3257 file filters and endian classes.")
3258 (license license:asl2.0)))
3259
3260 (define-public java-commons-lang
3261 (package
3262 (name "java-commons-lang")
3263 (version "2.6")
3264 (source
3265 (origin
3266 (method url-fetch)
3267 (uri (string-append "mirror://apache/commons/lang/source/"
3268 "commons-lang-" version "-src.tar.gz"))
3269 (sha256
3270 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
3271 (build-system ant-build-system)
3272 (outputs '("out" "doc"))
3273 (arguments
3274 `(#:test-target "test"
3275 #:phases
3276 (modify-phases %standard-phases
3277 (add-after 'build 'build-javadoc ant-build-javadoc)
3278 (add-before 'check 'disable-failing-test
3279 (lambda _
3280 ;; Disable a failing test
3281 (substitute* "src/test/java/org/apache/commons/lang/\
3282 time/FastDateFormatTest.java"
3283 (("public void testFormat\\(\\)")
3284 "public void disabled_testFormat()"))
3285 #t))
3286 (replace 'install (install-jars "target"))
3287 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3288 (native-inputs
3289 `(("java-junit" ,java-junit)))
3290 (home-page "http://commons.apache.org/lang/")
3291 (synopsis "Extension of the java.lang package")
3292 (description "The Commons Lang components contains a set of Java classes
3293 that provide helper methods for standard Java classes, especially those found
3294 in the @code{java.lang} package in the Sun JDK. The following classes are
3295 included:
3296
3297 @itemize
3298 @item StringUtils - Helper for @code{java.lang.String}.
3299 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
3300 of characters such as @code{[a-z]} and @code{[abcdez]}.
3301 @item RandomStringUtils - Helper for creating randomised strings.
3302 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3303 @item NumberRange - A range of numbers with an upper and lower bound.
3304 @item ObjectUtils - Helper for @code{java.lang.Object}.
3305 @item SerializationUtils - Helper for serializing objects.
3306 @item SystemUtils - Utility class defining the Java system properties.
3307 @item NestedException package - A sub-package for the creation of nested
3308 exceptions.
3309 @item Enum package - A sub-package for the creation of enumerated types.
3310 @item Builder package - A sub-package for the creation of @code{equals},
3311 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3312 @end itemize\n")
3313 (license license:asl2.0)))
3314
3315 (define-public java-commons-lang3
3316 (package
3317 (name "java-commons-lang3")
3318 (version "3.4")
3319 (source
3320 (origin
3321 (method url-fetch)
3322 (uri (string-append "mirror://apache/commons/lang/source/"
3323 "commons-lang3-" version "-src.tar.gz"))
3324 (sha256
3325 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
3326 (build-system ant-build-system)
3327 (outputs '("out" "doc"))
3328 (arguments
3329 `(#:test-target "test"
3330 #:make-flags
3331 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
3332 (junit (assoc-ref %build-inputs "java-junit"))
3333 (easymock (assoc-ref %build-inputs "java-easymock"))
3334 (io (assoc-ref %build-inputs "java-commons-io")))
3335 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3336 (string-append "-Dhamcrest.jar=" hamcrest
3337 "/share/java/hamcrest-all.jar")
3338 (string-append "-Dcommons-io.jar=" io
3339 "/share/java/commons-io-"
3340 ,(package-version java-commons-io)
3341 "-SNAPSHOT.jar")
3342 (string-append "-Deasymock.jar=" easymock
3343 "/share/java/easymock.jar")))
3344 #:phases
3345 (modify-phases %standard-phases
3346 (add-after 'build 'build-javadoc ant-build-javadoc)
3347 (replace 'install (install-jars "target"))
3348 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
3349 (native-inputs
3350 `(("java-junit" ,java-junit)
3351 ("java-commons-io" ,java-commons-io)
3352 ("java-hamcrest-all" ,java-hamcrest-all)
3353 ("java-easymock" ,java-easymock)))
3354 (home-page "http://commons.apache.org/lang/")
3355 (synopsis "Extension of the java.lang package")
3356 (description "The Commons Lang components contains a set of Java classes
3357 that provide helper methods for standard Java classes, especially those found
3358 in the @code{java.lang} package. The following classes are included:
3359
3360 @itemize
3361 @item StringUtils - Helper for @code{java.lang.String}.
3362 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
3363 characters such as @code{[a-z]} and @code{[abcdez]}.
3364 @item RandomStringUtils - Helper for creating randomised strings.
3365 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
3366 @item NumberRange - A range of numbers with an upper and lower bound.
3367 @item ObjectUtils - Helper for @code{java.lang.Object}.
3368 @item SerializationUtils - Helper for serializing objects.
3369 @item SystemUtils - Utility class defining the Java system properties.
3370 @item NestedException package - A sub-package for the creation of nested
3371 exceptions.
3372 @item Enum package - A sub-package for the creation of enumerated types.
3373 @item Builder package - A sub-package for the creation of @code{equals},
3374 @code{hashCode}, @code{compareTo} and @code{toString} methods.
3375 @end itemize\n")
3376 (license license:asl2.0)))
3377
3378 (define-public java-jsr305
3379 (package
3380 (name "java-jsr305")
3381 (version "3.0.1")
3382 (source (origin
3383 (method url-fetch)
3384 (uri (string-append "https://repo1.maven.org/maven2/"
3385 "com/google/code/findbugs/"
3386 "jsr305/" version "/jsr305-"
3387 version "-sources.jar"))
3388 (sha256
3389 (base32
3390 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
3391 (build-system ant-build-system)
3392 (arguments
3393 `(#:tests? #f ; no tests included
3394 #:jar-name "jsr305.jar"))
3395 (home-page "http://findbugs.sourceforge.net/")
3396 (synopsis "Annotations for the static analyzer called findbugs")
3397 (description "This package provides annotations for the findbugs package.
3398 It provides packages in the @code{javax.annotations} namespace.")
3399 (license license:asl2.0)))
3400
3401 (define-public java-guava
3402 (package
3403 (name "java-guava")
3404 ;; This is the last release of Guava that can be built with Java 7.
3405 (version "20.0")
3406 (source (origin
3407 (method url-fetch)
3408 (uri (string-append "https://github.com/google/guava/"
3409 "releases/download/v" version
3410 "/guava-" version "-sources.jar"))
3411 (sha256
3412 (base32
3413 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
3414 (build-system ant-build-system)
3415 (arguments
3416 `(#:tests? #f ; no tests included
3417 #:jar-name "guava.jar"
3418 #:phases
3419 (modify-phases %standard-phases
3420 (add-after 'unpack 'trim-sources
3421 (lambda _
3422 (with-directory-excursion "src/com/google/common"
3423 ;; Remove annotations to avoid extra dependencies:
3424 ;; * "j2objc" annotations are used when converting Java to
3425 ;; Objective C;
3426 ;; * "errorprone" annotations catch common Java mistakes at
3427 ;; compile time;
3428 ;; * "IgnoreJRERequirement" is used for Android.
3429 (substitute* (find-files "." "\\.java$")
3430 (("import com.google.j2objc.*") "")
3431 (("import com.google.errorprone.annotation.*") "")
3432 (("import org.codehaus.mojo.animal_sniffer.*") "")
3433 (("@CanIgnoreReturnValue") "")
3434 (("@LazyInit") "")
3435 (("@WeakOuter") "")
3436 (("@RetainedWith") "")
3437 (("@Weak") "")
3438 (("@ForOverride") "")
3439 (("@J2ObjCIncompatible") "")
3440 (("@IgnoreJRERequirement") "")))
3441 #t)))))
3442 (inputs
3443 `(("java-jsr305" ,java-jsr305)))
3444 (home-page "https://github.com/google/guava")
3445 (synopsis "Google core libraries for Java")
3446 (description "Guava is a set of core libraries that includes new
3447 collection types (such as multimap and multiset), immutable collections, a
3448 graph library, functional types, an in-memory cache, and APIs/utilities for
3449 concurrency, I/O, hashing, primitives, reflection, string processing, and much
3450 more!")
3451 (license license:asl2.0)))
3452
3453 ;; The java-commons-logging package provides adapters to many different
3454 ;; logging frameworks. To avoid an excessive dependency graph we try to build
3455 ;; it with only a minimal set of adapters.
3456 (define-public java-commons-logging-minimal
3457 (package
3458 (name "java-commons-logging-minimal")
3459 (version "1.2")
3460 (source (origin
3461 (method url-fetch)
3462 (uri (string-append "mirror://apache/commons/logging/source/"
3463 "commons-logging-" version "-src.tar.gz"))
3464 (sha256
3465 (base32
3466 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
3467 (build-system ant-build-system)
3468 (arguments
3469 `(#:tests? #f ; avoid dependency on logging frameworks
3470 #:jar-name "commons-logging-minimal.jar"
3471 #:phases
3472 (modify-phases %standard-phases
3473 (add-after 'unpack 'delete-adapters-and-tests
3474 (lambda _
3475 ;; Delete all adapters except for NoOpLog, SimpleLog, and
3476 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
3477 ;; is used by applications; SimpleLog is the only actually usable
3478 ;; implementation that does not depend on another logging
3479 ;; framework.
3480 (for-each
3481 (lambda (file)
3482 (delete-file (string-append
3483 "src/main/java/org/apache/commons/logging/impl/" file)))
3484 (list "Jdk13LumberjackLogger.java"
3485 "WeakHashtable.java"
3486 "Log4JLogger.java"
3487 "ServletContextCleaner.java"
3488 "Jdk14Logger.java"
3489 "AvalonLogger.java"
3490 "LogKitLogger.java"))
3491 (delete-file-recursively "src/test")
3492 #t)))))
3493 (home-page "http://commons.apache.org/logging/")
3494 (synopsis "Common API for logging implementations")
3495 (description "The Logging package is a thin bridge between different
3496 logging implementations. A library that uses the commons-logging API can be
3497 used with any logging implementation at runtime.")
3498 (license license:asl2.0)))
3499
3500 ;; This is the last release of the 1.x series.
3501 (define-public java-mockito-1
3502 (package
3503 (name "java-mockito")
3504 (version "1.10.19")
3505 (source (origin
3506 (method url-fetch)
3507 (uri (string-append "http://repo1.maven.org/maven2/"
3508 "org/mockito/mockito-core/" version
3509 "/mockito-core-" version "-sources.jar"))
3510 (sha256
3511 (base32
3512 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
3513 (build-system ant-build-system)
3514 (arguments
3515 `(#:jar-name "mockito.jar"
3516 #:tests? #f ; no tests included
3517 ;; FIXME: patch-and-repack does not support jars, so we have to apply
3518 ;; patches in build phases.
3519 #:phases
3520 (modify-phases %standard-phases
3521 ;; Mockito was developed against a different version of hamcrest,
3522 ;; which does not require matcher implementations to provide an
3523 ;; implementation of the "describeMismatch" method. We add this
3524 ;; simple definition to pass the build with our version of hamcrest.
3525 (add-after 'unpack 'fix-hamcrest-build-error
3526 (lambda _
3527 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
3528 (("public Matcher getActualMatcher\\(\\) .*" line)
3529 (string-append "
3530 public void describeMismatch(Object item, Description description) {
3531 actualMatcher.describeMismatch(item, description);
3532 }"
3533 line)))
3534 #t))
3535 ;; Mockito bundles cglib. We have a cglib package, so let's use
3536 ;; that instead.
3537 (add-after 'unpack 'use-system-libraries
3538 (lambda _
3539 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
3540 (substitute* '("CGLIBHacker.java"
3541 "CglibMockMaker.java"
3542 "ClassImposterizer.java"
3543 "DelegatingMockitoMethodProxy.java"
3544 "MethodInterceptorFilter.java"
3545 "MockitoNamingPolicy.java"
3546 "SerializableMockitoMethodProxy.java"
3547 "SerializableNoOp.java")
3548 (("import org.mockito.cglib") "import net.sf.cglib")))
3549 #t)))))
3550 (inputs
3551 `(("java-junit" ,java-junit)
3552 ("java-objenesis" ,java-objenesis)
3553 ("java-cglib" ,java-cglib)
3554 ("java-hamcrest-core" ,java-hamcrest-core)))
3555 (home-page "http://mockito.org")
3556 (synopsis "Mockito is a mock library for Java")
3557 (description "Mockito is a mocking library for Java which lets you write
3558 tests with a clean and simple API. It generates mocks using reflection, and
3559 it records all mock invocations, including methods arguments.")
3560 (license license:asl2.0)))
3561
3562 (define-public java-httpcomponents-httpcore
3563 (package
3564 (name "java-httpcomponents-httpcore")
3565 (version "4.4.6")
3566 (source (origin
3567 (method url-fetch)
3568 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
3569 "source/httpcomponents-core-"
3570 version "-src.tar.gz"))
3571 (sha256
3572 (base32
3573 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
3574 (build-system ant-build-system)
3575 (arguments
3576 `(#:jar-name "httpcomponents-httpcore.jar"
3577 #:phases
3578 (modify-phases %standard-phases
3579 (add-after 'unpack 'chdir
3580 (lambda _ (chdir "httpcore") #t)))))
3581 (inputs
3582 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3583 ("java-commons-lang3" ,java-commons-lang3)))
3584 (native-inputs
3585 `(("java-junit" ,java-junit)
3586 ("java-mockito" ,java-mockito-1)))
3587 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
3588 (synopsis "Low level HTTP transport components")
3589 (description "HttpCore is a set of low level HTTP transport components
3590 that can be used to build custom client and server side HTTP services with a
3591 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3592 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3593 NIO.
3594
3595 This package provides the blocking I/O model library.")
3596 (license license:asl2.0)))
3597
3598 (define-public java-httpcomponents-httpcore-nio
3599 (package (inherit java-httpcomponents-httpcore)
3600 (name "java-httpcomponents-httpcore-nio")
3601 (arguments
3602 `(#:jar-name "httpcomponents-httpcore-nio.jar"
3603 #:phases
3604 (modify-phases %standard-phases
3605 (add-after 'unpack 'chdir
3606 (lambda _ (chdir "httpcore-nio") #t)))))
3607 (inputs
3608 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3609 ("java-hamcrest-core" ,java-hamcrest-core)
3610 ,@(package-inputs java-httpcomponents-httpcore)))
3611 (description "HttpCore is a set of low level HTTP transport components
3612 that can be used to build custom client and server side HTTP services with a
3613 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
3614 on the classic Java I/O and non-blocking, event driven I/O model based on Java
3615 NIO.
3616
3617 This package provides the non-blocking I/O model library based on Java
3618 NIO.")))
3619
3620 (define-public java-httpcomponents-httpcore-ab
3621 (package (inherit java-httpcomponents-httpcore)
3622 (name "java-httpcomponents-httpcore-ab")
3623 (arguments
3624 `(#:jar-name "httpcomponents-httpcore-ab.jar"
3625 #:phases
3626 (modify-phases %standard-phases
3627 (add-after 'unpack 'chdir
3628 (lambda _ (chdir "httpcore-ab") #t)))))
3629 (inputs
3630 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3631 ("java-commons-cli" ,java-commons-cli)
3632 ("java-hamcrest-core" ,java-hamcrest-core)
3633 ,@(package-inputs java-httpcomponents-httpcore)))
3634 (synopsis "Apache HttpCore benchmarking tool")
3635 (description "This package provides the HttpCore benchmarking tool. It is
3636 an Apache AB clone based on HttpCore.")))
3637
3638 (define-public java-httpcomponents-httpclient
3639 (package
3640 (name "java-httpcomponents-httpclient")
3641 (version "4.5.3")
3642 (source (origin
3643 (method url-fetch)
3644 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
3645 "source/httpcomponents-client-"
3646 version "-src.tar.gz"))
3647 (sha256
3648 (base32
3649 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
3650 (build-system ant-build-system)
3651 (arguments
3652 `(#:jar-name "httpcomponents-httpclient.jar"
3653 #:phases
3654 (modify-phases %standard-phases
3655 (add-after 'unpack 'chdir
3656 (lambda _ (chdir "httpclient") #t)))))
3657 (inputs
3658 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
3659 ("java-commons-codec" ,java-commons-codec)
3660 ("java-hamcrest-core" ,java-hamcrest-core)
3661 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3662 ("java-mockito" ,java-mockito-1)
3663 ("java-junit" ,java-junit)))
3664 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
3665 (synopsis "HTTP client library for Java")
3666 (description "Although the @code{java.net} package provides basic
3667 functionality for accessing resources via HTTP, it doesn't provide the full
3668 flexibility or functionality needed by many applications. @code{HttpClient}
3669 seeks to fill this void by providing an efficient, up-to-date, and
3670 feature-rich package implementing the client side of the most recent HTTP
3671 standards and recommendations.")
3672 (license license:asl2.0)))
3673
3674 (define-public java-httpcomponents-httpmime
3675 (package (inherit java-httpcomponents-httpclient)
3676 (name "java-httpcomponents-httpmime")
3677 (arguments
3678 `(#:jar-name "httpcomponents-httpmime.jar"
3679 #:phases
3680 (modify-phases %standard-phases
3681 (add-after 'unpack 'chdir
3682 (lambda _ (chdir "httpmime") #t)))))
3683 (inputs
3684 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
3685 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
3686 ("java-junit" ,java-junit)
3687 ("java-hamcrest-core" ,java-hamcrest-core)))))
3688
3689 (define-public java-commons-net
3690 (package
3691 (name "java-commons-net")
3692 (version "3.6")
3693 (source (origin
3694 (method url-fetch)
3695 (uri (string-append "mirror://apache/commons/net/source/"
3696 "commons-net-" version "-src.tar.gz"))
3697 (sha256
3698 (base32
3699 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
3700 (build-system ant-build-system)
3701 (arguments
3702 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
3703 ;; should be "resources/examples/examples.properties"), but gets "null"
3704 ;; instead.
3705 #:tests? #f
3706 #:jar-name "commons-net.jar"))
3707 (native-inputs
3708 `(("java-junit" ,java-junit)
3709 ("java-hamcrest-core" ,java-hamcrest-core)))
3710 (home-page "http://commons.apache.org/net/")
3711 (synopsis "Client library for many basic Internet protocols")
3712 (description "The Apache Commons Net library implements the client side of
3713 many basic Internet protocols. The purpose of the library is to provide
3714 fundamental protocol access, not higher-level abstractions.")
3715 (license license:asl2.0)))
3716
3717 (define-public java-jsch
3718 (package
3719 (name "java-jsch")
3720 (version "0.1.54")
3721 (source (origin
3722 (method url-fetch)
3723 (uri (string-append "mirror://sourceforge/jsch/jsch/"
3724 version "/jsch-" version ".zip"))
3725 (sha256
3726 (base32
3727 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
3728 (build-system ant-build-system)
3729 (arguments
3730 `(#:build-target "dist"
3731 #:tests? #f ; no tests included
3732 #:phases
3733 (modify-phases %standard-phases
3734 (replace 'install (install-jars "dist")))))
3735 (native-inputs
3736 `(("unzip" ,unzip)))
3737 (home-page "http://www.jcraft.com/jsch/")
3738 (synopsis "Pure Java implementation of SSH2")
3739 (description "JSch is a pure Java implementation of SSH2. JSch allows you
3740 to connect to an SSH server and use port forwarding, X11 forwarding, file
3741 transfer, etc., and you can integrate its functionality into your own Java
3742 programs.")
3743 (license license:bsd-3)))
3744
3745 (define-public java-commons-compress
3746 (package
3747 (name "java-commons-compress")
3748 (version "1.13")
3749 (source (origin
3750 (method url-fetch)
3751 (uri (string-append "mirror://apache/commons/compress/source/"
3752 "commons-compress-" version "-src.tar.gz"))
3753 (sha256
3754 (base32
3755 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
3756 (build-system ant-build-system)
3757 (arguments
3758 `(#:jar-name "commons-compress.jar"
3759 #:phases
3760 (modify-phases %standard-phases
3761 (add-after 'unpack 'delete-bad-tests
3762 (lambda _
3763 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
3764 ;; FIXME: These tests really should not fail. Maybe they are
3765 ;; indicative of problems with our Java packaging work.
3766
3767 ;; This test fails with a null pointer exception.
3768 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
3769 ;; This test fails to open test resources.
3770 (delete-file "archivers/zip/ExplodeSupportTest.java")
3771
3772 ;; FIXME: This test adds a dependency on powermock, which is hard to
3773 ;; package at this point.
3774 ;; https://github.com/powermock/powermock
3775 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
3776 #t)))))
3777 (inputs
3778 `(("java-junit" ,java-junit)
3779 ("java-hamcrest-core" ,java-hamcrest-core)
3780 ("java-mockito" ,java-mockito-1)
3781 ("java-xz" ,java-xz)))
3782 (home-page "https://commons.apache.org/proper/commons-compress/")
3783 (synopsis "Java library for working with compressed files")
3784 (description "The Apache Commons Compress library defines an API for
3785 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
3786 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
3787 (license license:asl2.0)))
3788
3789 (define-public java-commons-csv
3790 (package
3791 (name "java-commons-csv")
3792 (version "1.4")
3793 (source (origin
3794 (method url-fetch)
3795 (uri (string-append "mirror://apache/commons/csv/source/"
3796 "commons-csv-" version "-src.tar.gz"))
3797 (sha256
3798 (base32
3799 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
3800 (build-system ant-build-system)
3801 (arguments
3802 `(#:jar-name "commons-csv.jar"
3803 #:source-dir "src/main/java"
3804 #:tests? #f)); FIXME: requires java-h2
3805 (inputs
3806 `(("java-hamcrest-core" ,java-hamcrest-core)
3807 ("java-commons-io" ,java-commons-io)
3808 ("java-commons-lang3" ,java-commons-lang3)
3809 ("junit" ,java-junit)))
3810 (home-page "https://commons.apache.org/proper/commons-csv/")
3811 (synopsis "Read and write CSV documents")
3812 (description "Commons CSV reads and writes files in variations of the Comma
3813 Separated Value (CSV) format. The most common CSV formats are predefined in the
3814 CSVFormat class:
3815
3816 @itemize
3817 @item Microsoft Excel
3818 @item Informix UNLOAD
3819 @item Informix UNLOAD CSV
3820 @item MySQL
3821 @item RFC 4180
3822 @item TDF
3823 @end itemize
3824
3825 Custom formats can be created using a fluent style API.")
3826 (license license:asl2.0)))
3827
3828 (define-public java-osgi-annotation
3829 (package
3830 (name "java-osgi-annotation")
3831 (version "6.0.0")
3832 (source (origin
3833 (method url-fetch)
3834 (uri (string-append "https://repo1.maven.org/maven2/"
3835 "org/osgi/org.osgi.annotation/" version "/"
3836 "org.osgi.annotation-" version "-sources.jar"))
3837 (sha256
3838 (base32
3839 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
3840 (build-system ant-build-system)
3841 (arguments
3842 `(#:tests? #f ; no tests
3843 #:jar-name "osgi-annotation.jar"))
3844 (home-page "https://www.osgi.org")
3845 (synopsis "Annotation module of OSGi framework")
3846 (description
3847 "OSGi, for Open Services Gateway initiative framework, is a module system
3848 and service platform for the Java programming language. This package contains
3849 the OSGi annotation module, providing additional services to help dynamic
3850 components.")
3851 (license license:asl2.0)))
3852
3853 (define-public java-osgi-core
3854 (package
3855 (name "java-osgi-core")
3856 (version "6.0.0")
3857 (source (origin
3858 (method url-fetch)
3859 (uri (string-append "https://repo1.maven.org/maven2/"
3860 "org/osgi/org.osgi.core/" version "/"
3861 "org.osgi.core-" version "-sources.jar"))
3862 (sha256
3863 (base32
3864 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
3865 (build-system ant-build-system)
3866 (arguments
3867 `(#:tests? #f ; no tests
3868 #:jar-name "osgi-core.jar"))
3869 (inputs
3870 `(("java-osgi-annotation" ,java-osgi-annotation)))
3871 (home-page "https://www.osgi.org")
3872 (synopsis "Core module of OSGi framework")
3873 (description
3874 "OSGi, for Open Services Gateway initiative framework, is a module system
3875 and service platform for the Java programming language. This package contains
3876 the OSGi Core module.")
3877 (license license:asl2.0)))
3878
3879 (define-public java-osgi-service-event
3880 (package
3881 (name "java-osgi-service-event")
3882 (version "1.3.1")
3883 (source (origin
3884 (method url-fetch)
3885 (uri (string-append "https://repo1.maven.org/maven2/"
3886 "org/osgi/org.osgi.service.event/"
3887 version "/org.osgi.service.event-"
3888 version "-sources.jar"))
3889 (sha256
3890 (base32
3891 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
3892 (build-system ant-build-system)
3893 (arguments
3894 `(#:tests? #f ; no tests
3895 #:jar-name "osgi-service-event.jar"))
3896 (inputs
3897 `(("java-osgi-annotation" ,java-osgi-annotation)
3898 ("java-osgi-core" ,java-osgi-core)))
3899 (home-page "https://www.osgi.org")
3900 (synopsis "OSGi service event module")
3901 (description
3902 "OSGi, for Open Services Gateway initiative framework, is a module system
3903 and service platform for the Java programming language. This package contains
3904 the OSGi @code{org.osgi.service.event} module.")
3905 (license license:asl2.0)))
3906
3907 (define-public java-eclipse-osgi
3908 (package
3909 (name "java-eclipse-osgi")
3910 (version "3.11.3")
3911 (source (origin
3912 (method url-fetch)
3913 (uri (string-append "https://repo1.maven.org/maven2/"
3914 "org/eclipse/platform/org.eclipse.osgi/"
3915 version "/org.eclipse.osgi-"
3916 version "-sources.jar"))
3917 (sha256
3918 (base32
3919 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
3920 (build-system ant-build-system)
3921 (arguments
3922 `(#:tests? #f ; no tests included
3923 #:jar-name "eclipse-equinox-osgi.jar"))
3924 (inputs
3925 `(("java-osgi-annotation" ,java-osgi-annotation)))
3926 (home-page "http://www.eclipse.org/equinox/")
3927 (synopsis "Eclipse Equinox OSGi framework")
3928 (description "This package provides an implementation of the OSGi Core
3929 specification.")
3930 (license license:epl1.0)))
3931
3932 (define-public java-eclipse-equinox-common
3933 (package
3934 (name "java-eclipse-equinox-common")
3935 (version "3.8.0")
3936 (source (origin
3937 (method url-fetch)
3938 (uri (string-append "https://repo1.maven.org/maven2/"
3939 "org/eclipse/platform/org.eclipse.equinox.common/"
3940 version "/org.eclipse.equinox.common-"
3941 version "-sources.jar"))
3942 (sha256
3943 (base32
3944 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
3945 (build-system ant-build-system)
3946 (arguments
3947 `(#:tests? #f ; no tests included
3948 #:jar-name "eclipse-equinox-common.jar"))
3949 (inputs
3950 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
3951 (home-page "http://www.eclipse.org/equinox/")
3952 (synopsis "Common Eclipse runtime")
3953 (description "This package provides the common Eclipse runtime.")
3954 (license license:epl1.0)))
3955
3956 (define-public java-eclipse-core-jobs
3957 (package
3958 (name "java-eclipse-core-jobs")
3959 (version "3.8.0")
3960 (source (origin
3961 (method url-fetch)
3962 (uri (string-append "https://repo1.maven.org/maven2/"
3963 "org/eclipse/platform/org.eclipse.core.jobs/"
3964 version "/org.eclipse.core.jobs-"
3965 version "-sources.jar"))
3966 (sha256
3967 (base32
3968 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
3969 (build-system ant-build-system)
3970 (arguments
3971 `(#:tests? #f ; no tests included
3972 #:jar-name "eclipse-core-jobs.jar"))
3973 (inputs
3974 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
3975 ("java-eclipse-osgi" ,java-eclipse-osgi)))
3976 (home-page "http://www.eclipse.org/equinox/")
3977 (synopsis "Eclipse jobs mechanism")
3978 (description "This package provides the Eclipse jobs mechanism.")
3979 (license license:epl1.0)))
3980
3981 (define-public java-eclipse-equinox-registry
3982 (package
3983 (name "java-eclipse-equinox-registry")
3984 (version "3.6.100")
3985 (source (origin
3986 (method url-fetch)
3987 (uri (string-append "https://repo1.maven.org/maven2/"
3988 "org/eclipse/platform/org.eclipse.equinox.registry/"
3989 version "/org.eclipse.equinox.registry-"
3990 version "-sources.jar"))
3991 (sha256
3992 (base32
3993 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
3994 (build-system ant-build-system)
3995 (arguments
3996 `(#:tests? #f ; no tests included
3997 #:jar-name "eclipse-equinox-registry.jar"))
3998 (inputs
3999 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4000 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4001 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4002 (home-page "http://www.eclipse.org/equinox/")
4003 (synopsis "Eclipse extension registry support")
4004 (description "This package provides support for the Eclipse extension
4005 registry.")
4006 (license license:epl1.0)))
4007
4008 (define-public java-eclipse-equinox-app
4009 (package
4010 (name "java-eclipse-equinox-app")
4011 (version "1.3.400")
4012 (source (origin
4013 (method url-fetch)
4014 (uri (string-append "https://repo1.maven.org/maven2/"
4015 "org/eclipse/platform/org.eclipse.equinox.app/"
4016 version "/org.eclipse.equinox.app-"
4017 version "-sources.jar"))
4018 (sha256
4019 (base32
4020 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
4021 (build-system ant-build-system)
4022 (arguments
4023 `(#:tests? #f ; no tests included
4024 #:jar-name "eclipse-equinox-app.jar"))
4025 (inputs
4026 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4027 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4028 ("java-eclipse-osgi" ,java-eclipse-osgi)
4029 ("java-osgi-service-event" ,java-osgi-service-event)))
4030 (home-page "http://www.eclipse.org/equinox/")
4031 (synopsis "Equinox application container")
4032 (description "This package provides the Equinox application container for
4033 Eclipse.")
4034 (license license:epl1.0)))
4035
4036 (define-public java-eclipse-equinox-preferences
4037 (package
4038 (name "java-eclipse-equinox-preferences")
4039 (version "3.6.1")
4040 (source (origin
4041 (method url-fetch)
4042 (uri (string-append "https://repo1.maven.org/maven2/"
4043 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4044 version "/org.eclipse.equinox.preferences-"
4045 version "-sources.jar"))
4046 (sha256
4047 (base32
4048 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
4049 (build-system ant-build-system)
4050 (arguments
4051 `(#:tests? #f ; no tests included
4052 #:jar-name "eclipse-equinox-preferences.jar"))
4053 (inputs
4054 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4055 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4056 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4057 (home-page "http://www.eclipse.org/equinox/")
4058 (synopsis "Eclipse preferences mechanism")
4059 (description "This package provides the Eclipse preferences mechanism with
4060 the module @code{org.eclipse.equinox.preferences}.")
4061 (license license:epl1.0)))
4062
4063 (define-public java-eclipse-core-contenttype
4064 (package
4065 (name "java-eclipse-core-contenttype")
4066 (version "3.5.100")
4067 (source (origin
4068 (method url-fetch)
4069 (uri (string-append "https://repo1.maven.org/maven2/"
4070 "org/eclipse/platform/org.eclipse.core.contenttype/"
4071 version "/org.eclipse.core.contenttype-"
4072 version "-sources.jar"))
4073 (sha256
4074 (base32
4075 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
4076 (build-system ant-build-system)
4077 (arguments
4078 `(#:tests? #f ; no tests included
4079 #:jar-name "eclipse-core-contenttype.jar"))
4080 (inputs
4081 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4082 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4083 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4084 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4085 (home-page "http://www.eclipse.org/")
4086 (synopsis "Eclipse content mechanism")
4087 (description "This package provides the Eclipse content mechanism in the
4088 @code{org.eclipse.core.contenttype} module.")
4089 (license license:epl1.0)))
4090
4091 (define-public java-eclipse-core-runtime
4092 (package
4093 (name "java-eclipse-core-runtime")
4094 (version "3.12.0")
4095 (source (origin
4096 (method url-fetch)
4097 (uri (string-append "https://repo1.maven.org/maven2/"
4098 "org/eclipse/platform/org.eclipse.core.runtime/"
4099 version "/org.eclipse.core.runtime-"
4100 version "-sources.jar"))
4101 (sha256
4102 (base32
4103 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
4104 (build-system ant-build-system)
4105 (arguments
4106 `(#:tests? #f ; no tests included
4107 #:jar-name "eclipse-core-runtime.jar"))
4108 (inputs
4109 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4110 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4111 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4112 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4113 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4114 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4115 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4116 (home-page "https://www.eclipse.org/")
4117 (synopsis "Eclipse core runtime")
4118 (description "This package provides the Eclipse core runtime with the
4119 module @code{org.eclipse.core.runtime}.")
4120 (license license:epl1.0)))
4121
4122 (define-public java-eclipse-core-filesystem
4123 (package
4124 (name "java-eclipse-core-filesystem")
4125 (version "1.6.1")
4126 (source (origin
4127 (method url-fetch)
4128 (uri (string-append "https://repo1.maven.org/maven2/"
4129 "org/eclipse/platform/org.eclipse.core.filesystem/"
4130 version "/org.eclipse.core.filesystem-"
4131 version "-sources.jar"))
4132 (sha256
4133 (base32
4134 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
4135 (build-system ant-build-system)
4136 (arguments
4137 `(#:tests? #f ; no tests included
4138 #:jar-name "eclipse-core-filesystem.jar"))
4139 (inputs
4140 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4141 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4142 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4143 (home-page "https://www.eclipse.org/")
4144 (synopsis "Eclipse core file system")
4145 (description "This package provides the Eclipse core file system with the
4146 module @code{org.eclipse.core.filesystem}.")
4147 (license license:epl1.0)))
4148
4149 (define-public java-eclipse-core-expressions
4150 (package
4151 (name "java-eclipse-core-expressions")
4152 (version "3.5.100")
4153 (source (origin
4154 (method url-fetch)
4155 (uri (string-append "https://repo1.maven.org/maven2/"
4156 "org/eclipse/platform/org.eclipse.core.expressions/"
4157 version "/org.eclipse.core.expressions-"
4158 version "-sources.jar"))
4159 (sha256
4160 (base32
4161 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
4162 (build-system ant-build-system)
4163 (arguments
4164 `(#:tests? #f ; no tests included
4165 #:jar-name "eclipse-core-expressions.jar"))
4166 (inputs
4167 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4168 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4169 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4170 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4171 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4172 (home-page "https://www.eclipse.org/")
4173 (synopsis "Eclipse core expression language")
4174 (description "This package provides the Eclipse core expression language
4175 with the @code{org.eclipse.core.expressions} module.")
4176 (license license:epl1.0)))
4177
4178 (define-public java-eclipse-core-variables
4179 (package
4180 (name "java-eclipse-core-variables")
4181 (version "3.3.0")
4182 (source (origin
4183 (method url-fetch)
4184 (uri (string-append "https://repo1.maven.org/maven2/"
4185 "org/eclipse/platform/org.eclipse.core.variables/"
4186 version "/org.eclipse.core.variables-"
4187 version "-sources.jar"))
4188 (sha256
4189 (base32
4190 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
4191 (build-system ant-build-system)
4192 (arguments
4193 `(#:tests? #f ; no tests included
4194 #:jar-name "eclipse-core-variables.jar"))
4195 (inputs
4196 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4197 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4198 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4199 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4200 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4201 (home-page "https://www.eclipse.org/platform")
4202 (synopsis "Eclipse core variables")
4203 (description "This package provides the Eclipse core variables module
4204 @code{org.eclipse.core.variables}.")
4205 (license license:epl1.0)))
4206
4207 (define-public java-eclipse-ant-core
4208 (package
4209 (name "java-eclipse-ant-core")
4210 (version "3.4.100")
4211 (source (origin
4212 (method url-fetch)
4213 (uri (string-append "https://repo1.maven.org/maven2/"
4214 "org/eclipse/platform/org.eclipse.ant.core/"
4215 version "/org.eclipse.ant.core-"
4216 version "-sources.jar"))
4217 (sha256
4218 (base32
4219 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
4220 (build-system ant-build-system)
4221 (arguments
4222 `(#:tests? #f ; no tests included
4223 #:jar-name "eclipse-ant-core.jar"))
4224 (inputs
4225 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4226 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4227 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4228 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4229 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4230 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4231 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
4232 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4233 (home-page "https://www.eclipse.org/platform")
4234 (synopsis "Ant build tool core libraries")
4235 (description "This package provides the ant build tool core libraries with
4236 the module @code{org.eclipse.ant.core}.")
4237 (license license:epl1.0)))
4238
4239 (define-public java-eclipse-core-resources
4240 (package
4241 (name "java-eclipse-core-resources")
4242 (version "3.11.1")
4243 (source (origin
4244 (method url-fetch)
4245 (uri (string-append "https://repo1.maven.org/maven2/"
4246 "org/eclipse/platform/org.eclipse.core.resources/"
4247 version "/org.eclipse.core.resources-"
4248 version "-sources.jar"))
4249 (sha256
4250 (base32
4251 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
4252 (build-system ant-build-system)
4253 (arguments
4254 `(#:tests? #f ; no tests included
4255 #:jar-name "eclipse-core-resources.jar"))
4256 (inputs
4257 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4258 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4259 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4260 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4261 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
4262 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4263 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4264 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4265 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
4266 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4267 (home-page "https://www.eclipse.org/")
4268 (synopsis "Eclipse core resource management")
4269 (description "This package provides the Eclipse core resource management
4270 module @code{org.eclipse.core.resources}.")
4271 (license license:epl1.0)))
4272
4273 (define-public java-eclipse-compare-core
4274 (package
4275 (name "java-eclipse-compare-core")
4276 (version "3.6.0")
4277 (source (origin
4278 (method url-fetch)
4279 (uri (string-append "https://repo1.maven.org/maven2/"
4280 "org/eclipse/platform/org.eclipse.compare.core/"
4281 version "/org.eclipse.compare.core-"
4282 version "-sources.jar"))
4283 (sha256
4284 (base32
4285 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
4286 (build-system ant-build-system)
4287 (arguments
4288 `(#:tests? #f ; no tests included
4289 #:jar-name "eclipse-compare-core.jar"))
4290 (inputs
4291 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4292 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4293 ("java-eclipse-osgi" ,java-eclipse-osgi)
4294 ("java-icu4j" ,java-icu4j)))
4295 (home-page "https://www.eclipse.org/")
4296 (synopsis "Eclipse core compare support")
4297 (description "This package provides the Eclipse core compare support
4298 module @code{org.eclipse.compare.core}.")
4299 (license license:epl1.0)))
4300
4301 (define-public java-eclipse-team-core
4302 (package
4303 (name "java-eclipse-team-core")
4304 (version "3.8.0")
4305 (source (origin
4306 (method url-fetch)
4307 (uri (string-append "https://repo1.maven.org/maven2/"
4308 "org/eclipse/platform/org.eclipse.team.core/"
4309 version "/org.eclipse.team.core-"
4310 version "-sources.jar"))
4311 (sha256
4312 (base32
4313 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
4314 (build-system ant-build-system)
4315 (arguments
4316 `(#:tests? #f ; no tests included
4317 #:jar-name "eclipse-team-core.jar"))
4318 (inputs
4319 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
4320 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4321 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4322 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4323 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4324 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4325 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4326 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4327 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4328 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4329 (home-page "https://www.eclipse.org/platform")
4330 (synopsis "Eclipse team support core")
4331 (description "This package provides the Eclipse team support core module
4332 @code{org.eclipse.team.core}.")
4333 (license license:epl1.0)))
4334
4335 (define-public java-eclipse-core-commands
4336 (package
4337 (name "java-eclipse-core-commands")
4338 (version "3.8.1")
4339 (source (origin
4340 (method url-fetch)
4341 (uri (string-append "https://repo1.maven.org/maven2/"
4342 "org/eclipse/platform/org.eclipse.core.commands/"
4343 version "/org.eclipse.core.commands-"
4344 version "-sources.jar"))
4345 (sha256
4346 (base32
4347 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
4348 (build-system ant-build-system)
4349 (arguments
4350 `(#:tests? #f ; no tests included
4351 #:jar-name "eclipse-core-commands.jar"))
4352 (inputs
4353 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
4354 (home-page "https://www.eclipse.org/platform")
4355 (synopsis "Eclipse core commands")
4356 (description "This package provides Eclipse core commands in the module
4357 @code{org.eclipse.core.commands}.")
4358 (license license:epl1.0)))
4359
4360 (define-public java-eclipse-text
4361 (package
4362 (name "java-eclipse-text")
4363 (version "3.6.0")
4364 (source (origin
4365 (method url-fetch)
4366 (uri (string-append "https://repo1.maven.org/maven2/"
4367 "org/eclipse/platform/org.eclipse.text/"
4368 version "/org.eclipse.text-"
4369 version "-sources.jar"))
4370 (sha256
4371 (base32
4372 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
4373 (build-system ant-build-system)
4374 (arguments
4375 `(#:tests? #f ; no tests included
4376 #:jar-name "eclipse-text.jar"
4377 #:phases
4378 (modify-phases %standard-phases
4379 ;; When creating a new category we must make sure that the new list
4380 ;; matches List<Position>. By default it seems to be too generic
4381 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
4382 ;; Without this we get this error:
4383 ;;
4384 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
4385 ;; error: method put in interface Map<K,V> cannot be applied to given types;
4386 ;; [javac] fPositions.put(category, new ArrayList<>());
4387 ;; [javac] ^
4388 ;; [javac] required: String,List<Position>
4389 ;; [javac] found: String,ArrayList<Object>
4390 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
4391 ;; to List<Position> by method invocation conversion
4392 ;; [javac] where K,V are type-variables:
4393 ;; [javac] K extends Object declared in interface Map
4394 ;; [javac] V extends Object declared in interface Map
4395 ;;
4396 ;; I don't know if this is a good fix. I suspect it is not, but it
4397 ;; seems to work.
4398 (add-after 'unpack 'fix-compilation-error
4399 (lambda _
4400 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
4401 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
4402 "Positions.put(category, new ArrayList<Position>());"))
4403 #t)))))
4404 (inputs
4405 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4406 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
4407 ("java-icu4j" ,java-icu4j)))
4408 (home-page "http://www.eclipse.org/platform")
4409 (synopsis "Eclipse text library")
4410 (description "Platform Text is part of the Platform UI project and
4411 provides the basic building blocks for text and text editors within Eclipse
4412 and contributes the Eclipse default text editor.")
4413 (license license:epl1.0)))
4414
4415 (define-public java-eclipse-jdt-core
4416 (package
4417 (name "java-eclipse-jdt-core")
4418 (version "3.12.3")
4419 (source (origin
4420 (method url-fetch)
4421 (uri (string-append "https://repo1.maven.org/maven2/"
4422 "org/eclipse/jdt/org.eclipse.jdt.core/"
4423 version "/org.eclipse.jdt.core-"
4424 version "-sources.jar"))
4425 (sha256
4426 (base32
4427 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
4428 (build-system ant-build-system)
4429 (arguments
4430 `(#:tests? #f ; no tests included
4431 #:jar-name "eclipse-jdt-core.jar"))
4432 (inputs
4433 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4434 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
4435 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4436 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
4437 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4438 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4439 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4440 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4441 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4442 ("java-eclipse-osgi" ,java-eclipse-osgi)
4443 ("java-eclipse-text" ,java-eclipse-text)))
4444 (home-page "https://www.eclipse.org/jdt")
4445 (synopsis "Java development tools core libraries")
4446 (description "This package provides the core libraries of the Eclipse Java
4447 development tools.")
4448 (license license:epl1.0)))
4449
4450 (define-public java-javax-mail
4451 (package
4452 (name "java-javax-mail")
4453 (version "1.5.6")
4454 (source (origin
4455 (method url-fetch)
4456 (uri (string-append "https://repo1.maven.org/maven2/"
4457 "com/sun/mail/javax.mail/"
4458 version "/javax.mail-"
4459 version "-sources.jar"))
4460 (sha256
4461 (base32
4462 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
4463 (build-system ant-build-system)
4464 (arguments
4465 `(#:tests? #f ; no tests
4466 #:jar-name "javax-mail.jar"))
4467 (home-page "https://javamail.java.net")
4468 (synopsis "Reference implementation of the JavaMail API")
4469 (description
4470 "This package provides versions of the JavaMail API implementation, IMAP,
4471 SMTP, and POP3 service providers, some examples, and documentation for the
4472 JavaMail API.")
4473 ;; GPLv2 only with "classpath exception".
4474 (license license:gpl2)))
4475
4476 (define-public java-log4j-api
4477 (package
4478 (name "java-log4j-api")
4479 (version "2.4.1")
4480 (source (origin
4481 (method url-fetch)
4482 (uri (string-append "mirror://apache/logging/log4j/" version
4483 "/apache-log4j-" version "-src.tar.gz"))
4484 (sha256
4485 (base32
4486 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
4487 (build-system ant-build-system)
4488 (arguments
4489 `(#:tests? #f ; tests require unpackaged software
4490 #:jar-name "log4j-api.jar"
4491 #:make-flags
4492 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4493 "/share/java"))
4494 #:phases
4495 (modify-phases %standard-phases
4496 (add-after 'unpack 'enter-dir
4497 (lambda _ (chdir "log4j-api") #t))
4498 ;; FIXME: The tests require additional software that has not been
4499 ;; packaged yet, such as
4500 ;; * org.apache.maven
4501 ;; * org.apache.felix
4502 (add-after 'enter-dir 'delete-tests
4503 (lambda _ (delete-file-recursively "src/test") #t)))))
4504 (inputs
4505 `(("java-osgi-core" ,java-osgi-core)
4506 ("java-hamcrest-core" ,java-hamcrest-core)
4507 ("java-junit" ,java-junit)))
4508 (home-page "http://logging.apache.org/log4j/2.x/")
4509 (synopsis "API module of the Log4j logging framework for Java")
4510 (description
4511 "This package provides the API module of the Log4j logging framework for
4512 Java.")
4513 (license license:asl2.0)))
4514
4515 (define-public java-log4j-core
4516 (package
4517 (inherit java-log4j-api)
4518 (name "java-log4j-core")
4519 (inputs
4520 `(("java-osgi-core" ,java-osgi-core)
4521 ("java-hamcrest-core" ,java-hamcrest-core)
4522 ("java-log4j-api" ,java-log4j-api)
4523 ("java-mail" ,java-mail)
4524 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
4525 ("java-lmax-disruptor" ,java-lmax-disruptor)
4526 ("java-kafka" ,java-kafka-clients)
4527 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
4528 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
4529 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
4530 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
4531 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
4532 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
4533 ("java-commons-compress" ,java-commons-compress)
4534 ("java-commons-csv" ,java-commons-csv)
4535 ("java-jeromq" ,java-jeromq)
4536 ("java-junit" ,java-junit)))
4537 (native-inputs
4538 `(("hamcrest" ,java-hamcrest-all)
4539 ("java-commons-io" ,java-commons-io)
4540 ("java-commons-lang3" ,java-commons-lang3)
4541 ("slf4j" ,java-slf4j-api)))
4542 (arguments
4543 `(#:tests? #f ; tests require more dependencies
4544 #:test-dir "src/test"
4545 #:source-dir "src/main/java"
4546 #:jar-name "log4j-core.jar"
4547 #:jdk ,icedtea-8
4548 #:make-flags
4549 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
4550 "/share/java"))
4551 #:phases
4552 (modify-phases %standard-phases
4553 (add-after 'unpack 'enter-dir
4554 (lambda _ (chdir "log4j-core") #t)))))
4555 (synopsis "Core component of the Log4j framework")
4556 (description "This package provides the core component of the Log4j
4557 logging framework for Java.")))
4558
4559 (define-public java-log4j-1.2-api
4560 (package
4561 (inherit java-log4j-api)
4562 (name "java-log4j-1.2-api")
4563 (arguments
4564 `(#:jar-name "java-log4j-1.2-api.jar"
4565 #:source-dir "log4j-1.2-api/src/main/java"
4566 #:jdk ,icedtea-8
4567 ;; Tests require maven-model (and other maven subprojects), which is a
4568 ;; cyclic dependency.
4569 #:tests? #f))
4570 (inputs
4571 `(("log4j-api" ,java-log4j-api)
4572 ("log4j-core" ,java-log4j-core)
4573 ("osgi-core" ,java-osgi-core)
4574 ("eclipse-osgi" ,java-eclipse-osgi)
4575 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
4576
4577 (define-public java-commons-cli
4578 (package
4579 (name "java-commons-cli")
4580 (version "1.3.1")
4581 (source (origin
4582 (method url-fetch)
4583 (uri (string-append "mirror://apache/commons/cli/source/"
4584 "commons-cli-" version "-src.tar.gz"))
4585 (sha256
4586 (base32
4587 "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
4588 (build-system ant-build-system)
4589 ;; TODO: javadoc
4590 (arguments
4591 `(#:jar-name "commons-cli.jar"))
4592 (native-inputs
4593 `(("java-junit" ,java-junit)
4594 ("java-hamcrest-core" ,java-hamcrest-core)))
4595 (home-page "http://commons.apache.org/cli/")
4596 (synopsis "Command line arguments and options parsing library")
4597 (description "The Apache Commons CLI library provides an API for parsing
4598 command line options passed to programs. It is also able to print help
4599 messages detailing the options available for a command line tool.
4600
4601 Commons CLI supports different types of options:
4602
4603 @itemize
4604 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
4605 @item GNU like long options (ie. du --human-readable --max-depth=1)
4606 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
4607 @item Short options with value attached (ie. gcc -O2 foo.c)
4608 @item long options with single hyphen (ie. ant -projecthelp)
4609 @end itemize
4610
4611 This is a part of the Apache Commons Project.")
4612 (license license:asl2.0)))
4613
4614 (define-public java-commons-codec
4615 (package
4616 (name "java-commons-codec")
4617 (version "1.10")
4618 (source (origin
4619 (method url-fetch)
4620 (uri (string-append "mirror://apache/commons/codec/source/"
4621 "commons-codec-" version "-src.tar.gz"))
4622 (sha256
4623 (base32
4624 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
4625 (build-system ant-build-system)
4626 (outputs '("out" "doc"))
4627 (arguments
4628 `(#:test-target "test"
4629 #:make-flags
4630 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4631 (junit (assoc-ref %build-inputs "java-junit")))
4632 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4633 (string-append "-Dhamcrest.jar=" hamcrest
4634 "/share/java/hamcrest-core.jar")
4635 ;; Do not append version to jar.
4636 "-Dfinal.name=commons-codec"))
4637 #:phases
4638 (modify-phases %standard-phases
4639 (add-after 'build 'build-javadoc ant-build-javadoc)
4640 (replace 'install (install-jars "dist"))
4641 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4642 (native-inputs
4643 `(("java-junit" ,java-junit)
4644 ("java-hamcrest-core" ,java-hamcrest-core)))
4645 (home-page "http://commons.apache.org/codec/")
4646 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
4647 (description "The codec package contains simple encoder and decoders for
4648 various formats such as Base64 and Hexadecimal. In addition to these widely
4649 used encoders and decoders, the codec package also maintains a collection of
4650 phonetic encoding utilities.
4651
4652 This is a part of the Apache Commons Project.")
4653 (license license:asl2.0)))
4654
4655 (define-public java-commons-daemon
4656 (package
4657 (name "java-commons-daemon")
4658 (version "1.0.15")
4659 (source (origin
4660 (method url-fetch)
4661 (uri (string-append "mirror://apache/commons/daemon/source/"
4662 "commons-daemon-" version "-src.tar.gz"))
4663 (sha256
4664 (base32
4665 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
4666 (build-system ant-build-system)
4667 (arguments
4668 `(#:test-target "test"
4669 #:phases
4670 (modify-phases %standard-phases
4671 (add-after 'build 'build-javadoc ant-build-javadoc)
4672 (replace 'install (install-jars "dist"))
4673 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
4674 (native-inputs
4675 `(("java-junit" ,java-junit)))
4676 (home-page "http://commons.apache.org/daemon/")
4677 (synopsis "Library to launch Java applications as daemons")
4678 (description "The Daemon package from Apache Commons can be used to
4679 implement Java applications which can be launched as daemons. For example the
4680 program will be notified about a shutdown so that it can perform cleanup tasks
4681 before its process of execution is destroyed by the operation system.
4682
4683 This package contains the Java library. You will also need the actual binary
4684 for your architecture which is provided by the jsvc package.
4685
4686 This is a part of the Apache Commons Project.")
4687 (license license:asl2.0)))
4688
4689 (define-public java-javaewah
4690 (package
4691 (name "java-javaewah")
4692 (version "1.1.6")
4693 (source (origin
4694 (method url-fetch)
4695 (uri (string-append "https://github.com/lemire/javaewah/"
4696 "archive/JavaEWAH-" version ".tar.gz"))
4697 (sha256
4698 (base32
4699 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
4700 (build-system ant-build-system)
4701 (arguments `(#:jar-name "javaewah.jar"))
4702 (inputs
4703 `(("java-junit" ,java-junit)
4704 ("java-hamcrest-core" ,java-hamcrest-core)))
4705 (home-page "https://github.com/lemire/javaewah")
4706 (synopsis "Compressed alternative to the Java @code{BitSet} class")
4707 (description "This is a word-aligned compressed variant of the Java
4708 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
4709 compression scheme. It can be used to implement bitmap indexes.
4710
4711 The goal of word-aligned compression is not to achieve the best compression,
4712 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
4713 cycles, maybe at the expense of storage. However, the EWAH scheme is always
4714 more efficient storage-wise than an uncompressed bitmap (as implemented in the
4715 @code{BitSet} class by Sun).")
4716 ;; GPL2.0 derivates are explicitly allowed.
4717 (license license:asl2.0)))
4718
4719 (define-public java-slf4j-api
4720 (package
4721 (name "java-slf4j-api")
4722 (version "1.7.25")
4723 (source (origin
4724 (method url-fetch)
4725 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
4726 version ".tar.gz"))
4727 (sha256
4728 (base32
4729 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
4730 (modules '((guix build utils)))
4731 ;; Delete bundled jars.
4732 (snippet
4733 '(begin
4734 (for-each delete-file (find-files "." "\\.jar$"))
4735 #t))))
4736 (build-system ant-build-system)
4737 (arguments
4738 `(#:jar-name "slf4j-api.jar"
4739 #:source-dir "slf4j-api/src/main"
4740 #:test-dir "slf4j-api/src/test"
4741 #:phases
4742 (modify-phases %standard-phases
4743 (add-after 'build 'regenerate-jar
4744 (lambda _
4745 ;; pom.xml ignores these files in the jar creation process. If we don't,
4746 ;; we get the error "This code should have never made it into slf4j-api.jar"
4747 (delete-file-recursively "build/classes/org/slf4j/impl")
4748 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
4749 "build/classes" "."))))
4750 (add-before 'check 'dont-test-abstract-classes
4751 (lambda _
4752 ;; abstract classes are not meant to be run with junit
4753 (substitute* "build.xml"
4754 (("<include name=\"\\*\\*/\\*Test.java\" />")
4755 (string-append "<include name=\"**/*Test.java\" />"
4756 "<exclude name=\"**/MultithreadedInitializationTest"
4757 ".java\" />"))))))))
4758 (inputs
4759 `(("java-junit" ,java-junit)
4760 ("java-hamcrest-core" ,java-hamcrest-core)))
4761 (home-page "https://www.slf4j.org/")
4762 (synopsis "Simple logging facade for Java")
4763 (description "The Simple Logging Facade for Java (SLF4J) serves as a
4764 simple facade or abstraction for various logging
4765 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
4766 allowing the end user to plug in the desired logging framework at deployment
4767 time.")
4768 (license license:expat)))
4769
4770 (define-public java-slf4j-simple
4771 (package
4772 (name "java-slf4j-simple")
4773 (version "1.7.25")
4774 (source (package-source java-slf4j-api))
4775 (build-system ant-build-system)
4776 (arguments
4777 `(#:jar-name "slf4j-simple.jar"
4778 #:source-dir "slf4j-simple/src/main"
4779 #:test-dir "slf4j-simple/src/test"
4780 #:phases
4781 (modify-phases %standard-phases
4782 ;; The tests need some test classes from slf4j-api
4783 (add-before 'check 'build-slf4j-api-test-helpers
4784 (lambda _
4785 ;; Add current dir to CLASSPATH ...
4786 (setenv "CLASSPATH"
4787 (string-append (getcwd) ":" (getenv "CLASSPATH")))
4788 ;; ... and build test helper classes here:
4789 (zero?
4790 (apply system*
4791 `("javac" "-d" "."
4792 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
4793 (inputs
4794 `(("java-junit" ,java-junit)
4795 ("java-hamcrest-core" ,java-hamcrest-core)
4796 ("java-slf4j-api" ,java-slf4j-api)))
4797 (home-page "https://www.slf4j.org/")
4798 (synopsis "Simple implementation of simple logging facade for Java")
4799 (description "SLF4J binding for the Simple implementation, which outputs
4800 all events to System.err. Only messages of level INFO and higher are
4801 printed.")
4802 (license license:expat)))
4803
4804 (define-public antlr2
4805 (package
4806 (name "antlr2")
4807 (version "2.7.7")
4808 (source (origin
4809 (method url-fetch)
4810 (uri (string-append "http://www.antlr2.org/download/antlr-"
4811 version ".tar.gz"))
4812 (sha256
4813 (base32
4814 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
4815 (modules '((guix build utils)))
4816 (snippet
4817 '(begin
4818 (delete-file "antlr.jar")
4819 (substitute* "lib/cpp/antlr/CharScanner.hpp"
4820 (("#include <map>")
4821 (string-append
4822 "#include <map>\n"
4823 "#define EOF (-1)\n"
4824 "#include <strings.h>")))
4825 (substitute* "configure"
4826 (("/bin/sh") "sh"))
4827 #t))))
4828 (build-system gnu-build-system)
4829 (arguments
4830 `(#:tests? #f ; no test target
4831 #:imported-modules ((guix build ant-build-system)
4832 (guix build syscalls)
4833 ,@%gnu-build-system-modules)
4834 #:modules (((guix build ant-build-system) #:prefix ant:)
4835 (guix build gnu-build-system)
4836 (guix build utils))
4837 #:phases
4838 (modify-phases %standard-phases
4839 (add-after 'install 'strip-jar-timestamps
4840 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
4841 (add-after 'configure 'fix-bin-ls
4842 (lambda _
4843 (substitute* (find-files "." "Makefile")
4844 (("/bin/ls") "ls"))
4845 #t)))))
4846 (native-inputs
4847 `(("which" ,which)
4848 ("zip" ,zip)
4849 ("java" ,icedtea "jdk")))
4850 (inputs
4851 `(("java" ,icedtea)))
4852 (home-page "http://www.antlr2.org")
4853 (synopsis "Framework for constructing recognizers, compilers, and translators")
4854 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
4855 is a language tool that provides a framework for constructing recognizers,
4856 compilers, and translators from grammatical descriptions containing Java, C#,
4857 C++, or Python actions. ANTLR provides excellent support for tree construction,
4858 tree walking, and translation.")
4859 (license license:public-domain)))
4860
4861 (define-public java-stringtemplate-3
4862 (package
4863 (name "java-stringtemplate")
4864 (version "3.2.1")
4865 (source (origin
4866 (method url-fetch)
4867 (uri (string-append "https://github.com/antlr/website-st4/raw/"
4868 "gh-pages/download/stringtemplate-"
4869 version ".tar.gz"))
4870 (sha256
4871 (base32
4872 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
4873 (build-system ant-build-system)
4874 (arguments
4875 `(#:jar-name (string-append ,name "-" ,version ".jar")
4876 #:test-dir "test"
4877 #:modules ((guix build ant-build-system)
4878 (guix build utils)
4879 (srfi srfi-1))
4880 #:phases
4881 (modify-phases %standard-phases
4882 (add-before 'check 'fix-tests
4883 (lambda _
4884 (substitute* "build.xml"
4885 (("\\$\\{test.home\\}/java")
4886 "${test.home}/org"))
4887 #t))
4888 (add-before 'build 'generate-grammar
4889 (lambda _
4890 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
4891 (every (lambda (file)
4892 (format #t "~a\n" file)
4893 (zero? (system* "antlr" file)))
4894 '("template.g" "angle.bracket.template.g" "action.g"
4895 "eval.g" "group.g" "interface.g"))))))))
4896 (native-inputs
4897 `(("antlr" ,antlr2)
4898 ("java-junit" ,java-junit)))
4899 (home-page "http://www.stringtemplate.org")
4900 (synopsis "Template engine to generate formatted text output")
4901 (description "StringTemplate is a java template engine (with ports for C#,
4902 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
4903 or any other formatted text output. StringTemplate is particularly good at
4904 code generators, multiple site skins, and internationalization / localization.
4905 StringTemplate also powers ANTLR.")
4906 (license license:bsd-3)))
4907
4908 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
4909 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
4910 ;; files and uses antlr3 at runtime. The latest version requires a recent version
4911 ;; of antlr3 at runtime.
4912 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
4913 ;; This version of ST4 is sufficient for the latest antlr3.
4914 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
4915 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
4916 ;; against the latest ST4.
4917 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
4918 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
4919 ;; only grammar files with the antlr2 syntax.
4920 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
4921
4922 (define-public java-stringtemplate
4923 (package (inherit java-stringtemplate-3)
4924 (name "java-stringtemplate")
4925 (version "4.0.8")
4926 (source (origin
4927 (method url-fetch)
4928 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
4929 version ".tar.gz"))
4930 (file-name (string-append name "-" version ".tar.gz"))
4931 (sha256
4932 (base32
4933 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
4934 (build-system ant-build-system)
4935 (arguments
4936 `(#:jar-name (string-append ,name "-" ,version ".jar")
4937 #:tests? #f ; FIXME: tests fail for unknown reasons
4938 #:test-dir "test"
4939 #:modules ((guix build ant-build-system)
4940 (guix build utils)
4941 (srfi srfi-1))
4942 #:phases
4943 (modify-phases %standard-phases
4944 (add-before 'check 'fix-test-target
4945 (lambda _
4946 (substitute* "build.xml"
4947 (("\\$\\{test.home\\}/java") "${test.home}/")
4948 (("\\*Test.java") "Test*.java"))
4949 #t))
4950 (add-before 'build 'generate-grammar
4951 (lambda _
4952 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
4953 (every (lambda (file)
4954 (format #t "~a\n" file)
4955 (zero? (system* "antlr3" file)))
4956 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
4957 (inputs
4958 `(("antlr3" ,antlr3-bootstrap)
4959 ("antlr2" ,antlr2)
4960 ("java-stringtemplate" ,java-stringtemplate-3)
4961 ("java-junit" ,java-junit)))))
4962
4963 (define java-stringtemplate-4.0.6
4964 (package (inherit java-stringtemplate)
4965 (name "java-stringtemplate")
4966 (version "4.0.6")
4967 (source (origin
4968 (method url-fetch)
4969 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
4970 version ".tar.gz"))
4971 (file-name (string-append name "-" version ".tar.gz"))
4972 (sha256
4973 (base32
4974 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
4975 (inputs
4976 `(("antlr3" ,antlr3-3.3)
4977 ("antlr2" ,antlr2)
4978 ("java-stringtemplate" ,java-stringtemplate-3)))))
4979
4980 (define-public antlr3
4981 (package
4982 (name "antlr3")
4983 (version "3.5.2")
4984 (source (origin
4985 (method url-fetch)
4986 (uri (string-append "https://github.com/antlr/antlr3/archive/"
4987 version ".tar.gz"))
4988 (file-name (string-append name "-" version ".tar.gz"))
4989 (sha256
4990 (base32
4991 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4992 (build-system ant-build-system)
4993 (arguments
4994 `(#:jar-name (string-append ,name "-" ,version ".jar")
4995 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
4996 #:tests? #f
4997 #:phases
4998 (modify-phases %standard-phases
4999 (add-after 'install 'bin-install
5000 (lambda* (#:key inputs outputs #:allow-other-keys)
5001 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5002 (bin (string-append (assoc-ref outputs "out") "/bin")))
5003 (mkdir-p bin)
5004 (with-output-to-file (string-append bin "/antlr3")
5005 (lambda _
5006 (display
5007 (string-append "#!" (which "sh") "\n"
5008 "java -cp " jar "/" ,name "-" ,version ".jar:"
5009 (string-concatenate
5010 (find-files (assoc-ref inputs "stringtemplate")
5011 ".*\\.jar"))
5012 ":"
5013 (string-concatenate
5014 (find-files (assoc-ref inputs "stringtemplate4")
5015 ".*\\.jar"))
5016 ":"
5017 (string-concatenate
5018 (find-files (string-append
5019 (assoc-ref inputs "antlr")
5020 "/lib")
5021 ".*\\.jar"))
5022 " org.antlr.Tool $*"))))
5023 (chmod (string-append bin "/antlr3") #o755))))
5024 (add-before 'build 'generate-grammar
5025 (lambda _
5026 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
5027 (for-each (lambda (file)
5028 (display file)
5029 (newline)
5030 (system* "antlr3" file))
5031 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
5032 "AssignTokenTypesWalker.g"
5033 "ActionTranslator.g" "TreeToNFAConverter.g"
5034 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5035 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
5036 (substitute* "ANTLRParser.java"
5037 (("public Object getTree") "public GrammarAST getTree"))
5038 (substitute* "ANTLRv3Parser.java"
5039 (("public Object getTree") "public CommonTree getTree"))
5040 (chdir "../../../../../java")
5041 (system* "antlr" "-o" "org/antlr/tool"
5042 "org/antlr/tool/serialize.g")
5043 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
5044 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
5045 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
5046 (substitute* "org/antlr/tool/ErrorManager.java"
5047 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
5048 (chdir "../../../..")))
5049 (add-before 'build 'fix-build-xml
5050 (lambda _
5051 (substitute* "build.xml"
5052 (("<exec") "<copy todir=\"${classes.dir}\">
5053 <fileset dir=\"tool/src/main/resources\">
5054 <include name=\"**/*.stg\"/>
5055 <include name=\"**/*.st\"/>
5056 <include name=\"**/*.sti\"/>
5057 <include name=\"**/STLexer.tokens\"/>
5058 </fileset>
5059 </copy><exec")))))))
5060 (native-inputs
5061 `(("antlr" ,antlr2)
5062 ("antlr3" ,antlr3-bootstrap)))
5063 (inputs
5064 `(("junit" ,java-junit)
5065 ("stringtemplate" ,java-stringtemplate-3)
5066 ("stringtemplate4" ,java-stringtemplate)))
5067 (propagated-inputs
5068 `(("stringtemplate" ,java-stringtemplate-3)
5069 ("antlr" ,antlr2)
5070 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
5071 (home-page "http://www.antlr3.org")
5072 (synopsis "Framework for constructing recognizers, compilers, and translators")
5073 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5074 is a language tool that provides a framework for constructing recognizers,
5075 compilers, and translators from grammatical descriptions containing Java, C#,
5076 C++, or Python actions. ANTLR provides excellent support for tree construction,
5077 tree walking, and translation.")
5078 (license license:bsd-3)))
5079
5080 (define antlr3-bootstrap
5081 (package
5082 (inherit antlr3)
5083 (name "antlr3-bootstrap")
5084 (native-inputs
5085 `(("antlr" ,antlr2)
5086 ("antlr3" ,antlr3-3.3)))
5087 (inputs
5088 `(("junit" ,java-junit)))))
5089
5090 (define antlr3-3.3
5091 (package
5092 (inherit antlr3)
5093 (name "antlr3")
5094 (version "3.3")
5095 (source (origin
5096 (method url-fetch)
5097 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5098 "gh-pages/download/antlr-"
5099 version ".tar.gz"))
5100 (sha256
5101 (base32
5102 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))))
5103 (arguments
5104 `(#:jar-name (string-append ,name "-" ,version ".jar")
5105 #:source-dir (string-join '("tool/src/main/java"
5106 "runtime/Java/src/main/java"
5107 "tool/src/main/antlr2"
5108 "tool/src/main/antlr3")
5109 ":")
5110 #:tests? #f ; FIXME: tests seem to require maven plugin
5111 #:modules ((guix build ant-build-system)
5112 (guix build utils)
5113 (srfi srfi-1))
5114 #:phases
5115 (modify-phases %standard-phases
5116 (add-after 'install 'bin-install
5117 (lambda* (#:key inputs outputs #:allow-other-keys)
5118 (let* ((out (assoc-ref outputs "out"))
5119 (jar (string-append out "/share/java"))
5120 (bin (string-append out "/bin")))
5121 (mkdir-p bin)
5122 (with-output-to-file (string-append bin "/antlr3")
5123 (lambda _
5124 (display
5125 (string-append
5126 "#!" (which "sh") "\n"
5127 "java -cp " jar "/antlr3-3.3.jar:"
5128 (string-join
5129 (append (find-files (assoc-ref inputs "java-stringtemplate")
5130 ".*\\.jar$")
5131 (find-files (string-append (assoc-ref inputs "antlr")
5132 "/lib")
5133 ".*\\.jar$"))
5134 ":")
5135 " org.antlr.Tool $*"))))
5136 (chmod (string-append bin "/antlr3") #o755)
5137 #t)))
5138 (add-before 'build 'generate-grammar
5139 (lambda _
5140 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
5141 (("import org.antlr.grammar.v2.\\*;")
5142 "import org.antlr.grammar.v2.*;\n
5143 import org.antlr.grammar.v2.TreeToNFAConverter;\n
5144 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
5145 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
5146 (and
5147 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
5148 (every (lambda (file)
5149 (format #t "~a\n" file)
5150 (zero? (system* "antlr" file)))
5151 '("antlr.g" "antlr.print.g" "assign.types.g"
5152 "buildnfa.g" "codegen.g" "define.g")))
5153 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
5154 (every (lambda (file)
5155 (format #t "~a\n" file)
5156 (zero? (system* "antlr3" file)))
5157 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
5158 "ANTLRv3Tree.g"))))))
5159 (add-before 'build 'fix-build-xml
5160 (lambda _
5161 (substitute* "build.xml"
5162 (("<exec") "<copy todir=\"${classes.dir}\">
5163 <fileset dir=\"tool/src/main/resources\">
5164 <include name=\"**/*.stg\"/>
5165 <include name=\"**/*.st\"/>
5166 <include name=\"**/*.sti\"/>
5167 <include name=\"**/STLexer.tokens\"/>
5168 </fileset>
5169 </copy><exec"))
5170 #t)))))
5171 (native-inputs
5172 `(("antlr" ,antlr2)
5173 ("antlr3" ,antlr3-3.1)))
5174 (inputs
5175 `(("junit" ,java-junit)))
5176 (propagated-inputs
5177 `(("java-stringtemplate" ,java-stringtemplate-3)
5178 ("antlr" ,antlr2)
5179 ("antlr3" ,antlr3-3.1)))))
5180
5181 (define antlr3-3.1
5182 (package
5183 (inherit antlr3)
5184 (name "antlr3-3.1")
5185 (version "3.1")
5186 (source (origin
5187 (method url-fetch)
5188 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5189 "gh-pages/download/antlr-"
5190 version ".tar.gz"))
5191 (sha256
5192 (base32
5193 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))))
5194 (arguments
5195 `(#:jar-name (string-append ,name "-" ,version ".jar")
5196 #:source-dir "src:runtime/Java/src"
5197 #:tests? #f
5198 #:phases
5199 (modify-phases %standard-phases
5200 (add-after 'install 'bin-install
5201 (lambda* (#:key inputs outputs #:allow-other-keys)
5202 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5203 (bin (string-append (assoc-ref outputs "out") "/bin")))
5204 (mkdir-p bin)
5205 (with-output-to-file (string-append bin "/antlr3")
5206 (lambda _
5207 (display
5208 (string-append "#!" (which "sh") "\n"
5209 "java -cp " jar "/antlr3-3.1-3.1.jar:"
5210 (string-concatenate
5211 (find-files (assoc-ref inputs "stringtemplate")
5212 ".*\\.jar"))
5213 ":"
5214 (string-concatenate
5215 (find-files (string-append
5216 (assoc-ref inputs "antlr")
5217 "/lib")
5218 ".*\\.jar"))
5219 " org.antlr.Tool $*"))))
5220 (chmod (string-append bin "/antlr3") #o755))))
5221 (add-before 'build 'generate-grammar
5222 (lambda _
5223 (let ((dir "src/org/antlr/tool/"))
5224 (for-each (lambda (file)
5225 (display file)
5226 (newline)
5227 (system* "antlr" "-o" dir (string-append dir file)))
5228 '("antlr.g" "antlr.print.g" "assign.types.g"
5229 "buildnfa.g" "define.g")))
5230 (format #t "codegen.g\n")
5231 (system* "antlr" "-o" "src/org/antlr/codegen"
5232 "src/org/antlr/codegen/codegen.g")))
5233 (add-before 'build 'fix-build-xml
5234 (lambda _
5235 (substitute* "build.xml"
5236 (("<exec") "<copy todir=\"${classes.dir}\">
5237 <fileset dir=\"src\">
5238 <include name=\"**/*.stg\"/>
5239 <include name=\"**/*.st\"/>
5240 <include name=\"**/*.sti\"/>
5241 <include name=\"**/STLexer.tokens\"/>
5242 </fileset>
5243 </copy><exec")))))))
5244 (native-inputs
5245 `(("antlr" ,antlr2)))
5246 (inputs
5247 `(("junit" ,java-junit)))
5248 (propagated-inputs
5249 `(("stringtemplate" ,java-stringtemplate-3)))))
5250
5251 (define-public java-commons-cli-1.2
5252 ;; This is a bootstrap dependency for Maven2.
5253 (package
5254 (inherit java-commons-cli)
5255 (version "1.2")
5256 (source (origin
5257 (method url-fetch)
5258 (uri (string-append "mirror://apache/commons/cli/source/"
5259 "commons-cli-" version "-src.tar.gz"))
5260 (sha256
5261 (base32
5262 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
5263 (arguments
5264 `(#:jar-name "commons-cli.jar"
5265 #:phases
5266 (modify-phases %standard-phases
5267 (add-before 'check 'fix-build-xml
5268 (lambda* (#:key inputs #:allow-other-keys)
5269 (substitute* "build.xml"
5270 (("dir=\"\\$\\{test.home\\}/java\"")
5271 "dir=\"${test.home}\""))
5272 #t)))))
5273 (native-inputs
5274 `(("java-junit" ,java-junit)))))
5275
5276 (define-public java-microemulator-cldc
5277 (package
5278 (name "java-microemulator-cldc")
5279 (version "2.0.4")
5280 (source (origin
5281 (method url-fetch)
5282 (uri (string-append "https://github.com/barteo/microemu/archive/"
5283 "microemulator_"
5284 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5285 version)
5286 ".tar.gz"))
5287 (file-name (string-append name "-" version ".tar.gz"))
5288 (sha256
5289 (base32
5290 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
5291 (build-system ant-build-system)
5292 (arguments
5293 `(#:jar-name "microemulator-cldc.jar"
5294 #:source-dir "microemu-cldc/src/main/java"
5295 #:tests? #f)); Requires even older software
5296 (home-page "https://github.com/barteo/microemu")
5297 (synopsis "J2ME CLDC emulator")
5298 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
5299 Emulator. It allows to demonstrate MIDlet based applications in web browser
5300 applet and can be run as a standalone java application.")
5301 (license (list license:asl2.0
5302 ;; or altenatively:
5303 license:lgpl2.1+))))
5304
5305 (define-public java-datanucleus-javax-persistence
5306 (package
5307 (name "java-datanucleus-javax-persistence")
5308 (version "2.2.0")
5309 (source (origin
5310 (method url-fetch)
5311 (uri (string-append "https://github.com/datanucleus/"
5312 "javax.persistence/archive/javax.persistence-"
5313 version "-release.tar.gz"))
5314 (sha256
5315 (base32
5316 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
5317 (build-system ant-build-system)
5318 (arguments
5319 `(#:jar-name "java-datanucleus-javax-persistence.jar"
5320 #:jdk ,icedtea-8
5321 #:source-dir "src/main/java"
5322 #:tests? #f)); no tests
5323 (home-page "https://github.com/datanucleus/javax.persistence")
5324 (synopsis "JPA API")
5325 (description "This package contains a clean definition of JPA API intended
5326 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
5327 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
5328 used to generate this API.")
5329 (license (list license:edl1.0 license:epl1.0))))
5330
5331 (define-public java-osgi-cmpn
5332 (package
5333 (name "java-osgi-cmpn")
5334 (version "6.0.0")
5335 (source (origin
5336 (method url-fetch)
5337 (uri (string-append "http://central.maven.org/maven2/"
5338 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
5339 version "-sources.jar"))
5340 (sha256
5341 (base32
5342 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
5343 (build-system ant-build-system)
5344 (arguments
5345 `(#:jar-name "osgi-cmpn.jar"
5346 #:tests? #f)); no tests
5347 (inputs
5348 `(("annotation" ,java-osgi-annotation)
5349 ("core" ,java-osgi-core)
5350 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5351 ("microemulator" ,java-microemulator-cldc)
5352 ("servlet" ,java-classpathx-servletapi)))
5353 (home-page "https://www.osgi.org")
5354 (synopsis "Compendium specification module of OSGi framework")
5355 (description
5356 "OSGi, for Open Services Gateway initiative framework, is a module system
5357 and service platform for the Java programming language. This package contains
5358 the compendium specification module, providing interfaces and classes for use
5359 in compiling bundles.")
5360 (license license:asl2.0)))
5361
5362 (define-public java-osgi-service-component-annotations
5363 (package
5364 (name "java-osgi-service-component-annotations")
5365 (version "1.3.0")
5366 (source (origin
5367 (method url-fetch)
5368 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5369 "org.osgi.service.component.annotations/"
5370 version "/org.osgi.service.component.annotations-"
5371 version "-sources.jar"))
5372 (sha256
5373 (base32
5374 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
5375 (build-system ant-build-system)
5376 (arguments
5377 `(#:jar-name "osgi-service-component-annotations.jar"
5378 #:tests? #f)); no tests
5379 (inputs
5380 `(("annotation" ,java-osgi-annotation)))
5381 (home-page "https://www.osgi.org")
5382 (synopsis "Support annotations for osgi-service-component")
5383 (description
5384 "OSGi, for Open Services Gateway initiative framework, is a module system
5385 and service platform for the Java programming language. This package contains
5386 the support annotations for osgi-service-component.")
5387 (license license:asl2.0)))
5388
5389 (define-public java-osgi-dto
5390 (package
5391 (name "java-osgi-dto")
5392 (version "1.0.0")
5393 (source (origin
5394 (method url-fetch)
5395 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5396 "org.osgi.dto/" version "/org.osgi.dto-"
5397 version "-sources.jar"))
5398 (sha256
5399 (base32
5400 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
5401 (build-system ant-build-system)
5402 (arguments
5403 `(#:jar-name "osgi-dto.jar"
5404 #:tests? #f)); no tests
5405 (inputs
5406 `(("annotation" ,java-osgi-annotation)))
5407 (home-page "https://www.osgi.org")
5408 (synopsis "Data Transfer Objects")
5409 (description
5410 "OSGi, for Open Services Gateway initiative framework, is a module system
5411 and service platform for the Java programming language. This package contains
5412 the Data Transfer Objects. It is easily serializable having only public fields
5413 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
5414 Map and array aggregates may also be used. The aggregates must only hold
5415 objects of the listed types or aggregates.")
5416 (license license:asl2.0)))
5417
5418 (define-public java-osgi-resource
5419 (package
5420 (name "java-osgi-resource")
5421 (version "1.0.0")
5422 (source (origin
5423 (method url-fetch)
5424 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5425 "org.osgi.resource/"
5426 version "/org.osgi.resource-"
5427 version "-sources.jar"))
5428 (sha256
5429 (base32
5430 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
5431 (build-system ant-build-system)
5432 (arguments
5433 `(#:jar-name "osgi-resource.jar"
5434 #:tests? #f)); no tests
5435 (inputs
5436 `(("annotation" ,java-osgi-annotation)
5437 ("dto" ,java-osgi-dto)))
5438 (home-page "https://www.osgi.org")
5439 (synopsis "OSGI Resource")
5440 (description
5441 "OSGi, for Open Services Gateway initiative framework, is a module system
5442 and service platform for the Java programming language. This package contains
5443 the definition of common types in osgi packages.")
5444 (license license:asl2.0)))
5445
5446 (define-public java-osgi-namespace-contract
5447 (package
5448 (name "java-osgi-namespace-contract")
5449 (version "1.0.0")
5450 (source (origin
5451 (method url-fetch)
5452 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5453 "org.osgi.namespace.contract/"
5454 version "/org.osgi.namespace.contract-"
5455 version "-sources.jar"))
5456 (sha256
5457 (base32
5458 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
5459 (build-system ant-build-system)
5460 (inputs
5461 `(("resource" ,java-osgi-resource)
5462 ("annotation" ,java-osgi-annotation)))
5463 (arguments
5464 `(#:jar-name "osgi-namespace-contract.jar"
5465 #:tests? #f)); no tests
5466 (home-page "https://www.osgi.org")
5467 (synopsis "Contract Capability and Requirement Namespace")
5468 (description
5469 "OSGi, for Open Services Gateway initiative framework, is a module system
5470 and service platform for the Java programming language. This package contains
5471 the names for the attributes and directives for a namespace with contracts.")
5472 (license license:asl2.0)))
5473
5474 (define-public java-osgi-namespace-extender
5475 (package
5476 (name "java-osgi-namespace-extender")
5477 (version "1.0.1")
5478 (source (origin
5479 (method url-fetch)
5480 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5481 "org.osgi.namespace.extender/"
5482 version "/org.osgi.namespace.extender-"
5483 version "-sources.jar"))
5484 (sha256
5485 (base32
5486 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
5487 (build-system ant-build-system)
5488 (inputs
5489 `(("resource" ,java-osgi-resource)
5490 ("annotation" ,java-osgi-annotation)))
5491 (arguments
5492 `(#:jar-name "osgi-namespace-extendent.jar"
5493 #:tests? #f)); no tests
5494 (home-page "https://www.osgi.org")
5495 (synopsis "Extender Capability and Requirement Namespace")
5496 (description
5497 "OSGi, for Open Services Gateway initiative framework, is a module system
5498 and service platform for the Java programming language. This package contains
5499 the names for the attributes and directives for an extender namespace.")
5500 (license license:asl2.0)))
5501
5502 (define-public java-osgi-namespace-service
5503 (package
5504 (name "java-osgi-namespace-service")
5505 (version "1.0.0")
5506 (source (origin
5507 (method url-fetch)
5508 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5509 "org.osgi.namespace.service/"
5510 version "/org.osgi.namespace.service-"
5511 version "-sources.jar"))
5512 (sha256
5513 (base32
5514 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
5515 (build-system ant-build-system)
5516 (inputs
5517 `(("resource" ,java-osgi-resource)
5518 ("annotation" ,java-osgi-annotation)))
5519 (arguments
5520 `(#:jar-name "osgi-namespace-service.jar"
5521 #:tests? #f)); no tests
5522 (home-page "https://www.osgi.org")
5523 (synopsis "Service Capability and Requirement Namespace")
5524 (description
5525 "OSGi, for Open Services Gateway initiative framework, is a module system
5526 and service platform for the Java programming language. This package contains
5527 the names for the attributes and directives for a service namespace.")
5528 (license license:asl2.0)))
5529
5530 (define-public java-osgi-util-function
5531 (package
5532 (name "java-osgi-util-function")
5533 (version "1.0.0")
5534 (source (origin
5535 (method url-fetch)
5536 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5537 "org.osgi.util.function/"
5538 version "/org.osgi.util.function-"
5539 version "-sources.jar"))
5540 (sha256
5541 (base32
5542 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
5543 (build-system ant-build-system)
5544 (arguments
5545 `(#:jar-name "osgi-util-function.jar"
5546 #:tests? #f)); no tests
5547 (inputs
5548 `(("annotation" ,java-osgi-annotation)))
5549 (home-page "https://www.osgi.org")
5550 (synopsis "OSGI Util Function")
5551 (description
5552 "OSGi, for Open Services Gateway initiative framework, is a module system
5553 and service platform for the Java programming language. This package contains
5554 an interface for a function that accepts a single argument and produces a result.")
5555 (license license:asl2.0)))
5556
5557 (define-public java-osgi-util-promise
5558 (package
5559 (name "java-osgi-util-promise")
5560 (version "1.0.0")
5561 (source (origin
5562 (method url-fetch)
5563 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5564 "org.osgi.util.promise/"
5565 version "/org.osgi.util.promise-"
5566 version "-sources.jar"))
5567 (sha256
5568 (base32
5569 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
5570 (build-system ant-build-system)
5571 (arguments
5572 `(#:jar-name "osgi-util-promise.jar"
5573 #:tests? #f)); no tests
5574 (inputs
5575 `(("annotation" ,java-osgi-annotation)
5576 ("function" ,java-osgi-util-function)))
5577 (home-page "https://www.osgi.org")
5578 (synopsis "Promise of a value")
5579 (description
5580 "OSGi, for Open Services Gateway initiative framework, is a module system
5581 and service platform for the Java programming language. This package contains
5582 an interface and utilitary classes for promises. A Promise represents a future
5583 value. It handles the interactions for asynchronous processing.")
5584 (license license:asl2.0)))
5585
5586 (define-public java-osgi-service-metatype-annotations
5587 (package
5588 (name "java-osgi-service-metatype-annotations")
5589 (version "1.3.0")
5590 (source (origin
5591 (method url-fetch)
5592 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5593 "org.osgi.service.metatype.annotations/"
5594 version "/org.osgi.service.metatype.annotations-"
5595 version "-sources.jar"))
5596 (sha256
5597 (base32
5598 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
5599 (build-system ant-build-system)
5600 (arguments
5601 `(#:jar-name "osgi-service-metatype-annotations.jar"
5602 #:tests? #f)); no tests
5603 (inputs
5604 `(("annotation" ,java-osgi-annotation)))
5605 (home-page "https://www.osgi.org")
5606 (synopsis "Support annotations for metatype")
5607 (description
5608 "OSGi, for Open Services Gateway initiative framework, is a module system
5609 and service platform for the Java programming language. This package contains
5610 the support annotations for metatype.")
5611 (license license:asl2.0)))
5612
5613 (define-public java-osgi-service-repository
5614 (package
5615 (name "java-osgi-service-repository")
5616 (version "1.1.0")
5617 (source (origin
5618 (method url-fetch)
5619 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5620 "org.osgi.service.repository/"
5621 version "/org.osgi.service.repository-"
5622 version "-sources.jar"))
5623 (sha256
5624 (base32
5625 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
5626 (build-system ant-build-system)
5627 (arguments
5628 `(#:jar-name "osgi-service-repository.jar"
5629 #:tests? #f)); no tests
5630 (inputs
5631 `(("annotation" ,java-osgi-annotation)
5632 ("promise" ,java-osgi-util-promise)
5633 ("resource" ,java-osgi-resource)))
5634 (home-page "https://www.osgi.org")
5635 (synopsis "OSGI service repository")
5636 (description
5637 "OSGi, for Open Services Gateway initiative framework, is a module system
5638 and service platform for the Java programming language. This package contains
5639 a repository service that contains resources.")
5640 (license license:asl2.0)))
5641
5642 (define-public java-osgi-framework
5643 (package
5644 (name "java-osgi-framework")
5645 (version "1.8.0")
5646 (source (origin
5647 (method url-fetch)
5648 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5649 "org.osgi.framework/" version "/org.osgi.framework-"
5650 version "-sources.jar"))
5651 (sha256
5652 (base32
5653 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
5654 (build-system ant-build-system)
5655 (arguments
5656 `(#:jar-name "osgi-framework.jar"
5657 #:tests? #f)); no tests
5658 (inputs
5659 `(("annotation" ,java-osgi-annotation)
5660 ("resource" ,java-osgi-resource)
5661 ("dto" ,java-osgi-dto)))
5662 (home-page "https://www.osgi.org")
5663 (synopsis "OSGi framework")
5664 (description
5665 "OSGi, for Open Services Gateway initiative framework, is a module system
5666 and service platform for the Java programming language.")
5667 (license license:asl2.0)))
5668
5669 (define-public java-osgi-service-log
5670 (package
5671 (name "java-osgi-service-log")
5672 (version "1.3.0")
5673 (source (origin
5674 (method url-fetch)
5675 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5676 "org.osgi.service.log/"
5677 version "/org.osgi.service.log-"
5678 version "-sources.jar"))
5679 (sha256
5680 (base32
5681 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
5682 (build-system ant-build-system)
5683 (arguments
5684 `(#:jar-name "osgi-service-log.jar"
5685 #:tests? #f)); no tests
5686 (inputs
5687 `(("java-osgi-framework" ,java-osgi-framework)))
5688 (home-page "https://www.osgi.org")
5689 (synopsis "Provides methods for bundles to write messages to the log")
5690 (description
5691 "OSGi, for Open Services Gateway initiative framework, is a module system
5692 and service platform for the Java programming language. This package contains
5693 the log service.")
5694 (license license:asl2.0)))
5695
5696 (define-public java-osgi-service-jdbc
5697 (package
5698 (name "java-osgi-service-jdbc")
5699 (version "1.0.0")
5700 (source (origin
5701 (method url-fetch)
5702 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5703 "org.osgi.service.jdbc/"
5704 version "/org.osgi.service.jdbc-"
5705 version "-sources.jar"))
5706 (sha256
5707 (base32
5708 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
5709 (build-system ant-build-system)
5710 (arguments
5711 `(#:jar-name "osgi-service-jdbc.jar"
5712 #:tests? #f)); no tests
5713 (home-page "https://www.osgi.org")
5714 (synopsis "Factory for JDBC connection factories")
5715 (description
5716 "OSGi, for Open Services Gateway initiative framework, is a module system
5717 and service platform for the Java programming language. This package contains
5718 a factory for JDBC connection factories. There are 3 preferred connection
5719 factories for getting JDBC connections:
5720
5721 @itemize
5722 @item @code{javax.sql.DataSource};
5723 @item @code{javax.sql.ConnectionPoolDataSource};
5724 @item @code{javax.sql.XADataSource}.
5725 @end itemize")
5726 (license license:asl2.0)))
5727
5728 (define-public java-osgi-service-resolver
5729 (package
5730 (name "java-osgi-service-resolver")
5731 (version "1.0.1")
5732 (source (origin
5733 (method url-fetch)
5734 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5735 "org.osgi.service.resolver/"
5736 version "/org.osgi.service.resolver-"
5737 version "-sources.jar"))
5738 (sha256
5739 (base32
5740 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
5741 (build-system ant-build-system)
5742 (arguments
5743 `(#:jar-name "osgi-service-resolver.jar"
5744 #:tests? #f)); no tests
5745 (inputs
5746 `(("annotation" ,java-osgi-annotation)
5747 ("resource" ,java-osgi-resource)))
5748 (home-page "https://www.osgi.org")
5749 (synopsis "OSGI Resolver service")
5750 (description
5751 "OSGi, for Open Services Gateway initiative framework, is a module system
5752 and service platform for the Java programming language. This package contains
5753 a resolver service that resolves the specified resources in the context supplied
5754 by the caller.")
5755 (license license:asl2.0)))
5756
5757 (define-public java-osgi-util-tracker
5758 (package
5759 (name "java-osgi-util-tracker")
5760 (version "1.5.1")
5761 (source (origin
5762 (method url-fetch)
5763 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5764 "org.osgi.util.tracker/"
5765 version "/org.osgi.util.tracker-"
5766 version "-sources.jar"))
5767 (sha256
5768 (base32
5769 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
5770 (build-system ant-build-system)
5771 (arguments
5772 `(#:jar-name "osgi-util-tracker.jar"
5773 #:tests? #f)); no tests
5774 (inputs
5775 `(("framework" ,java-osgi-framework)
5776 ("annotation" ,java-osgi-annotation)))
5777 (home-page "https://www.osgi.org")
5778 (synopsis "Bundle tracking")
5779 (description
5780 "OSGi, for Open Services Gateway initiative framework, is a module system
5781 and service platform for the Java programming language. This package contains
5782 bundle tracking utility classes.")
5783 (license license:asl2.0)))
5784
5785 (define-public java-osgi-service-cm
5786 (package
5787 (name "java-osgi-service-cm")
5788 (version "1.5.0")
5789 (source (origin
5790 (method url-fetch)
5791 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5792 "org.osgi.service.cm/"
5793 version "/org.osgi.service.cm-"
5794 version "-sources.jar"))
5795 (sha256
5796 (base32
5797 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
5798 (build-system ant-build-system)
5799 (arguments
5800 `(#:jar-name "osgi-service-cm.jar"
5801 #:tests? #f)); no tests
5802 (inputs
5803 `(("framework" ,java-osgi-framework)
5804 ("annotation" ,java-osgi-annotation)))
5805 (home-page "https://www.osgi.org")
5806 (synopsis "OSGI Configuration Management")
5807 (description
5808 "OSGi, for Open Services Gateway initiative framework, is a module system
5809 and service platform for the Java programming language. This package contains
5810 utility classes for the configuration of services.")
5811 (license license:asl2.0)))
5812
5813 (define-public java-osgi-service-packageadmin
5814 (package
5815 (name "java-osgi-service-packageadmin")
5816 (version "1.2.0")
5817 (source (origin
5818 (method url-fetch)
5819 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
5820 "org.osgi.service.packageadmin/"
5821 version "/org.osgi.service.packageadmin-"
5822 version "-sources.jar"))
5823 (sha256
5824 (base32
5825 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
5826 (build-system ant-build-system)
5827 (arguments
5828 `(#:jar-name "osgi-service-packageadmin.jar"
5829 #:tests? #f)); no tests
5830 (inputs
5831 `(("framework" ,java-osgi-framework)))
5832 (home-page "https://www.osgi.org")
5833 (synopsis "OSGI Package Administration")
5834 (description
5835 "OSGi, for Open Services Gateway initiative framework, is a module system
5836 and service platform for the Java programming language. This package contains
5837 the packageadmin service.")
5838 (license license:asl2.0)))
5839
5840 (define-public java-ops4j-base-lang
5841 (package
5842 (name "java-ops4j-base-lang")
5843 (version "1.5.0")
5844 (source (origin
5845 (method url-fetch)
5846 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
5847 "archive/base-" version ".tar.gz"))
5848 (sha256
5849 (base32
5850 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
5851 (build-system ant-build-system)
5852 (arguments
5853 `(#:jar-name "java-ops4j-base-lang.jar"
5854 #:source-dir "ops4j-base-lang/src/main/java"
5855 #:tests? #f; no tests
5856 #:phases
5857 (modify-phases %standard-phases
5858 (add-before 'build 'add-test-file
5859 (lambda _
5860 ;; That file is required by a test in ops4j-pax-exam-core-spi
5861 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
5862 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
5863 (lambda _
5864 (display
5865 (string-append
5866 "version=" ,version "\n"
5867 "groupId=org.ops4j.base"
5868 "artifactId=ops4j-base-lang\n")))))))))
5869 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
5870 (synopsis "Utility classes and extensions to be used in OPS4J projects")
5871 (description "OPS4J stands for Open Participation Software for Java. This
5872 package contains utilities and extensions related to @code{java.lang}.")
5873 (license license:asl2.0)))
5874
5875 (define-public java-ops4j-base-monitors
5876 (package
5877 (inherit java-ops4j-base-lang)
5878 (name "java-ops4j-base-monitors")
5879 (arguments
5880 `(#:jar-name "java-ops4j-base-monitors.jar"
5881 #:source-dir "ops4j-base-monitors/src/main/java"
5882 #:tests? #f)); no tests
5883 (inputs
5884 `(("lang" ,java-ops4j-base-lang)))
5885 (description "OPS4J stands for Open Participation Software for Java. This
5886 package contains utilities and extensions related to monitoring.")))
5887
5888 (define-public java-ops4j-base-io
5889 (package
5890 (inherit java-ops4j-base-lang)
5891 (name "java-ops4j-base-io")
5892 (arguments
5893 `(#:jar-name "java-ops4j-base-io.jar"
5894 #:source-dir "ops4j-base-io/src/main/java"
5895 #:test-dir "ops4j-base-io/src/test"
5896 #:test-exclude
5897 (list "**/ListerTest.java")))
5898 (inputs
5899 `(("lang" ,java-ops4j-base-monitors)
5900 ("lang" ,java-ops4j-base-lang)))
5901 (native-inputs
5902 `(("junit" ,java-junit)
5903 ("hamcrest" ,java-hamcrest-core)))
5904 (description "OPS4J stands for Open Participation Software for Java. This
5905 package contains utilities and extensions related to handling streams and files.")))
5906
5907 (define-public java-ops4j-base-util
5908 (package
5909 (inherit java-ops4j-base-lang)
5910 (name "java-ops4j-base-util")
5911 (arguments
5912 `(#:jar-name "java-ops4j-base-util.jar"
5913 #:source-dir "ops4j-base-util/src/main/java"
5914 #:test-dir "ops4j-base-util/src/test"))
5915 (inputs
5916 `(("lang" ,java-ops4j-base-lang)))
5917 (native-inputs
5918 `(("junit" ,java-junit)))
5919 (description "OPS4J stands for Open Participation Software for Java. This
5920 package contains utilities and extensions related to environment, i18n and
5921 mime types.")))
5922
5923 (define-public java-ops4j-base-util-property
5924 (package
5925 (inherit java-ops4j-base-lang)
5926 (name "java-ops4j-base-util-property")
5927 (arguments
5928 `(#:jar-name "java-ops4j-base-util-property.jar"
5929 #:source-dir "ops4j-base-util-property/src/main/java"
5930 #:tests? #f)); no tests
5931 (inputs
5932 `(("lang" ,java-ops4j-base-lang)
5933 ("util" ,java-ops4j-base-util)))
5934 (description "OPS4J stands for Open Participation Software for Java. This
5935 package contains utilities and extensions related to resolving properties from
5936 different sources.")))
5937
5938 (define-public java-ops4j-base-store
5939 (package
5940 (inherit java-ops4j-base-lang)
5941 (name "java-ops4j-base-store")
5942 (arguments
5943 `(#:jar-name "java-ops4j-base-store.jar"
5944 #:source-dir "ops4j-base-store/src/main/java"
5945 #:tests? #f)); no tests
5946 (inputs
5947 `(("lang" ,java-ops4j-base-lang)
5948 ("slf4j" ,java-slf4j-api)
5949 ("io" ,java-ops4j-base-io)))
5950 (description "OPS4J stands for Open Participation Software for Java. This
5951 package contains utilities for storing and retrieving data from an
5952 @code{InputStream}.")))
5953
5954 (define-public java-ops4j-base-spi
5955 (package
5956 (inherit java-ops4j-base-lang)
5957 (name "java-ops4j-base-spi")
5958 (arguments
5959 `(#:jar-name "java-ops4j-base-spi.jar"
5960 #:source-dir "ops4j-base-spi/src/main/java"
5961 #:test-dir "ops4j-base-spi/src/test"))
5962 (native-inputs
5963 `(("junit" ,java-junit)
5964 ("hamcrest" ,java-hamcrest-core)))
5965 (description "OPS4J stands for Open Participation Software for Java. This
5966 package contains utilities for obtaining services via the Java SE 6
5967 @code{ServiceLoader}.")))
5968
5969 (define-public java-aqute-bnd-annotation
5970 (package
5971 (name "java-aqute-bnd-annotation")
5972 (version "3.4.0")
5973 (source (origin
5974 (method url-fetch)
5975 (uri (string-append "https://github.com/bndtools/bnd/archive/"
5976 version ".REL.tar.gz"))
5977 (file-name (string-append name "-" version ".tar.gz"))
5978 (sha256
5979 (base32
5980 "09vgb6axikbz66zi9falijbnzh1qnp9ysfns123dmzdb01cbza9q"))))
5981 (build-system ant-build-system)
5982 (arguments
5983 `(#:jar-name "java-aqute-bnd-annotation.jar"
5984 #:source-dir "biz.aQute.bnd.annotation/src"
5985 #:tests? #f)); empty test dir
5986 (home-page "http://bnd.bndtools.org/")
5987 (synopsis "Tools for OSGi")
5988 (description "Bnd is a swiss army knife for OSGi, it creates manifest
5989 headers based on analyzing the class code, it verifies the project settings,
5990 it manages project dependencies, gives diffs jars, and much more.")
5991 (license license:asl2.0)))
5992
5993 (define-public java-aqute-libg
5994 (package
5995 (inherit java-aqute-bnd-annotation)
5996 (name "java-aqute-libg")
5997 (arguments
5998 `(#:jar-name "java-aqute-libg.jar"
5999 #:source-dir "aQute.libg/src"
6000 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
6001 (inputs
6002 `(("slf4j" ,java-slf4j-api)
6003 ("osgi-annot" ,java-osgi-annotation)
6004 ("java-osgi-cmpn" ,java-osgi-cmpn)
6005 ("osgi" ,java-osgi-core)))))
6006
6007 (define-public java-aqute-bndlib
6008 (package
6009 (inherit java-aqute-bnd-annotation)
6010 (name "java-aqute-bndlib")
6011 (arguments
6012 `(#:jar-name "java-bndlib.jar"
6013 #:source-dir "biz.aQute.bndlib/src"
6014 #:tests? #f)); no tests
6015 (inputs
6016 `(("slf4j" ,java-slf4j-api)
6017 ("osgi-annot" ,java-osgi-annotation)
6018 ("java-aqute-libg" ,java-aqute-libg)
6019 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
6020 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
6021 ("java-osgi-service-repository" ,java-osgi-service-repository)
6022 ("java-osgi-service-log" ,java-osgi-service-log)
6023 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
6024 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
6025 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
6026 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
6027 ("promise" ,java-osgi-util-promise)
6028 ("osgi" ,java-osgi-core)))))
6029
6030 (define-public java-ops4j-pax-tinybundles
6031 (package
6032 (name "java-ops4j-pax-tinybundles")
6033 (version "2.1.1")
6034 (source (origin
6035 (method url-fetch)
6036 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
6037 "archive/tinybundles-" version ".tar.gz"))
6038 (sha256
6039 (base32
6040 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
6041 (arguments
6042 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
6043 #:source-dir "src/main/java"
6044 #:test-exclude
6045 ;; Abstract base classes for other tests
6046 (list "**/BndTest.java" "**/CoreTest.java")
6047 #:phases
6048 (modify-phases %standard-phases
6049 (add-before 'check 'fix-version
6050 (lambda _
6051 ;; This test has a reference to an old version of bndlib we are not
6052 ;; packaging. It uses the version referenced in pom.xml. We replace
6053 ;; it with our own version.
6054 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
6055 (("2.4.0.201411031534") "3.4.0")))))))
6056 (inputs
6057 `(("lang" ,java-ops4j-base-lang)
6058 ("io" ,java-ops4j-base-io)
6059 ("store" ,java-ops4j-base-store)
6060 ("slf4j" ,java-slf4j-api)
6061 ("libg" ,java-aqute-libg)
6062 ("bndlib" ,java-aqute-bndlib)))
6063 (native-inputs
6064 `(("junit" ,java-junit)
6065 ("hamcrest" ,java-hamcrest-core)
6066 ("log4j" ,java-log4j-api)
6067 ("bndannotation" ,java-aqute-bnd-annotation)
6068 ("framework" ,java-osgi-framework)))
6069 (build-system ant-build-system)
6070 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
6071 (synopsis "Java APIs to create OSGi related artifacts")
6072 (description "Tinybundles is all about creating OSGi related artifacts like
6073 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
6074 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
6075 other hand, this library can be a foundation of real end user tools that need
6076 to create those artifacts.")
6077 (license license:asl2.0)))
6078
6079 (define-public java-ops4j-pax-exam-core
6080 (package
6081 (name "java-ops4j-pax-exam-core")
6082 (version "4.11.0")
6083 (source (origin
6084 (method url-fetch)
6085 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
6086 "archive/exam-reactor-" version ".tar.gz"))
6087 (sha256
6088 (base32
6089 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
6090 (arguments
6091 `(#:jar-name "java-ops4j-pax-exam-core.jar"
6092 #:source-dir "core/pax-exam/src/main/java"
6093 #:test-dir "core/pax-exam/src/test"))
6094 (inputs
6095 `(("slf4j" ,java-slf4j-api)
6096 ("lang" ,java-ops4j-base-lang)
6097 ("io" ,java-ops4j-base-io)
6098 ("util-property" ,java-ops4j-base-util-property)
6099 ("util-store" ,java-ops4j-base-store)
6100 ("java-osgi-core" ,java-osgi-core)))
6101 (native-inputs
6102 `(("junit" ,java-junit)
6103 ("hamcrest" ,java-hamcrest-core)))
6104 (build-system ant-build-system)
6105 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
6106 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
6107 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
6108 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
6109 the system under test at the same time.")
6110 (license license:asl2.0)))
6111
6112 (define-public java-ops4j-pax-exam-core-spi
6113 (package
6114 (inherit java-ops4j-pax-exam-core)
6115 (name "java-ops4j-pax-exam-core-spi")
6116 (arguments
6117 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
6118 #:source-dir "src/main/java"
6119 #:test-exclude
6120 (list
6121 ;; Abstract base class, not a test
6122 "**/BaseStagedReactorTest.java"
6123 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
6124 "**/WarBuilderTest.java")
6125 #:phases
6126 (modify-phases %standard-phases
6127 (add-before 'configure 'chdir
6128 (lambda _
6129 ;; Tests assume we are in this directory
6130 (chdir "core/pax-exam-spi")))
6131 (add-before 'check 'fix-tests
6132 (lambda _
6133 ;; One test checks that this file is present.
6134 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
6135 (with-output-to-file
6136 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
6137 (lambda _
6138 (display
6139 (string-append "artifactId = pax-exam-spi\n"
6140 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
6141 ;; Maven puts compilation results in the target directory, while we
6142 ;; put them in the build directory.
6143 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
6144 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
6145 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
6146 (("target") "build"))
6147 ;; One test is expected to fail, but it doesn't throw the expected exception
6148 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
6149 (("AssertionError") "IllegalArgumentException")))))))
6150 (inputs
6151 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
6152 ("lang" ,java-ops4j-base-lang)
6153 ("monitors" ,java-ops4j-base-monitors)
6154 ("store" ,java-ops4j-base-store)
6155 ("io" ,java-ops4j-base-io)
6156 ("spi" ,java-ops4j-base-spi)
6157 ("osgi" ,java-osgi-core)
6158 ("slf4j" ,java-slf4j-api)
6159 ("tinybundles" ,java-ops4j-pax-tinybundles)))
6160 (native-inputs
6161 `(("mockito" ,java-mockito-1)
6162 ("junit" ,java-junit)
6163 ("hamcrest" ,java-hamcrest-core)
6164 ("cglib" ,java-cglib)
6165 ("objenesis" ,java-objenesis)
6166 ("asm" ,java-asm)))))
6167
6168 (define-public java-ops4j-pax-exam-core-junit
6169 (package
6170 (inherit java-ops4j-pax-exam-core)
6171 (name "java-ops4j-pax-exam-core-junit")
6172 (arguments
6173 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
6174 #:source-dir "drivers/pax-exam-junit4/src/main/java"
6175 #:tests? #f)); no tests
6176 (inputs
6177 `(("junit" ,java-junit)
6178 ("slf4j" ,java-slf4j-api)
6179 ("core" ,java-ops4j-pax-exam-core)
6180 ("spi" ,java-ops4j-pax-exam-core-spi)))
6181 (native-inputs '())))
6182
6183 (define-public java-fasterxml-jackson-annotations
6184 (package
6185 (name "java-fasterxml-jackson-annotations")
6186 (version "2.9.2")
6187 (source (origin
6188 (method url-fetch)
6189 (uri (string-append "https://github.com/FasterXML/"
6190 "jackson-annotations/archive/"
6191 "jackson-annotations-" version ".tar.gz"))
6192 (sha256
6193 (base32
6194 "0b4wdxjxfbl3gkilylfdbl7fzimfpyih676jiwdf19i4056j8lqw"))))
6195 (build-system ant-build-system)
6196 (arguments
6197 `(#:jar-name "jackson-annotations.jar"
6198 #:source-dir "src/main/java"
6199 #:test-dir "src/test"))
6200 (native-inputs
6201 `(("junit" ,java-junit)))
6202 (home-page "https://github.com/FasterXML/jackson-annotations")
6203 (synopsis "General purpose annotations for the Jackson Data Processor")
6204 (description "This package contains general purpose annotations for the
6205 Jackson Data Processor, used on value and handler types. The only annotations
6206 not included are ones that require dependency to the Databind package.")
6207 (license license:asl2.0)))
6208
6209 (define-public java-fasterxml-jackson-core
6210 (package
6211 (name "java-fasterxml-jackson-core")
6212 (version "2.9.2")
6213 (source (origin
6214 (method url-fetch)
6215 (uri (string-append "https://github.com/FasterXML/"
6216 "jackson-core/archive/"
6217 "jackson-core-" version ".tar.gz"))
6218 (sha256
6219 (base32
6220 "0q2d6qnylyxj5jh0sam1b095b5486f7ipzhxgwcgbm254ls7fqc1"))))
6221 (build-system ant-build-system)
6222 (arguments
6223 `(#:jar-name "jackson-core.jar"
6224 #:source-dir "src/main/java"
6225 #:test-dir "src/test"
6226 #:test-exclude
6227 (list
6228 ;; Expected failure. pom.xml excludes these
6229 "**/failing/**"
6230 ;; Base classes that have no constructor for junit
6231 "**/BaseTest.java"
6232 "**/ConcurrencyReadTest.java"
6233 "**/ManualCharAccessTest.java"
6234 "**/ManualCharAccessTest.java"
6235 "**/TrailingCommasTest.java"
6236 "**/AsyncMissingValuesInObjectTest.java"
6237 "**/AsyncMissingValuesInArrayTest.java")
6238 #:phases
6239 (modify-phases %standard-phases
6240 (add-before 'configure 'generate-PackageVersion.java
6241 (lambda _
6242 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
6243 (in (string-append out ".in")))
6244 (copy-file in out)
6245 (substitute* out
6246 (("@package@") "com.fasterxml.jackson.core.json")
6247 (("@projectversion@") ,version)
6248 (("@projectgroupid@") "com.fasterxml.jackson.core")
6249 (("@projectartifactid@") "jackson-core")))))
6250 (add-before 'build 'copy-resources
6251 (lambda _
6252 (copy-recursively "src/main/resources"
6253 "build/classes")))
6254 (add-before 'check 'copy-test-resources
6255 (lambda _
6256 (copy-recursively "src/test/resources"
6257 "build/test-classes"))))))
6258 (native-inputs
6259 `(("junit" ,java-junit)
6260 ("hamcrest" ,java-hamcrest-core)))
6261 (home-page "https://github.com/FasterXML/jackson-core")
6262 (synopsis "")
6263 (description "")
6264 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6265
6266 (define-public java-fasterxml-jackson-databind
6267 (package
6268 (name "java-fasterxml-jackson-databind")
6269 (version "2.9.2")
6270 (source (origin
6271 (method url-fetch)
6272 (uri (string-append "https://github.com/FasterXML/"
6273 "jackson-databind/archive/"
6274 "jackson-databind-" version ".tar.gz"))
6275 (sha256
6276 (base32
6277 "1d5ns8ypqhdy8d94i8q560ip9kka6q8lhnk6q7nfh2g9mr22cc4w"))))
6278 (build-system ant-build-system)
6279 (arguments
6280 `(#:jar-name "jackson-databind.jar"
6281 #:source-dir "src/main/java"
6282 #:tests? #f; requires javax.measures for which I can't find a free implementation
6283 #:phases
6284 (modify-phases %standard-phases
6285 (add-before 'configure 'generate-PackageVersion.java
6286 (lambda _
6287 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
6288 (in (string-append out ".in")))
6289 (copy-file in out)
6290 (substitute* out
6291 (("@package@") "com.fasterxml.jackson.databind.cfg")
6292 (("@projectversion@") ,version)
6293 (("@projectgroupid@") "com.fasterxml.jackson.databind")
6294 (("@projectartifactid@") "jackson-databind")))))
6295 (add-before 'build 'copy-resources
6296 (lambda _
6297 (copy-recursively "src/main/resources" "build/classes"))))))
6298 (inputs
6299 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6300 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
6301 (home-page "https://github.com/FasterXML/jackson-databind")
6302 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
6303 (description "This package contains the general-purpose data-binding
6304 functionality and tree-model for Jackson Data Processor. It builds on core
6305 streaming parser/generator package, and uses Jackson Annotations for
6306 configuration.")
6307 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6308
6309 (define-public java-fasterxml-jackson-modules-base-jaxb
6310 (package
6311 (name "java-fasterxml-jackson-modules-base-jaxb")
6312 (version "2.9.2")
6313 (source (origin
6314 (method url-fetch)
6315 (uri (string-append "https://github.com/FasterXML/"
6316 "jackson-modules-base/archive/"
6317 "jackson-modules-base-" version ".tar.gz"))
6318 (sha256
6319 (base32
6320 "0kc19n5a188g4vpyay44xfb7qcabcbfnwzhx1g84lg0sac8lf0ng"))))
6321 (build-system ant-build-system)
6322 (arguments
6323 `(#:jar-name "jackson-modules-base-jaxb.jar"
6324 #:source-dir "jaxb/src/main/java"
6325 #:test-dir "jaxb/src/test"
6326 #:test-exclude
6327 ;; Base class for tests
6328 (list "**/BaseJaxbTest.java")
6329 #:phases
6330 (modify-phases %standard-phases
6331 (add-before 'configure 'generate-PackageVersion.java
6332 (lambda _
6333 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
6334 "jackson/module/jaxb/PackageVersion.java"))
6335 (in (string-append out ".in")))
6336 (copy-file in out)
6337 (substitute* out
6338 (("@package@") "com.fasterxml.jackson.module.jaxb")
6339 (("@projectversion@") ,version)
6340 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
6341 (("@projectartifactid@") "jackson-module-jaxb")))))
6342 (add-before 'build 'copy-resources
6343 (lambda _
6344 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
6345 (inputs
6346 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6347 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6348 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
6349 (native-inputs
6350 `(("java-junit" ,java-junit)))
6351 (home-page "https://github.com/FasterXML/jackson-modules-base")
6352 (synopsis "Jaxb annotations jackson module")
6353 (description "This package is the jaxb annotations module for jackson.")
6354 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6355
6356 (define-public java-snakeyaml
6357 (package
6358 (name "java-snakeyaml")
6359 (version "1.18")
6360 (source (origin
6361 (method url-fetch)
6362 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
6363 version ".tar.gz"))
6364 (sha256
6365 (base32
6366 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
6367 (build-system ant-build-system)
6368 (arguments
6369 `(#:jar-name "java-snakeyaml.jar"
6370 #:source-dir "src/main/java"
6371 ;; Tests require velocity, a cyclic dependency, and
6372 ;; java-spring-framework-context which is not packaged.
6373 #:tests? #f))
6374 (home-page "https://bitbucket.org/asomov/snakeyaml")
6375 (synopsis "YAML processor")
6376 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
6377 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6378
6379 (define-public java-fasterxml-jackson-dataformat-yaml
6380 (package
6381 (name "java-fasterxml-jackson-dataformat-yaml")
6382 (version "2.9.2")
6383 (source (origin
6384 (method url-fetch)
6385 (uri (string-append "https://github.com/FasterXML/"
6386 "jackson-dataformats-text/archive/"
6387 "jackson-dataformats-text-" version ".tar.gz"))
6388 (sha256
6389 (base32
6390 "1x7c7v201jpb8ynjsmmq7jj7hyqzzp39jvpr053ggdndm022yzc7"))))
6391 (build-system ant-build-system)
6392 (arguments
6393 `(#:jar-name "jackson-dataformat-yaml.jar"
6394 #:source-dir "yaml/src/main/java"
6395 #:test-dir "yaml/src/test"
6396 #:test-exclude (list "**/failing/**.java")
6397 #:phases
6398 (modify-phases %standard-phases
6399 (add-before 'configure 'generate-PackageVersion.java
6400 (lambda _
6401 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
6402 (in (string-append out ".in")))
6403 (copy-file in out)
6404 (substitute* out
6405 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
6406 (("@projectversion@") ,version)
6407 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
6408 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
6409 (inputs
6410 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6411 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6412 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6413 ("java-snakeyaml" ,java-snakeyaml)))
6414 (native-inputs
6415 `(("junit" ,java-junit)
6416 ("hamcrest" ,java-hamcrest-core)
6417 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
6418 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
6419 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
6420 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
6421 (synopsis "Yaml backend for Jackson")
6422 (description "Dataformat backends are used to support format alternatives
6423 to JSON, supported by default. This is done by sub-classing Jackson core
6424 abstractions.")
6425 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6426
6427 (define-public java-stax2-api
6428 (package
6429 (name "java-stax2-api")
6430 (version "4.0.0")
6431 (source (origin
6432 (method url-fetch)
6433 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
6434 "stax2-api-" version ".tar.gz"))
6435 (sha256
6436 (base32
6437 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
6438 (build-system ant-build-system)
6439 (arguments
6440 `(#:jar-name "java-stax2-api.jar"
6441 #:source-dir "src/main/java"
6442 #:tests? #f)); no tests
6443 (home-page "https://github.com/FasterXML/stax2-api")
6444 (synopsis "Stax2 API")
6445 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
6446 significant new functionalities, such as full-featured bi-direction validation
6447 interface and high-performance Typed Access API.")
6448 (license license:bsd-2)))
6449
6450 (define-public java-woodstox-core
6451 (package
6452 (name "java-woodstox-core")
6453 (version "5.0.3")
6454 (source (origin
6455 (method url-fetch)
6456 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
6457 "woodstox-core-" version ".tar.gz"))
6458 (sha256
6459 (base32
6460 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
6461 (build-system ant-build-system)
6462 (arguments
6463 `(#:jar-name "woodstox.jar"
6464 #:test-exclude
6465 (list "**/Base*.java" "failing/**")
6466 #:phases
6467 (modify-phases %standard-phases
6468 (add-before 'build 'remove-msv-dep
6469 (lambda _
6470 ;; we don't need osgi, and it depends on msv
6471 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
6472 ;; msv's latest release is from 2011 and we don't need it
6473 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
6474 (delete-file-recursively "src/test/java/wstxtest/osgi")
6475 (delete-file-recursively "src/test/java/wstxtest/msv")))
6476 (add-before 'build 'copy-resources
6477 (lambda _
6478 (copy-recursively "src/main/resources" "build/classes"))))))
6479 (inputs
6480 `(("stax2" ,java-stax2-api)))
6481 (native-inputs
6482 `(("junit" ,java-junit)))
6483 (home-page "https://github.com/FasterXML/woodstox")
6484 (synopsis "Stax XML API implementation")
6485 (description "Woodstox is a stax XML API implementation.")
6486 (license license:asl2.0)))
6487
6488 (define-public java-fasterxml-jackson-dataformat-xml
6489 (package
6490 (name "java-fasterxml-jackson-dataformat-xml")
6491 (version "2.9.2")
6492 (source (origin
6493 (method url-fetch)
6494 (uri (string-append "https://github.com/FasterXML/"
6495 "jackson-dataformat-xml/archive/"
6496 "jackson-dataformat-xml-" version ".tar.gz"))
6497 (sha256
6498 (base32
6499 "1j1qanvcdh6afagr67zqrlypjkf0n6wr1qzpbvkw79lii72j6pbr"))))
6500 (build-system ant-build-system)
6501 (arguments
6502 `(#:jar-name "jackson-dataformat-xml.jar"
6503 #:source-dir "src/main/java"
6504 #:test-exclude
6505 (list "**/failing/**")
6506 #:phases
6507 (modify-phases %standard-phases
6508 (add-before 'configure 'generate-PackageVersion.java
6509 (lambda _
6510 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
6511 (in (string-append out ".in")))
6512 (copy-file in out)
6513 (newline)
6514 (substitute* out
6515 (("@package@") "com.fasterxml.jackson.dataformat.xml")
6516 (("@projectversion@") ,version)
6517 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
6518 (("@projectartifactid@") "jackson-dataformat-xml")))))
6519 (add-before 'build 'copy-resources
6520 (lambda _
6521 (copy-recursively "src/main/resources" "build/classes"))))))
6522 (inputs
6523 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
6524 ("jackson-core" ,java-fasterxml-jackson-core)
6525 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
6526 ("jackson-databind" ,java-fasterxml-jackson-databind)
6527 ("stax2-api" ,java-stax2-api)
6528 ("woodstox" ,java-woodstox-core)))
6529 (native-inputs
6530 `(("junit" ,java-junit)
6531 ("hamcrest" ,java-hamcrest-core)))
6532 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
6533 (synopsis "Read and write XML")
6534 (description "This package contains Jackson extension component for reading
6535 and writing XML encoded data.
6536
6537 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
6538 approach (that is, no support is added for \"Schema-first\" approach). Support
6539 for JAXB annotations is provided by JAXB annotation module; this module
6540 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
6541 @code{JsonFactory}) as well as small number of higher level overrides needed to
6542 make data-binding work.")
6543 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6544
6545 (define-public java-hdrhistogram
6546 (package
6547 (name "java-hdrhistogram")
6548 (version "2.1.9")
6549 (source (origin
6550 (method url-fetch)
6551 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
6552 "archive/HdrHistogram-" version ".tar.gz"))
6553 (sha256
6554 (base32
6555 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
6556 (build-system ant-build-system)
6557 (arguments
6558 `(#:jar-name "java-hdrhistogram.jar"
6559 #:source-dir "src/main/java"
6560 #:phases
6561 (modify-phases %standard-phases
6562 (add-before 'configure 'set-version
6563 (lambda _
6564 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
6565 (template (string-append version-java ".template")))
6566 (copy-file template version-java)
6567 (substitute* version-java
6568 (("\\$VERSION\\$") ,version)
6569 (("\\$BUILD_TIME\\$") "0"))
6570 #t))))))
6571 (native-inputs
6572 `(("junit" ,java-junit)
6573 ("hamcrest" ,java-hamcrest-core)))
6574 (home-page "https://hdrhistogram.github.io/HdrHistogram")
6575 (synopsis "High dynamic range histogram")
6576 (description "Hdrhistogram allows to create histograms that support
6577 recording and analyzing sampled data value counts across a configurable integer
6578 value range with configurable value precision within the range. Value precision
6579 is expressed as the number of significant digits in the value recording, and
6580 provides control over value quantization behavior across the value range and
6581 the subsequent value resolution at any given level.")
6582 (license license:public-domain)))
6583
6584 (define-public java-cofoja
6585 (package
6586 (name "java-cofoja")
6587 (version "1.3")
6588 (source (origin
6589 (method git-fetch)
6590 (uri (git-reference
6591 (url "https://github.com/nhatminhle/cofoja.git")
6592 (commit (string-append "v" version))))
6593 (file-name (string-append "java-cofoja-" version "-checkout"))
6594 (sha256
6595 (base32
6596 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
6597 (build-system ant-build-system)
6598 (arguments
6599 `(#:build-target "dist"
6600 #:test-target "test"
6601 #:jdk ,icedtea-8
6602 #:make-flags
6603 (list "-Ddist.dir=dist")
6604 #:modules ((guix build ant-build-system)
6605 (guix build java-utils)
6606 (guix build utils)
6607 (srfi srfi-1)
6608 (ice-9 match))
6609 #:phases
6610 (modify-phases %standard-phases
6611 ;; The bulid system ignores the class path the ant-build-system sets
6612 ;; up and instead expects to find all dependencies in the "lib"
6613 ;; directory.
6614 (add-after 'unpack 'create-libdir
6615 (lambda* (#:key inputs #:allow-other-keys)
6616 (mkdir-p "lib")
6617 (for-each
6618 (lambda (file)
6619 (let ((target (string-append "lib/" (basename file))))
6620 (unless (file-exists? target)
6621 (symlink file target))))
6622 (append-map (match-lambda
6623 ((label . dir)
6624 (find-files dir "\\.jar$")))
6625 inputs))
6626 #t))
6627 (replace 'install (install-jars "dist")))))
6628 (inputs
6629 `(("java-asm" ,java-asm)))
6630 (native-inputs
6631 `(("java-junit" ,java-junit)))
6632 (home-page "https://github.com/nhatminhle/cofoja")
6633 (synopsis "Contracts for Java")
6634 (description "Contracts for Java, or Cofoja for short, is a contract
6635 programming framework and test tool for Java, which uses annotation processing
6636 and bytecode instrumentation to provide run-time checking. (In particular,
6637 this is not a static analysis tool.)")
6638 (license license:lgpl3+)))
6639
6640 (define-public java-aopalliance
6641 (package
6642 (name "java-aopalliance")
6643 (version "1.0")
6644 (source (origin
6645 (method git-fetch)
6646 ;; Note: this git repository is not official, but contains the
6647 ;; source code that is in the CVS repository. Downloading the
6648 ;; tarball from sourceforge is undeterministic, and the cvs download
6649 ;; fails.
6650 (uri (git-reference
6651 (url "https://github.com/hoverruan/aopalliance")
6652 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
6653 (file-name (string-append name "-" version))
6654 (sha256
6655 (base32
6656 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
6657 (build-system ant-build-system)
6658 (arguments
6659 `(#:jar-name "java-aopalliance.jar"
6660 #:jdk ,icedtea-8
6661 #:tests? #f; no tests
6662 #:source-dir "aopalliance/src/main"))
6663 (home-page "http://aopalliance.sourceforge.net")
6664 (synopsis "Aspect-Oriented Programming")
6665 (description "The AOP Alliance project is a joint project between several
6666 software engineering people who are interested in Aspect-Oriented Programming
6667 (AOP) and Java.")
6668 (license license:public-domain)))
6669
6670 (define-public java-javax-inject
6671 (package
6672 (name "java-javax-inject")
6673 (version "tck-1")
6674 (source (origin
6675 (method url-fetch)
6676 (uri (string-append "https://github.com/javax-inject/javax-inject/"
6677 "archive/javax.inject-" version ".tar.gz"))
6678 (sha256
6679 (base32
6680 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
6681 (build-system ant-build-system)
6682 (arguments
6683 `(#:jar-name "java-javax-inject.jar"
6684 #:jdk ,icedtea-8
6685 #:tests? #f)); no tests
6686 (home-page "http://github.com/javax-inject/javax-inject")
6687 (synopsis "JSR-330: Dependency Injection for Java")
6688 (description "This package specifies a means for obtaining objects in such
6689 a way as to maximize reusability, testability and maintainability compared to
6690 traditional approaches such as constructors, factories, and service locators
6691 (e.g., JNDI). This process, known as dependency injection, is beneficial to
6692 most nontrivial applications.
6693
6694 Many types depend on other types. For example, a @var{Stopwatch} might depend
6695 on a @var{TimeSource}. The types on which a type depends are known as its
6696 dependencies. The process of finding an instance of a dependency to use at run
6697 time is known as resolving the dependency. If no such instance can be found,
6698 the dependency is said to be unsatisfied, and the application is broken.")
6699 (license license:asl2.0)))
6700
6701 (define-public java-guice
6702 (package
6703 (name "java-guice")
6704 (version "4.1")
6705 (source (origin
6706 (method url-fetch)
6707 (uri (string-append "https://github.com/google/guice/archive/"
6708 version ".tar.gz"))
6709 (file-name (string-append name "-" version ".tar.gz"))
6710 (sha256
6711 (base32
6712 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
6713 (build-system ant-build-system)
6714 (arguments
6715 `(#:jar-name "java-guice.jar"
6716 #:jdk ,icedtea-8
6717 #:tests? #f; FIXME: tests are not in a java sub directory
6718 #:source-dir "core/src"))
6719 (inputs
6720 `(("guava" ,java-guava)
6721 ("java-cglib" ,java-cglib)
6722 ("java-aopalliance" ,java-aopalliance)
6723 ("java-javax-inject" ,java-javax-inject)
6724 ("java-asm" ,java-asm)))
6725 (home-page "https://github.com/google/guice")
6726 (synopsis "Lightweight dependency injection framework")
6727 (description "Guice is a lightweight dependency injection framework fo
6728 Java 6 and above.")
6729 (license license:asl2.0)))
6730
6731 (define-public java-guice-servlet
6732 (package
6733 (inherit java-guice)
6734 (name "java-guice-servlet")
6735 (arguments
6736 `(#:jar-name "guice-servlet.jar"
6737 #:source-dir "extensions/servlet/src/"
6738 #:jdk ,icedtea-8
6739 #:tests? #f)); FIXME: not in a java subdir
6740 (inputs
6741 `(("guice" ,java-guice)
6742 ("servlet" ,java-tomcat)
6743 ,@(package-inputs java-guice)))))
6744
6745 (define-public java-assertj
6746 (package
6747 (name "java-assertj")
6748 (version "3.8.0")
6749 (source (origin
6750 (method url-fetch)
6751 (uri (string-append "https://github.com/joel-costigliola/"
6752 "assertj-core/archive/"
6753 "assertj-core-" version ".tar.gz"))
6754 (sha256
6755 (base32
6756 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
6757 (build-system ant-build-system)
6758 (arguments
6759 `(#:jar-name "java-assertj.jar"
6760 #:jdk ,icedtea-8
6761 #:source-dir "src/main/java"
6762 #:tests? #f)); depends on tng-junit which depends on assertj
6763 (inputs
6764 `(("cglib" ,java-cglib)
6765 ("junit" ,java-junit)
6766 ("hamcrest" ,java-hamcrest-core)))
6767 (native-inputs
6768 `(("mockito" ,java-mockito-1)))
6769 (home-page "https://joel-costigliola.github.io/assertj/index.html")
6770 (synopsis "Fluent assertions for java")
6771 (description "AssertJ core is a Java library that provides a fluent
6772 interface for writing assertions. Its main goal is to improve test code
6773 readability and make maintenance of tests easier.")
6774 (license license:asl2.0)))
6775
6776 (define-public java-jboss-javassist
6777 (package
6778 (name "java-jboss-javassist")
6779 (version "3.21.0")
6780 (source (origin
6781 (method url-fetch)
6782 (uri (string-append "https://github.com/jboss-javassist/javassist/"
6783 "archive/rel_"
6784 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
6785 "_ga.tar.gz"))
6786 (sha256
6787 (base32
6788 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
6789 (build-system ant-build-system)
6790 (arguments
6791 `(#:jar-name "java-jboss-javassist.jar"
6792 #:jdk ,icedtea-8
6793 #:source-dir "src/main"
6794 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
6795 #:phases
6796 (modify-phases %standard-phases
6797 (add-before 'configure 'remove-binary
6798 (lambda _
6799 (delete-file "javassist.jar")
6800 #t)))))
6801 (native-inputs
6802 `(("junit" ,java-junit)))
6803 (home-page "https://github.com/jboss-javassist/javassist")
6804 (synopsis "Java bytecode engineering toolkit")
6805 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
6806 manipulation simple. It is a class library for editing bytecodes in Java; it
6807 enables Java programs to define a new class at runtime and to modify a class
6808 file when the JVM loads it.")
6809 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
6810
6811 (define-public java-jcommander
6812 (package
6813 (name "java-jcommander")
6814 (version "1.71")
6815 (source (origin
6816 (method url-fetch)
6817 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
6818 version ".tar.gz"))
6819 (file-name (string-append name "-" version ".tar.gz"))
6820 (sha256
6821 (base32
6822 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
6823 (build-system ant-build-system)
6824 (arguments
6825 `(#:jar-name "java-jcommander.jar"
6826 #:jdk ,icedtea-8
6827 #:tests? #f; requires testng which depends on jcommander
6828 #:source-dir "src/main/java"))
6829 (home-page "http://jcommander.org")
6830 (synopsis "Command line parameters parser")
6831 (description "JCommander is a very small Java framework that makes it
6832 trivial to parse command line parameters. Parameters are declared with
6833 annotations.")
6834 (license license:asl2.0)))
6835
6836 (define-public java-bsh
6837 (package
6838 (name "java-bsh")
6839 (version "2.0b6")
6840 (source (origin
6841 (method url-fetch)
6842 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
6843 version ".tar.gz"))
6844 (file-name (string-append name "-" version ".tar.gz"))
6845 (sha256
6846 (base32
6847 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
6848 (build-system ant-build-system)
6849 (arguments
6850 `(#:build-target "jarall"
6851 #:test-target "junit-tests-all"
6852 #:phases
6853 (modify-phases %standard-phases
6854 (replace 'install
6855 (lambda* (#:key outputs #:allow-other-keys)
6856 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
6857 (mkdir-p share)
6858 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
6859 #t))))))
6860 (home-page "http://beanshell.org/")
6861 (synopsis "Lightweight Scripting for Java")
6862 (description "BeanShell is a small, free, embeddable Java source
6863 interpreter with object scripting language features, written in Java.
6864 BeanShell dynamically executes standard Java syntax and extends it with common
6865 scripting conveniences such as loose types, commands, and method closures like
6866 those in Perl and JavaScript.")
6867 (license license:asl2.0)))
6868
6869 (define-public java-fest-util
6870 (package
6871 (name "java-fest-util")
6872 (version "1.2.5")
6873 (source (origin
6874 (method url-fetch)
6875 (uri (string-append "https://github.com/alexruiz/fest-util/"
6876 "archive/fest-util-" version ".tar.gz"))
6877 (sha256
6878 (base32
6879 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
6880 (build-system ant-build-system)
6881 (arguments
6882 `(#:jar-name "java-fest-util.jar"
6883 #:source-dir "src/main/java"))
6884 (native-inputs
6885 `(("junit" ,java-junit)
6886 ("hamcrest" ,java-hamcrest-core)))
6887 (home-page "https://github.com/alexruiz/fest-util")
6888 (synopsis "FEST common utilities")
6889 (description "Common utilities used in all FEST module.")
6890 (license license:asl2.0)))
6891
6892 (define-public java-fest-test
6893 (package
6894 (name "java-fest-test")
6895 (version "2.1.0")
6896 (source (origin
6897 (method url-fetch)
6898 (uri (string-append "https://github.com/alexruiz/fest-test/"
6899 "archive/fest-test-" version ".tar.gz"))
6900 (sha256
6901 (base32
6902 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
6903 (build-system ant-build-system)
6904 (arguments
6905 `(#:jar-name "java-fest-test.jar"
6906 #:source-dir "src/main/java"
6907 #:tests? #f)); no tests
6908 (inputs
6909 `(("junit" ,java-junit)))
6910 (home-page "https://github.com/alexruiz/fest-test")
6911 (synopsis "Common FEST testing infrastructure")
6912 (description "Fest-test contains the common FEST testing infrastructure.")
6913 (license license:asl2.0)))
6914
6915 (define-public java-fest-assert
6916 (package
6917 (name "java-fest-assert")
6918 (version "2.0M10")
6919 (source (origin
6920 (method url-fetch)
6921 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
6922 "archive/fest-assert-core-" version ".tar.gz"))
6923 (sha256
6924 (base32
6925 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
6926 (build-system ant-build-system)
6927 (arguments
6928 `(#:jar-name "java-fest-assert.jar"
6929 #:source-dir "src/main/java"
6930 #:test-exclude
6931 (list
6932 "**/Abstract*.java"
6933 "**/*BaseTest.java"
6934 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
6935 "**/MessageFormatter_format_Test.java"
6936 "**/internal/*/*_assert*_Test.java")))
6937 (inputs
6938 `(("java-fest-util" ,java-fest-util)))
6939 (native-inputs
6940 `(("java-junit" ,java-junit)
6941 ("java-fest-test" ,java-fest-test)
6942 ("java-hamcrest-core" ,java-hamcrest-core)
6943 ("java-mockito" ,java-mockito-1)
6944 ("java-cglib" ,java-cglib)
6945 ("java-objenesis" ,java-objenesis)
6946 ("java-asm" ,java-asm)))
6947 (home-page "https://github.com/alexruiz/fest-assert-2.x")
6948 (synopsis "FEST fluent assertions")
6949 (description "FEST-Assert provides a fluent interface for assertions.")
6950 (license license:asl2.0)))
6951
6952 (define-public java-testng
6953 (package
6954 (name "java-testng")
6955 (version "6.12")
6956 (source (origin
6957 (method url-fetch)
6958 (uri (string-append "https://github.com/cbeust/testng/archive/"
6959 version ".tar.gz"))
6960 (file-name (string-append name "-" version ".tar.gz"))
6961 (sha256
6962 (base32
6963 "01j2x47wkj7n5w6gpcjfbwgc88ai5654b23lb87w7nsrj63m3by6"))))
6964 (build-system ant-build-system)
6965 (arguments
6966 `(#:jdk ,icedtea-8; java.util.function
6967 #:jar-name "java-testng.jar"
6968 #:source-dir "src/main/java"
6969 #:phases
6970 (modify-phases %standard-phases
6971 (add-before 'build 'copy-resources
6972 (lambda _
6973 (copy-recursively "src/main/resources" "build/classes")
6974 #t))
6975 (add-before 'check 'copy-test-resources
6976 (lambda _
6977 (copy-recursively "src/test/resources" "build/test-classes")
6978 #t))
6979 (replace 'check
6980 (lambda _
6981 (system* "ant" "compile-tests")
6982 ;; we don't have groovy
6983 (substitute* "src/test/resources/testng.xml"
6984 (("<class name=\"test.groovy.GroovyTest\" />") ""))
6985 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
6986 ":build/classes"
6987 ":build/test-classes")
6988 "-Dtest.resources.dir=src/test/resources"
6989 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
6990 (propagated-inputs
6991 `(("junit" ,java-junit)
6992 ("java-jsr305" ,java-jsr305)
6993 ("java-bsh" ,java-bsh)
6994 ("java-jcommander" ,java-jcommander)
6995 ("java-guice" ,java-guice)
6996 ("snakeyaml" ,java-snakeyaml)))
6997 (native-inputs
6998 `(("guava" ,java-guava)
6999 ("java-javax-inject" ,java-javax-inject)
7000 ("java-hamcrest" ,java-hamcrest-all)
7001 ("java-assertj" ,java-assertj)
7002 ("cglib" ,java-cglib)
7003 ("asm" ,java-asm)
7004 ("aopalliance" ,java-aopalliance)))
7005 (home-page "http://testng.org")
7006 (synopsis "Testing framework")
7007 (description "TestNG is a testing framework inspired from JUnit and NUnit
7008 but introducing some new functionalities that make it more powerful and easier
7009 to use.")
7010 (license license:asl2.0)))
7011
7012 (define-public java-jnacl
7013 (package
7014 (name "java-jnacl")
7015 (version "0.1.0")
7016 (source (origin
7017 (method git-fetch)
7018 (uri (git-reference
7019 (url "https://github.com/neilalexander/jnacl")
7020 (commit "40c322e0a42637ab17cdf941138eeaf2494055f8")))
7021 (sha256
7022 (base32
7023 "1pspnmp44q61a2q4bpslpxw86rfn8s5l0xgvyrikqgdvg7ypx597"))))
7024 (build-system ant-build-system)
7025 (arguments
7026 `(#:jar-name "java-jnacl.jar"
7027 #:source-dir "src/main/java"
7028 #:jdk ,icedtea-8
7029 #:phases
7030 (modify-phases %standard-phases
7031 (add-before 'build 'fix-tests
7032 (lambda _
7033 (substitute* "src/test/java/com/neilalexander/jnacl/NaClTest.java"
7034 (("assertions.Assertions") "assertions.api.Assertions"))
7035 (substitute* "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java"
7036 (("assertions.Assertions") "assertions.api.Assertions"))
7037 #t))
7038 (replace 'check
7039 (lambda _
7040 (system* "ant" "compile-tests")
7041 (and
7042 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7043 ":build/classes"
7044 ":build/test-classes")
7045 "org.testng.TestNG" "-testclass"
7046 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class"))
7047 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7048 ":build/classes"
7049 ":build/test-classes")
7050 "org.testng.TestNG" "-testclass"
7051 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))))
7052 (native-inputs
7053 `(("java-testng" ,java-testng)
7054 ("java-fest-util" ,java-fest-util)
7055 ("java-fest-assert" ,java-fest-assert)))
7056 (home-page "https://github.com/neilalexander/jnacl")
7057 (synopsis "Java implementation of NaCl")
7058 (description "Pure Java implementation of the NaCl: Networking and
7059 Cryptography library.")
7060 (license license:mpl2.0)))
7061
7062 (define-public java-mvel2
7063 (package
7064 (name "java-mvel2")
7065 (version "2.3.1")
7066 (source (origin
7067 (method url-fetch)
7068 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
7069 version ".Final.tar.gz"))
7070 (sha256
7071 (base32
7072 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
7073 (build-system ant-build-system)
7074 (arguments
7075 `(#:jar-name "mvel2.jar"
7076 #:source-dir "src/main/java"
7077 #:test-exclude
7078 (list "**/Abstract*.java"
7079 ;; Base class with no tests
7080 "**/MVELThreadTest.java")
7081 #:phases
7082 (modify-phases %standard-phases
7083 (add-after 'install 'install-bin
7084 (lambda* (#:key outputs #:allow-other-keys)
7085 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
7086 (mkdir-p bin)
7087 (with-output-to-file (string-append bin "/mvel2")
7088 (lambda _
7089 (display
7090 (string-append
7091 "#!" (which "bash") "\n"
7092 "if [ \"$#\" -ne \"2\" ]; then\n"
7093 "echo 'Usage: mvel2 <script> <out.dir>'\n"
7094 "exit\n"
7095 "fi\n"
7096 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
7097 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
7098 " org.mvel2.sh.Main $1"))))
7099 (chmod (string-append bin "/mvel2") #o755))
7100 #t)))))
7101 (native-inputs
7102 `(("junit" ,java-junit)
7103 ("hamcrest" ,java-hamcrest-core)))
7104 (home-page "https://github.com/mvel/mvel")
7105 (synopsis "MVFLEX Expression Language")
7106 (description "MVEL has largely been inspired by Java syntax, but has some
7107 fundamental differences aimed at making it more efficient as an expression
7108 language, such as operators that directly support collection, array and string
7109 matching, as well as regular expressions. MVEL is used to evaluate expressions
7110 written using Java syntax.
7111
7112 In addition to the expression language, MVEL serves as a templating language for
7113 configuration and string construction.")
7114 (license license:asl2.0)))
7115
7116 (define-public java-commons-jexl-2
7117 (package
7118 (name "java-commons-jexl")
7119 (version "2.1.1")
7120 (source (origin
7121 (method url-fetch)
7122 (uri (string-append "mirror://apache/commons/jexl/source/"
7123 "commons-jexl-" version "-src.tar.gz"))
7124 (sha256
7125 (base32
7126 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
7127 (build-system ant-build-system)
7128 (arguments
7129 `(#:jar-name "commons-jexl-2.jar"
7130 #:jdk ,icedtea-8
7131 #:source-dir "src/main/java"
7132 #:phases
7133 (modify-phases %standard-phases
7134 (add-before 'check 'disable-broken-tests
7135 (lambda* (#:key inputs #:allow-other-keys)
7136 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
7137 (substitute* "ArithmeticTest.java"
7138 (("asserter.assertExpression\\(\"3 / 0\"") "//")
7139 (("asserter.assertExpression\\(\"imanull") "//"))
7140 ;; This test fails with "ambiguous method invocation"
7141 (delete-file "CacheTest.java")
7142 ;; This test doesn't have access to the temp directory
7143 (substitute* "ClassCreatorTest.java"
7144 (("java.io.tmpdir") "user.dir"))
7145 ;; This test fails in trying to detect whether it can run.
7146 (substitute* "ClassCreator.java"
7147 (("boolean canRun =.*") "boolean canRun = false;\n"))
7148 ;; ...and these tests depend on it.
7149 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
7150 (delete-file "scripting/JexlScriptEngineTest.java"))
7151 #t))
7152 (add-before 'build 'run-javacc
7153 (lambda _
7154 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
7155 (and (zero? (system* "java" "jjtree" "Parser.jjt"))
7156 (zero? (system* "java" "javacc" "Parser.jj")))))))))
7157 (inputs
7158 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
7159 (native-inputs
7160 `(("java-junit" ,java-junit)
7161 ("java-hamcrest-core" ,java-hamcrest-core)
7162 ("javacc" ,javacc-4)))
7163 (home-page "https://commons.apache.org/proper/commons-jexl/")
7164 (synopsis "Java Expression Language ")
7165 (description "JEXL is a library intended to facilitate the implementation
7166 of dynamic and scripting features in applications and frameworks written in
7167 Java. JEXL implements an Expression Language based on some extensions to the
7168 JSTL Expression Language supporting most of the constructs seen in
7169 shell-script or ECMAScript. Its goal is to expose scripting features usable
7170 by technical operatives or consultants working with enterprise platforms.")
7171 (license license:asl2.0)))
7172
7173 (define-public java-lz4
7174 (package
7175 (name "java-lz4")
7176 (version "1.4.0")
7177 (source (origin
7178 (method url-fetch)
7179 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
7180 version ".tar.gz"))
7181 (file-name (string-append name "-" version ".tar.gz"))
7182 (sha256
7183 (base32
7184 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
7185 (build-system ant-build-system)
7186 (arguments
7187 `(#:jar-name "lz4.jar"
7188 #:jdk ,icedtea-8
7189 #:source-dir "src/java:src/java-unsafe"
7190 #:tests? #f; FIXME: requires more dependencies
7191 #:phases
7192 (modify-phases %standard-phases
7193 (add-before 'configure 'generate-source
7194 (lambda _
7195 (with-directory-excursion "src/build/source_templates"
7196 (zero? (system* "mvel2" "../gen_sources.mvel" "../../java"))))))))
7197 (native-inputs
7198 `(("mvel" ,java-mvel2)))
7199 (home-page "https://jpountz.github.io/lz4-java")
7200 (synopsis "Compression algorithm")
7201 (description "LZ4 - Java is a Java port of the popular lz4 compression
7202 algorithms and xxHash hashing algorithm.")
7203 (license license:asl2.0)))
7204
7205 (define-public java-bouncycastle-bcprov
7206 (package
7207 (name "java-bouncycastle-bcprov")
7208 (version "1.58")
7209 (source (origin
7210 (method url-fetch)
7211 (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
7212 (sha256
7213 (base32
7214 "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
7215 (build-system ant-build-system)
7216 (arguments
7217 `(#:jar-name "bouncycastle-bcprov.jar"
7218 #:tests? #f; no tests
7219 #:source-dir "src"
7220 #:phases
7221 (modify-phases %standard-phases
7222 (add-before 'configure 'unzip-src
7223 (lambda _
7224 (mkdir-p "src")
7225 (with-directory-excursion "src"
7226 (zero? (system* "unzip" "../src.zip"))))))))
7227 (native-inputs
7228 `(("unzip" ,unzip)
7229 ("junit" ,java-junit)))
7230 (home-page "https://www.bouncycastle.org")
7231 (synopsis "Cryptographic library")
7232 (description "Bouncy Castle Provider (bcprov) is a cryptographic library
7233 for the Java programming language.")
7234 (license license:expat)))
7235
7236 (define-public java-bouncycastle-bcpkix
7237 (package
7238 (name "java-bouncycastle-bcpkix")
7239 (version "1.58")
7240 (source (origin
7241 (method url-fetch)
7242 (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
7243 (sha256
7244 (base32
7245 "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
7246 (build-system ant-build-system)
7247 (arguments
7248 `(#:jar-name "bouncycastle-bcpkix.jar"
7249 #:tests? #f; no tests
7250 #:source-dir "src"
7251 #:phases
7252 (modify-phases %standard-phases
7253 (add-before 'configure 'unzip-src
7254 (lambda _
7255 (mkdir-p "src")
7256 (with-directory-excursion "src"
7257 (zero? (system* "unzip" "../src.zip"))))))))
7258 (native-inputs
7259 `(("unzip" ,unzip)
7260 ("junit" ,java-junit)))
7261 (inputs
7262 `(("bcprov" ,java-bouncycastle-bcprov)))
7263 (home-page "https://www.bouncycastle.org")
7264 (synopsis "Cryptographic library")
7265 (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
7266 CMP, and CRMF.")
7267 (license license:expat)))
7268
7269 (define-public java-lmax-disruptor
7270 (package
7271 (name "java-lmax-disruptor")
7272 (version "3.3.7")
7273 (source (origin
7274 (method url-fetch)
7275 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
7276 "archive/" version ".tar.gz"))
7277 (file-name (string-append name "-" version ".tar.gz"))
7278 (sha256
7279 (base32
7280 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
7281 (build-system ant-build-system)
7282 (arguments
7283 `(#:jar-name "java-lmax-disruptor.jar"
7284 #:jdk ,icedtea-8
7285 #:tests? #f)); tests hang
7286 (inputs
7287 `(("junit" ,java-junit)
7288 ("java-hdrhistogram" ,java-hdrhistogram)
7289 ("java-jmock" ,java-jmock)
7290 ("java-jmock-legacy" ,java-jmock-legacy)
7291 ("java-jmock-junit4" ,java-jmock-junit4)
7292 ("java-hamcrest-all" ,java-hamcrest-all)))
7293 (native-inputs
7294 `(("cglib" ,java-cglib)
7295 ("objenesis" ,java-objenesis)
7296 ("asm" ,java-asm)))
7297 (home-page "https://www.lmax.com/disruptor")
7298 (synopsis "High performance inter-thread communication")
7299 (description "LMAX Disruptor is a software pattern and software component
7300 for high performance inter-thread communication that avoids the need for
7301 message queues or resource locking.")
7302 (license license:asl2.0)))
7303
7304 (define-public java-commons-bcel
7305 (package
7306 (name "java-commons-bcel")
7307 (version "6.1")
7308 (source (origin
7309 (method url-fetch)
7310 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
7311 version "-src.tar.gz"))
7312 (sha256
7313 (base32
7314 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
7315 (build-system ant-build-system)
7316 (arguments
7317 `(#:jar-name "bcel.jar"
7318 #:jdk ,icedtea-8
7319 #:source-dir "src/main/java"
7320 #:test-dir "src/test/java"
7321 ;; FIXME: Tests require the unpackaged jna.
7322 #:tests? #f))
7323 (home-page "https://commons.apache.org/proper/commons-bcel/")
7324 (synopsis "Byte code engineering library")
7325 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
7326 intended to give users a convenient way to analyze, create, and
7327 manipulate (binary) Java class files. Classes are represented by objects
7328 which contain all the symbolic information of the given class: methods, fields
7329 and byte code instructions, in particular.
7330
7331 Such objects can be read from an existing file, be transformed by a
7332 program (e.g. a class loader at run-time) and written to a file again. An
7333 even more interesting application is the creation of classes from scratch at
7334 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
7335 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
7336 of Java @code{.class} files.")
7337 (license license:asl2.0)))
7338
7339 (define-public java-xerial-core
7340 (package
7341 (name "java-xerial-core")
7342 (version "2.1")
7343 (source (origin
7344 (method url-fetch)
7345 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
7346 version ".tar.gz"))
7347 (file-name (string-append name "-" version ".tar.gz"))
7348 (sha256
7349 (base32
7350 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
7351 (build-system ant-build-system)
7352 (arguments
7353 `(#:jar-name "xerial-core.jar"
7354 #:source-dir "xerial-core/src/main/java"
7355 #:test-dir "xerial-core/src/test"
7356 #:phases
7357 (modify-phases %standard-phases
7358 (add-before 'build 'copy-resources
7359 (lambda _
7360 (copy-recursively "xerial-core/src/main/resources"
7361 "build/classes")
7362 #t)))))
7363 (native-inputs
7364 `(("junit" ,java-junit)
7365 ("hamcrest" ,java-hamcrest-core)))
7366 (home-page "https://github.com/xerial/xerial-java")
7367 (synopsis "Data management libraries for Java")
7368 (description "Xerial is a set of data management libraries for the Java
7369 programming language. The ultimate goal of the Xerial project is to manage
7370 everything as database, including class objects, text format data, data
7371 streams, etc.")
7372 (license license:asl2.0)))
7373
7374 (define-public java-powermock-reflect
7375 (package
7376 (name "java-powermock-reflect")
7377 (version "1.7.3")
7378 (source (origin
7379 (method url-fetch)
7380 (uri (string-append "https://github.com/powermock/powermock/"
7381 "archive/powermock-" version ".tar.gz"))
7382 (file-name (string-append name "-" version ".tar.gz"))
7383 (sha256
7384 (base32
7385 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
7386 (patches
7387 (search-patches "java-powermock-fix-java-files.patch"))))
7388 (build-system ant-build-system)
7389 (arguments
7390 `(#:jar-name "java-powermock-reflect.jar"
7391 #:jdk ,icedtea-8
7392 #:source-dir "powermock-reflect/src/main/java"
7393 #:test-dir "powermock-reflect/src/test"))
7394 (inputs
7395 `(("java-objenesis" ,java-objenesis)))
7396 (native-inputs
7397 `(("junit" ,java-junit)
7398 ("cglib" ,java-cglib)
7399 ("asm" ,java-asm)
7400 ("hamcrest" ,java-hamcrest-core)
7401 ("assertj" ,java-assertj)))
7402 (home-page "https://github.com/powermock/powermock")
7403 (synopsis "Mock library extension framework")
7404 (description "PowerMock is a framework that extends other mock libraries
7405 such as EasyMock with more powerful capabilities. PowerMock uses a custom
7406 classloader and bytecode manipulation to enable mocking of static methods,
7407 constructors, final classes and methods, private methods, removal of static
7408 initializers and more. By using a custom classloader no changes need to be
7409 done to the IDE or continuous integration servers which simplifies adoption.")
7410 (license license:asl2.0)))
7411
7412 (define-public java-powermock-core
7413 (package
7414 (inherit java-powermock-reflect)
7415 (name "java-powermock-core")
7416 (arguments
7417 `(#:jar-name "java-powermock-core.jar"
7418 #:source-dir "powermock-core/src/main/java"
7419 #:test-dir "powermock-core/src/test"
7420 #:tests? #f; requires powermock-api
7421 #:jdk ,icedtea-8
7422 #:phases
7423 (modify-phases %standard-phases
7424 (add-before 'build 'copy-resources
7425 (lambda _
7426 (copy-recursively "powermock-core/src/main/resources"
7427 "build/classes"))))))
7428 (inputs
7429 `(("reflect" ,java-powermock-reflect)
7430 ("javassist" ,java-jboss-javassist)))
7431 (native-inputs
7432 `(("junit" ,java-junit)
7433 ("assertj" ,java-assertj)
7434 ("mockito" ,java-mockito-1)))))
7435
7436 (define-public java-powermock-api-support
7437 (package
7438 (inherit java-powermock-reflect)
7439 (name "java-powermock-api-support")
7440 (build-system ant-build-system)
7441 (arguments
7442 `(#:jar-name "java-powermock-api-support.jar"
7443 #:jdk ,icedtea-8
7444 #:source-dir "powermock-api/powermock-api-support/src/main/java"
7445 #:tests? #f)); no tests
7446 (inputs
7447 `(("core" ,java-powermock-core)
7448 ("reflect" ,java-powermock-reflect)))))
7449
7450 (define-public java-powermock-modules-junit4-common
7451 (package
7452 (inherit java-powermock-reflect)
7453 (name "java-powermock-modules-junit4-common")
7454 (build-system ant-build-system)
7455 (arguments
7456 `(#:jar-name "java-powermock-modules-junit4-common.jar"
7457 #:jdk ,icedtea-8
7458 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
7459 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
7460 (inputs
7461 `(("core" ,java-powermock-core)
7462 ("easymock" ,java-easymock)
7463 ("reflect" ,java-powermock-reflect)
7464 ("hamcrest" ,java-hamcrest-core)
7465 ("cglib" ,java-cglib)))))
7466
7467 (define-public java-powermock-modules-junit4
7468 (package
7469 (inherit java-powermock-reflect)
7470 (name "java-powermock-modules-junit4")
7471 (build-system ant-build-system)
7472 (arguments
7473 `(#:jar-name "java-powermock-modules-junit4.jar"
7474 #:jdk ,icedtea-8
7475 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
7476 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
7477 #:phases
7478 (modify-phases %standard-phases
7479 (add-before 'build 'fix-junit-detection
7480 (lambda _
7481 ;; Our junit version is 4.12-SNAPSHOT
7482 (substitute* (find-files "powermock-modules/powermock-module-junit4"
7483 "PowerMockJUnit4MethodValidator.java")
7484 (("4.12") "4.12-SNAPSHOT")))))))
7485 (inputs
7486 `(("core" ,java-powermock-core)
7487 ("reflect" ,java-powermock-reflect)
7488 ("common" ,java-powermock-modules-junit4-common)
7489 ("cglib" ,java-cglib)))
7490 (native-inputs
7491 `(("easymock" ,java-easymock)
7492 ("hamcrest" ,java-hamcrest-core)
7493 ("objenesis" ,java-objenesis)
7494 ("asm" ,java-asm)
7495 ("junit" ,java-junit)))))
7496
7497 (define-public java-powermock-api-easymock
7498 (package
7499 (inherit java-powermock-reflect)
7500 (name "java-powermock-api-easymock")
7501 (build-system ant-build-system)
7502 (arguments
7503 `(#:jar-name "java-powermock-api-easymock.jar"
7504 #:jdk ,icedtea-8
7505 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
7506 #:tests? #f; no tests
7507 #:phases
7508 (modify-phases %standard-phases
7509 (add-before 'build 'fix-file
7510 (lambda _
7511 ;; FIXME: This looks wrong, but it fixes a build error.
7512 (with-directory-excursion "powermock-api/powermock-api-easymock"
7513 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
7514 (("classLoader instanceof MockClassLoader") "false")
7515 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
7516 #t)))))
7517 (inputs
7518 `(("core" ,java-powermock-core)
7519 ("easymock" ,java-easymock)
7520 ("reflect" ,java-powermock-reflect)
7521 ("support" ,java-powermock-api-support)
7522 ("cglib" ,java-cglib)))))
7523
7524 (define-public java-jboss-jms-api-spec
7525 (package
7526 (name "java-jboss-jms-api-spec")
7527 (version "2.0")
7528 (source (origin
7529 (method url-fetch)
7530 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
7531 "archive/jboss-jms-api_" version
7532 "_spec-1.0.1.Final.tar.gz"))
7533 (sha256
7534 (base32
7535 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
7536 (build-system ant-build-system)
7537 (arguments
7538 `(#:jar-name "java-jboss-jms-api_spec.jar"
7539 #:jdk ,icedtea-8
7540 #:source-dir "."
7541 #:tests? #f)); no tests
7542 (home-page "https://github.com/jboss/jboss-jms-api_spec")
7543 (synopsis "Java Message Service API specification")
7544 (description "Java Message Service (JMS) API is used to send messages
7545 messages between two or more clients. It is a messaging standard that allows
7546 application components to create, send, receive, and read messages.")
7547 ; either gpl2 only with GPL Classpath Exception, or cddl.
7548 (license (list license:gpl2 license:cddl1.0))))
7549
7550 (define-public java-mail
7551 (package
7552 (name "java-mail")
7553 (version "1.6.0")
7554 (source (origin
7555 (method url-fetch)
7556 (uri (string-append "https://github.com/javaee/javamail/archive/"
7557 "JAVAMAIL-1_6_0.tar.gz"))
7558 (sha256
7559 (base32
7560 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
7561 (build-system ant-build-system)
7562 (arguments
7563 `(#:jar-name "java-mail.jar"
7564 #:jdk ,icedtea-8
7565 #:source-dir "mail/src/main/java"
7566 #:test-dir "mail/src/test"
7567 #:test-exclude
7568 (list "**/CollectorFormatterTest.java"
7569 "**/CompactFormatterTest.java"
7570 "**/DurationFilterTest.java"
7571 "**/MailHandlerTest.java"
7572 "**/GetLocalAddressTest.java"
7573 ;; FIXME: both end with:
7574 ;; java.lang.ClassNotFoundException:
7575 ;; javax.mail.internet.MimeMultipartParseTest
7576 "**/MimeMultipartParseTest.java"
7577 "**/SearchTermSerializationTest.java")
7578 #:phases
7579 (modify-phases %standard-phases
7580 (add-before 'configure 'move-version.java
7581 (lambda _
7582 (copy-file "mail/src/main/resources/javax/mail/Version.java"
7583 "mail/src/main/java/javax/mail/Version.java")
7584 #t))
7585 (add-before 'build 'copy-resources
7586 (lambda _
7587 (copy-recursively "mail/src/main/resources/META-INF"
7588 "build/classes/META-INF")
7589 #t)))))
7590 (native-inputs
7591 `(("junit" ,java-junit)
7592 ("hamcrest" ,java-hamcrest-core)))
7593 (home-page "https://javaee.github.io/javamail/")
7594 (synopsis "Mail-related functionnalities in Java")
7595 (description "The JavaMail API provides a platform-independent and
7596 protocol-independent framework to build mail and messaging applications.")
7597 ;; General Public License Version 2 only ("GPL") or the Common Development
7598 ;; and Distribution License("CDDL")
7599 (license (list license:cddl1.1
7600 license:gpl2)))); with classpath exception
7601
7602 (define-public java-jeromq
7603 (package
7604 (name "java-jeromq")
7605 (version "0.4.2")
7606 (source (origin
7607 (method url-fetch)
7608 (uri (string-append "https://github.com/zeromq/jeromq/archive/v"
7609 version ".tar.gz"))
7610 (file-name (string-append name "-" version ".tar.gz"))
7611 (sha256
7612 (base32
7613 "17wx8dlyqmbw77xf6d6wxnhiyky6181zpf1a48jqzz9hidz0j841"))))
7614 (build-system ant-build-system)
7615 (arguments
7616 `(#:jar-name "java-jeromq.jar"
7617 #:source-dir "src/main/java"
7618 #:jdk ,icedtea-8
7619 #:test-exclude
7620 (list
7621 "**/Abstract*.java"
7622 ;; Requires network
7623 "**/ZBeaconTest.java"
7624 ;; Failures
7625 "**/CustomDecoderTest.java"
7626 "**/CustomEncoderTest.java")))
7627 (inputs
7628 `(("java-jnacl" ,java-jnacl)))
7629 (native-inputs
7630 `(("java-hamcrest-core" ,java-hamcrest-core)
7631 ("junit" ,java-junit)))
7632 (home-page "http://zeromq.org/bindings:java")
7633 (synopsis "Java binding for 0MQ")
7634 (description "Jeromq provides the java bindings for 0MQ.")
7635 (license license:mpl2.0)))
7636
7637 (define-public java-kafka-clients
7638 (package
7639 (name "java-kafka-clients")
7640 (version "1.0.0")
7641 (source (origin
7642 (method url-fetch)
7643 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
7644 version "-src.tgz"))
7645 (sha256
7646 (base32
7647 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
7648 (build-system ant-build-system)
7649 (arguments
7650 `(#:jar-name "java-kafka-clients.jar"
7651 #:jdk ,icedtea-8
7652 #:source-dir "clients/src/main/java"
7653 #:test-dir "clients/src/test"
7654 #:test-exclude
7655 (list
7656 ;; This file does not contain a class
7657 "**/IntegrationTest.java"
7658 ;; Requires network
7659 "**/ClientUtilsTest.java"
7660 ;; End with errors that seem related to our powermock
7661 "**/KafkaProducerTest.java"
7662 "**/BufferPoolTest.java")))
7663 (inputs
7664 `(("java-slf4j-api" ,java-slf4j-api)
7665 ("java-lz4" ,java-lz4)))
7666 (native-inputs
7667 `(("junit" ,java-junit)
7668 ("hamcrest" ,java-hamcrest-all)
7669 ("objenesis" ,java-objenesis)
7670 ("asm" ,java-asm)
7671 ("cglib" ,java-cglib)
7672 ("javassist" ,java-jboss-javassist)
7673 ("snappy" ,java-snappy)
7674 ("easymock" ,java-easymock)
7675 ("powermock" ,java-powermock-core)
7676 ("powermock-easymock" ,java-powermock-api-easymock)
7677 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
7678 ("powermock-junit4" ,java-powermock-modules-junit4)
7679 ("powermock-support" ,java-powermock-api-support)
7680 ("bouncycastle" ,java-bouncycastle-bcprov)
7681 ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
7682 (home-page "https://kafka.apache.org")
7683 (synopsis "Distributed streaming platform")
7684 (description "Kafka is a distributed streaming platform, which means:
7685 @itemize
7686 @item it can publish and subscribe to streams of records;
7687 @item it can store streams of records in a fault-tolerant way;
7688 @item it can process streams of records as they occur.
7689 @end itemize")
7690 ;; Either cddl or gpl2 only.
7691 (license (list license:cddl1.1; actually cddl1.1
7692 license:gpl2)))); with classpath exception
7693
7694 (define-public java-jdom
7695 (package
7696 (name "java-jdom")
7697 (version "1.1.3")
7698 (source (origin
7699 (method url-fetch)
7700 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
7701 version ".tar.gz"))
7702 (sha256
7703 (base32
7704 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
7705 (build-system ant-build-system)
7706 (arguments
7707 `(#:build-target "package"
7708 #:tests? #f; tests are run as part of the build process
7709 #:phases
7710 (modify-phases %standard-phases
7711 (replace 'install
7712 (install-jars "build")))))
7713 (home-page "http://jdom.org/")
7714 (synopsis "Access, manipulate, and output XML data")
7715 (description "Java-based solution for accessing, manipulating, and
7716 outputting XML data from Java code.")
7717 (license license:bsd-4)))
7718
7719 (define-public java-geronimo-xbean-reflect
7720 (package
7721 (name "java-geronimo-xbean-reflect")
7722 (version "4.5")
7723 (source (origin
7724 (method svn-fetch)
7725 (uri (svn-reference
7726 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
7727 (revision 1807396)))
7728 (file-name (string-append name "-" version))
7729 (sha256
7730 (base32
7731 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
7732 (build-system ant-build-system)
7733 (arguments
7734 `(#:jar-name "geronimo-xbean-reflect.jar"
7735 #:source-dir "xbean-reflect/src/main/java"
7736 #:test-dir "xbean-reflect/src/test"
7737 #:jdk ,icedtea-8
7738 #:test-exclude
7739 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
7740 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
7741 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
7742 #:phases
7743 (modify-phases %standard-phases
7744 (add-before 'build 'fix-source
7745 (lambda _
7746 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
7747 ;; org.apache.xbean.asm6 is actually repackaged java-asm
7748 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
7749 (("org.apache.xbean.asm5") "org.objectweb.asm"))
7750 #t))))))
7751 (inputs
7752 `(("asm" ,java-asm)
7753 ("log4j" ,java-log4j-api)
7754 ("log4j-1.2" ,java-log4j-1.2-api)
7755 ("log4j-core" ,java-log4j-core)
7756 ("logging" ,java-commons-logging-minimal)))
7757 (native-inputs
7758 `(("junit" ,java-junit)))
7759 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
7760 (synopsis "Dependency injection helper")
7761 (description "Xbean-reflect provides very flexible ways to create objects
7762 and graphs of objects for dependency injection frameworks")
7763 (license license:asl2.0)))