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