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