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