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