projects/guix·blob version-1.1.0 · refs

11834 lines · 495.6 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2016 Leo Famulari <[email protected]>
4;;; Copyright © 2016, 2017 Roel Janssen <[email protected]>
5;;; Copyright © 2017, 2019 Carlo Zancanaro <[email protected]>
6;;; Copyright © 2017, 2018, 2019 Julien Lepiller <[email protected]>
7;;; Copyright © 2017 Thomas Danckaert <[email protected]>
8;;; Copyright © 2016, 2017, 2018 Alex Vong <[email protected]>
9;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2018, 2019 Gábor Boskovits <[email protected]>
11;;; Copyright © 2018 Chris Marusich <[email protected]>
12;;; Copyright © 2018, 2019, 2020 Efraim Flashner <[email protected]>
13;;; Copyright © 2019, 2020 Björn Höfling <[email protected]>
14;;; Copyright © 2020 Raghav Gururajan <[email protected]>
15;;; Copyright © 2020 Maxim Cournoyer <[email protected]>
16
17;;;
18;;; This file is part of GNU Guix.
19;;;
20;;; GNU Guix is free software; you can redistribute it and/or modify it
21;;; under the terms of the GNU General Public License as published by
22;;; the Free Software Foundation; either version 3 of the License, or (at
23;;; your option) any later version.
24;;;
25;;; GNU Guix is distributed in the hope that it will be useful, but
26;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28;;; GNU General Public License for more details.
29;;;
30;;; You should have received a copy of the GNU General Public License
31;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33(define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module (guix utils)
41 #:use-module (guix build-system ant)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system trivial)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages attr)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages certs)
50 #:use-module (gnu packages cpio)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages elf)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages gawk)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gcc)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages ghostscript) ;lcms
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages groovy)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages icu4c)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages java-compression)
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages linux) ;alsa
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages nss)
71 #:use-module (gnu packages onc-rpc)
72 #:use-module (gnu packages web)
73 #:use-module (gnu packages wget)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages perl)
76 #:use-module (gnu packages popt)
77 #:use-module (gnu packages kerberos)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
80 #:use-module (gnu packages texinfo)
81 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
82 #:use-module (srfi srfi-11)
83 #:use-module (ice-9 match))
84
85
86;;;
87;;; Java bootstrap toolchain.
88;;;
89
90;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
91;; use it to build a simple version of GNU Classpath, the Java standard
92;; library. We chose version 0.93 because it is the last version that can be
93;; built with Jikes. With Jikes and this version of GNU Classpath we can
94;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
95;; the last version of JamVM that works with a version of GNU classpath that
96;; does not require ECJ. These three packages make up the bootstrap JDK.
97
98;; This is sufficient to build an older version of Ant, which is needed to
99;; build an older version of ECJ, an incremental Java compiler, both of which
100;; are written in Java.
101;;
102;; ECJ is needed to build the latest release (0.99) and the development
103;; version of GNU Classpath. The development version of GNU Classpath has
104;; much more support for Java 1.6 than the latest release, but we need to
105;; build 0.99 first to get a working version of javah. ECJ, the development
106;; version of GNU Classpath, and the latest version of JamVM make up the
107;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
108;; build framework. We then build the more recent JDKs Icedtea 2.x and
109;; Icedtea 3.x.
110
111(define-public libantlr3c
112 (package
113 (name "libantlr3c")
114 (version "3.4")
115 (source
116 (origin
117 (method url-fetch)
118 (uri
119 (string-append "https://www.antlr3.org/download/C/"
120 name "-" version ".tar.gz"))
121 (sha256
122 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
123 (build-system gnu-build-system)
124 (arguments
125 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
126 #:phases (modify-phases %standard-phases
127 (replace 'configure
128 (lambda* (#:key build target native-inputs inputs outputs
129 (configure-flags '()) out-of-source? system
130 #:allow-other-keys)
131 (let ((configure (assoc-ref %standard-phases 'configure))
132 (enable-64bit? (member system '("aarch64-linux"
133 "x86_64-linux"
134 "mips64el-linux"))))
135 (configure #:build build #:target target
136 #:native-inputs native-inputs
137 #:inputs inputs #:outputs outputs
138 #:configure-flags `(,(if enable-64bit?
139 "--enable-64bit"
140 '())
141 ,@configure-flags)
142 #:out-of-source? out-of-source?)))))))
143 (synopsis "ANTLR C Library")
144 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
145Tool for Language Recognition v3).")
146 (home-page "https://www.antlr3.org/")
147 (license license:bsd-3)))
148
149(define jikes
150 (package
151 (name "jikes")
152 (version "1.22")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
156 version "/jikes-" version ".tar.bz2"))
157 (sha256
158 (base32
159 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
160 (build-system gnu-build-system)
161 (home-page "http://jikes.sourceforge.net/")
162 (synopsis "Compiler for the Java language")
163 (description "Jikes is a compiler that translates Java source files as
164defined in The Java Language Specification into the bytecoded instruction set
165and binary format defined in The Java Virtual Machine Specification.")
166 (license license:ibmpl1.0)))
167
168;; This is the last version of GNU Classpath that can be built without ECJ.
169(define classpath-bootstrap
170 (package
171 (name "classpath")
172 (version "0.93")
173 (source (origin
174 (method url-fetch)
175 (uri (string-append "mirror://gnu/classpath/classpath-"
176 version ".tar.gz"))
177 (sha256
178 (base32
179 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
180 (patches (search-patches "classpath-aarch64-support.patch"))))
181 (build-system gnu-build-system)
182 (arguments
183 `(#:configure-flags
184 (list (string-append "JAVAC="
185 (assoc-ref %build-inputs "jikes")
186 "/bin/jikes")
187 "--disable-Werror"
188 "--disable-gmp"
189 "--disable-gtk-peer"
190 "--disable-gconf-peer"
191 "--disable-plugin"
192 "--disable-dssi"
193 "--disable-alsa"
194 "--disable-gjdoc")
195 #:phases
196 (modify-phases %standard-phases
197 ;; XXX: This introduces a memory leak as we remove a call to free up
198 ;; memory for the file name string. This was necessary because of a
199 ;; runtime error that would have prevented us from building
200 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
201 ;; for the gnarly details.
202 (add-after 'unpack 'remove-call-to-free
203 (lambda _
204 (substitute* "native/jni/java-io/java_io_VMFile.c"
205 (("result = cpio_isFileExists.*" m)
206 (string-append m "\n//")))
207 #t))
208 (add-after 'install 'install-data
209 (lambda _ (invoke "make" "install-data"))))))
210 (native-inputs
211 `(("jikes" ,jikes)
212 ("fastjar" ,fastjar)
213 ("libltdl" ,libltdl)
214 ("pkg-config" ,pkg-config)))
215 (home-page "https://www.gnu.org/software/classpath/")
216 (synopsis "Essential libraries for Java")
217 (description "GNU Classpath is a project to create core class libraries
218for use with runtimes, compilers and tools for the Java programming
219language.")
220 ;; GPLv2 or later, with special linking exception.
221 (license license:gpl2+)))
222
223;; This is the last version of JamVM that works with a version of GNU
224;; classpath that does not require ECJ.
225(define jamvm-1-bootstrap
226 (package
227 (name "jamvm")
228 (version "1.5.1")
229 (source (origin
230 (method url-fetch)
231 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
232 "JamVM%20" version "/jamvm-"
233 version ".tar.gz"))
234 (patches (search-patches "jamvm-arm.patch"))
235 (sha256
236 (base32
237 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
238 (snippet
239 '(begin
240 ;; Remove precompiled software.
241 (delete-file "lib/classes.zip")
242 #t))))
243 (build-system gnu-build-system)
244 (arguments
245 `(#:configure-flags
246 (list (string-append "--with-classpath-install-dir="
247 (assoc-ref %build-inputs "classpath"))
248 "--disable-int-caching"
249 "--enable-runtime-reloc-checks"
250 "--enable-ffi")))
251 (inputs
252 `(("classpath" ,classpath-bootstrap)
253 ("jikes" ,jikes)
254 ("libffi" ,libffi)
255 ("zip" ,zip)
256 ("zlib" ,zlib)))
257 ;; When built with a recent GCC and glibc the configure step of icedtea-6
258 ;; fails with an invalid instruction error.
259 (native-inputs
260 `(("gcc" ,gcc-5)
261 ("libc" ,glibc-2.28)))
262 (home-page "http://jamvm.sourceforge.net/")
263 (synopsis "Small Java Virtual Machine")
264 (description "JamVM is a Java Virtual Machine conforming to the JVM
265specification edition 2 (blue book). It is extremely small. However, unlike
266other small VMs it supports the full spec, including object finalisation and
267JNI.")
268 (license license:gpl2+)))
269
270(define ant-bootstrap
271 (package
272 (name "ant-bootstrap")
273 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
274 ;; are not supported. The 1.8.x series is the last to use only features
275 ;; supported by Jikes.
276 (version "1.8.4")
277 (source (origin
278 (method url-fetch)
279 (uri (string-append "http://archive.apache.org/dist/"
280 "ant/source/apache-ant-"
281 version "-src.tar.bz2"))
282 (sha256
283 (base32
284 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
285 (build-system gnu-build-system)
286 (arguments
287 `(#:imported-modules ((guix build syscalls)
288 ,@%gnu-build-system-modules)
289 #:modules ((srfi srfi-1)
290 (guix build gnu-build-system)
291 (guix build utils)
292 (guix build syscalls))
293 #:tests? #f ; no "check" target
294 #:phases
295 (modify-phases %standard-phases
296 (delete 'bootstrap)
297 (delete 'configure)
298 (replace 'build
299 (lambda* (#:key inputs #:allow-other-keys)
300 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
301 (setenv "JAVACMD"
302 (string-append (assoc-ref inputs "jamvm")
303 "/bin/jamvm"))
304 (setenv "JAVAC"
305 (string-append (assoc-ref inputs "jikes")
306 "/bin/jikes"))
307 (setenv "CLASSPATH"
308 (string-append (assoc-ref inputs "jamvm")
309 "/lib/rt.jar"))
310
311 ;; Ant complains if this file doesn't exist.
312 (setenv "HOME" "/tmp")
313 (with-output-to-file "/tmp/.ant.properties"
314 (lambda _ (display "")))
315
316 ;; Use jikes instead of javac for <javac ...> tags in build.xml
317 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
318
319 ;; jikes produces lots of warnings, but they are not very
320 ;; interesting, so we silence them.
321 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
322
323 ;; Without these JamVM options the build may freeze.
324 (substitute* "bootstrap.sh"
325 (("^\"\\$\\{JAVACMD\\}\" " m)
326 ,@(if (string-prefix? "armhf" (or (%current-system)
327 (%current-target-system)))
328 `((string-append m "-Xnocompact "))
329 `((string-append m "-Xnocompact -Xnoinlining ")))))
330
331 ;; Disable tests because we are bootstrapping and thus don't have
332 ;; any of the dependencies required to build and run the tests.
333 (substitute* "build.xml"
334 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
335 (invoke "bash" "bootstrap.sh"
336 (string-append "-Ddist.dir="
337 (assoc-ref %outputs "out")))))
338 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
339 (lambda* (#:key outputs #:allow-other-keys)
340 (define (repack-archive jar)
341 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
342 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
343 (with-directory-excursion dir
344 (invoke "unzip" jar))
345 (delete-file jar)
346 ;; XXX: copied from (gnu build install)
347 (for-each (lambda (file)
348 (let ((s (lstat file)))
349 (unless (eq? (stat:type s) 'symlink)
350 (utime file 0 0 0 0))))
351 (find-files dir #:directories? #t))
352 ;; It is important that the manifest appears first.
353 (with-directory-excursion dir
354 (let* ((files (find-files "." ".*" #:directories? #t))
355 ;; To ensure that the reference scanner can
356 ;; detect all store references in the jars
357 ;; we disable compression with the "-0" option.
358 (command (if (file-exists? manifest)
359 `("zip" "-0" "-X" ,jar ,manifest
360 ,@files)
361 `("zip" "-0" "-X" ,jar ,@files))))
362 (apply invoke command)))))
363 (for-each repack-archive
364 (find-files
365 (string-append (assoc-ref %outputs "out") "/lib")
366 "\\.jar$"))
367 #t))
368 (delete 'install))))
369 (native-inputs
370 `(("jikes" ,jikes)
371 ("jamvm" ,jamvm-1-bootstrap)
372 ("unzip" ,unzip)
373 ("zip" ,zip)))
374 (home-page "https://ant.apache.org")
375 (synopsis "Build tool for Java")
376 (description
377 "Ant is a platform-independent build tool for Java. It is similar to
378make but is implemented using the Java language, requires the Java platform,
379and is best suited to building Java projects. Ant uses XML to describe the
380build process and its dependencies, whereas Make uses Makefile format.")
381 (license license:asl2.0)))
382
383;; Version 3.2.2 is the last version without a dependency on a full-fledged
384;; compiler for Java 1.5.
385(define ecj-bootstrap
386 (package
387 (name "ecj-bootstrap")
388 (version "3.2.2")
389 (source (origin
390 (method url-fetch)
391 (uri (string-append "http://archive.eclipse.org/eclipse/"
392 "downloads/drops/R-" version
393 "-200702121330/ecjsrc.zip"))
394 (sha256
395 (base32
396 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
397 ;; It would be so much easier if we could use the ant-build-system, but we
398 ;; cannot as we don't have ant at this point. We use ecj for
399 ;; bootstrapping the JDK.
400 (build-system gnu-build-system)
401 (arguments
402 `(#:modules ((guix build gnu-build-system)
403 (guix build utils)
404 (srfi srfi-1))
405 #:tests? #f ; there are no tests
406 #:phases
407 (modify-phases %standard-phases
408 (replace 'configure
409 (lambda* (#:key inputs #:allow-other-keys)
410 (setenv "CLASSPATH"
411 (string-join
412 (cons (string-append (assoc-ref inputs "jamvm")
413 "/lib/rt.jar")
414 (find-files (string-append
415 (assoc-ref inputs "ant-bootstrap")
416 "/lib")
417 "\\.jar$"))
418 ":"))
419 #t))
420 (replace 'build
421 (lambda* (#:key inputs #:allow-other-keys)
422 ;; The unpack phase enters the "org" directory by mistake.
423 (chdir "..")
424
425 ;; Create a simple manifest to make ecj executable.
426 (with-output-to-file "manifest"
427 (lambda _
428 (display "Manifest-Version: 1.0
429Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
430
431 ;; Compile it all!
432 (and (apply invoke "jikes"
433 (find-files "." "\\.java$"))
434 (invoke "fastjar" "cvfm"
435 "ecj-bootstrap.jar" "manifest" "."))))
436 (replace 'install
437 (lambda* (#:key outputs #:allow-other-keys)
438 (let ((share (string-append (assoc-ref outputs "out")
439 "/share/java/")))
440 (mkdir-p share)
441 (install-file "ecj-bootstrap.jar" share)
442 #t))))))
443 (native-inputs
444 `(("ant-bootstrap" ,ant-bootstrap)
445 ("unzip" ,unzip)
446 ("jikes" ,jikes)
447 ("jamvm" ,jamvm-1-bootstrap)
448 ("fastjar" ,fastjar)))
449 (home-page "https://eclipse.org")
450 (synopsis "Eclipse Java development tools core batch compiler")
451 (description "This package provides the Eclipse Java core batch compiler
452for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
453requirement for all GNU Classpath releases after version 0.93.")
454 (license license:epl1.0)))
455
456(define ecj-javac-wrapper
457 (package (inherit ecj-bootstrap)
458 (name "ecj-javac-wrapper")
459 (source #f)
460 (build-system trivial-build-system)
461 (arguments
462 `(#:modules ((guix build utils))
463 #:builder
464 (begin
465 (use-modules (guix build utils))
466 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
467 (target (string-append bin "/javac"))
468 (guile (string-append (assoc-ref %build-inputs "guile")
469 "/bin/guile"))
470 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
471 "/share/java/ecj-bootstrap.jar"))
472 (java (string-append (assoc-ref %build-inputs "jamvm")
473 "/bin/jamvm"))
474 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
475 "/share/classpath")))
476 (string-append jvmlib "/glibj.zip:"
477 jvmlib "/tools.zip"))))
478 (mkdir-p bin)
479 (with-output-to-file target
480 (lambda _
481 (format #t "#!~a --no-auto-compile\n!#\n" guile)
482 (write
483 `(begin (use-modules (ice-9 match)
484 (ice-9 receive)
485 (ice-9 hash-table)
486 (srfi srfi-1)
487 (srfi srfi-26))
488 (define defaults
489 '(("-bootclasspath" ,bootcp)
490 ("-source" "1.5")
491 ("-target" "1.5")
492 ("-cp" ".")))
493 (define (main args)
494 (let ((classpath (getenv "CLASSPATH")))
495 (setenv "CLASSPATH"
496 (string-join (list ,ecj
497 ,(string-append (assoc-ref %build-inputs "jamvm")
498 "/lib/rt.jar")
499 (or classpath ""))
500 ":")))
501 (receive (vm-args other-args)
502 ;; Separate VM arguments from arguments to ECJ.
503 (partition (cut string-prefix? "-J" <>)
504 (fold (lambda (default acc)
505 (if (member (first default) acc)
506 acc (append default acc)))
507 args defaults))
508 (apply system* ,java
509 (append
510 ;; Remove "-J" prefix
511 (map (cut string-drop <> 2) vm-args)
512 '("org.eclipse.jdt.internal.compiler.batch.Main")
513 (cons "-nowarn" other-args)))))
514 ;; Entry point
515 (let ((args (cdr (command-line))))
516 (if (null? args)
517 (format (current-error-port) "javac: no arguments given!\n")
518 (main args)))))))
519 (chmod target #o755)
520 #t))))
521 (native-inputs
522 `(("guile" ,guile-2.2)
523 ("ecj-bootstrap" ,ecj-bootstrap)
524 ("jamvm" ,jamvm-1-bootstrap)
525 ("classpath" ,classpath-bootstrap)))
526 (description "This package provides a wrapper around the @dfn{Eclipse
527compiler for Java} (ecj) with a command line interface that is compatible with
528the standard javac executable.")))
529
530;; The classpath-bootstrap was built without a virtual machine, so it does not
531;; provide a wrapper for javah. We cannot build the development version of
532;; Classpath without javah.
533(define classpath-0.99
534 (package (inherit classpath-bootstrap)
535 (version "0.99")
536 (source (origin
537 (method url-fetch)
538 (uri (string-append "mirror://gnu/classpath/classpath-"
539 version ".tar.gz"))
540 (sha256
541 (base32
542 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
543 (patches (search-patches "classpath-aarch64-support.patch"))))
544 (arguments
545 `(#:configure-flags
546 (list (string-append "--with-ecj-jar="
547 (assoc-ref %build-inputs "ecj-bootstrap")
548 "/share/java/ecj-bootstrap.jar")
549 (string-append "JAVAC="
550 (assoc-ref %build-inputs "ecj-javac-wrapper")
551 "/bin/javac")
552 (string-append "JAVA="
553 (assoc-ref %build-inputs "jamvm")
554 "/bin/jamvm")
555 "GCJ_JAVAC_TRUE=no"
556 "ac_cv_prog_java_works=yes" ; trust me
557 "--disable-Werror"
558 "--disable-gmp"
559 "--disable-gtk-peer"
560 "--disable-gconf-peer"
561 "--disable-plugin"
562 "--disable-dssi"
563 "--disable-alsa"
564 "--disable-gjdoc")
565 #:phases
566 (modify-phases %standard-phases
567 (add-after 'install 'install-data
568 (lambda _ (invoke "make" "install-data"))))))
569 (native-inputs
570 `(("ecj-bootstrap" ,ecj-bootstrap)
571 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
572 ("fastjar" ,fastjar)
573 ("jamvm" ,jamvm-1-bootstrap)
574 ("classpath" ,classpath-bootstrap)
575 ("libltdl" ,libltdl)
576 ("pkg-config" ,pkg-config)))))
577
578;; We need this because classpath-bootstrap does not provide all of the tools
579;; we need to build classpath-devel.
580(define classpath-jamvm-wrappers
581 (package (inherit classpath-0.99)
582 (name "classpath-jamvm-wrappers")
583 (source #f)
584 (build-system trivial-build-system)
585 (arguments
586 `(#:modules ((guix build utils))
587 #:builder
588 (begin
589 (use-modules (guix build utils))
590 (let* ((bash (assoc-ref %build-inputs "bash"))
591 (jamvm (assoc-ref %build-inputs "jamvm"))
592 (classpath (assoc-ref %build-inputs "classpath"))
593 (bin (string-append (assoc-ref %outputs "out")
594 "/bin/")))
595 (mkdir-p bin)
596 (for-each (lambda (tool)
597 (with-output-to-file (string-append bin tool)
598 (lambda _
599 ,@(if (string-prefix? "armhf" (or (%current-system)
600 (%current-target-system)))
601 `((format #t "#!~a/bin/sh
602~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
603gnu.classpath.tools.~a.~a $@"
604 bash jamvm classpath tool
605 (if (string=? "native2ascii" tool)
606 "Native2ASCII" "Main")))
607 `((format #t "#!~a/bin/sh
608~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
609gnu.classpath.tools.~a.~a $@"
610 bash jamvm classpath tool
611 (if (string=? "native2ascii" tool)
612 "Native2ASCII" "Main"))))))
613 (chmod (string-append bin tool) #o755))
614 (list "javah"
615 "rmic"
616 "rmid"
617 "orbd"
618 "rmiregistry"
619 "native2ascii"))
620 #t))))
621 (native-inputs
622 `(("bash" ,bash)
623 ("jamvm" ,jamvm-1-bootstrap)
624 ("classpath" ,classpath-0.99)))
625 (inputs '())
626 (synopsis "Executables from GNU Classpath")
627 (description "This package provides wrappers around the tools provided by
628the GNU Classpath library. They are executed by the JamVM virtual
629machine.")))
630
631;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
632;; then Classpath has gained much more support for Java 1.6.
633(define-public classpath-devel
634 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
635 (revision "1"))
636 (package (inherit classpath-bootstrap)
637 (version (string-append "0.99-" revision "." (string-take commit 9)))
638 (source (origin
639 (method git-fetch)
640 (uri (git-reference
641 (url "https://git.savannah.gnu.org/git/classpath.git")
642 (commit commit)))
643 (file-name (string-append "classpath-" version "-checkout"))
644 (sha256
645 (base32
646 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
647 (arguments
648 `(#:make-flags
649 ;; Ensure that the initial heap size is smaller than the maximum
650 ;; size. By default only Xmx is set, which can lead to invalid
651 ;; memory settings on some machines with a lot of memory.
652 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
653 #:configure-flags
654 (list (string-append "--with-ecj-jar="
655 (assoc-ref %build-inputs "ecj-bootstrap")
656 "/share/java/ecj-bootstrap.jar")
657 (string-append "--with-javac="
658 (assoc-ref %build-inputs "ecj-javac-wrapper")
659 "/bin/javac")
660 (string-append "JAVA="
661 (assoc-ref %build-inputs "jamvm")
662 "/bin/jamvm")
663 "GCJ_JAVAC_TRUE=no"
664 "ac_cv_prog_java_works=yes" ; trust me
665 "--disable-Werror"
666 "--disable-gmp"
667 "--disable-gtk-peer"
668 "--disable-gconf-peer"
669 "--disable-plugin"
670 "--disable-dssi"
671 "--disable-alsa"
672 "--disable-gjdoc")
673 #:phases
674 (modify-phases %standard-phases
675 ;; XXX The bootstrap phase executes autogen.sh, which fails after
676 ;; complaining about the lack of gettext.
677 (replace 'bootstrap
678 (lambda _ (invoke "autoreconf" "-vif")))
679 (add-after 'unpack 'remove-unsupported-annotations
680 (lambda _
681 (substitute* (find-files "java" "\\.java$")
682 (("@Override") ""))
683 #t))
684 (add-after 'install 'install-data
685 (lambda _ (invoke "make" "install-data"))))))
686 (native-inputs
687 `(("autoconf" ,autoconf)
688 ("automake" ,automake)
689 ("libtool" ,libtool)
690 ("gettext" ,gettext-minimal)
691 ("texinfo" ,texinfo)
692 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
693 ("ecj-bootstrap" ,ecj-bootstrap)
694 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
695 ("fastjar" ,fastjar)
696 ("jamvm" ,jamvm-1-bootstrap)
697 ("libltdl" ,libltdl)
698 ("pkg-config" ,pkg-config))))))
699
700(define jamvm
701 (package (inherit jamvm-1-bootstrap)
702 (version "2.0.0")
703 (source (origin
704 (method url-fetch)
705 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
706 "JamVM%20" version "/jamvm-"
707 version ".tar.gz"))
708 (sha256
709 (base32
710 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
711 (snippet
712 '(begin
713 ;; Remove precompiled software.
714 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
715 #t))))
716 (build-system gnu-build-system)
717 (arguments
718 `(#:configure-flags
719 (list (string-append "--with-classpath-install-dir="
720 (assoc-ref %build-inputs "classpath")))))
721 (inputs
722 `(("classpath" ,classpath-devel)
723 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
724 ("zip" ,zip)
725 ("zlib" ,zlib)))))
726
727(define ecj-javac-wrapper-final
728 (package (inherit ecj-javac-wrapper)
729 (native-inputs
730 `(("guile" ,guile-2.2)
731 ("ecj-bootstrap" ,ecj-bootstrap)
732 ("jamvm" ,jamvm)
733 ("classpath" ,classpath-devel)))))
734
735;; The bootstrap JDK consisting of jamvm, classpath-devel,
736;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
737;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
738;; which uses Java 6 only.
739(define-public icedtea-6
740 (package
741 (name "icedtea")
742 (version "1.13.13")
743 (source (origin
744 (method url-fetch)
745 (uri (string-append
746 "http://icedtea.wildebeest.org/download/source/icedtea6-"
747 version ".tar.xz"))
748 (sha256
749 (base32
750 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
751 (modules '((guix build utils)))
752 (snippet
753 '(begin
754 (substitute* "Makefile.in"
755 ;; do not leak information about the build host
756 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
757 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
758 #t))))
759 (build-system gnu-build-system)
760 (outputs '("out" ; Java Runtime Environment
761 "jdk" ; Java Development Kit
762 "doc")) ; all documentation
763 (arguments
764 `(;; There are many failing tests and many are known to fail upstream.
765 #:tests? #f
766
767 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
768 ;; gremlin) doesn't support it yet, so skip this phase.
769 #:validate-runpath? #f
770
771 #:modules ((guix build utils)
772 (guix build gnu-build-system)
773 (srfi srfi-19))
774
775 #:configure-flags
776 `("--enable-bootstrap"
777 "--enable-nss"
778 "--without-rhino"
779 "--with-parallel-jobs"
780 "--disable-downloading"
781 "--disable-tests"
782 ,(string-append "--with-ecj="
783 (assoc-ref %build-inputs "ecj")
784 "/share/java/ecj-bootstrap.jar")
785 ,(string-append "--with-jar="
786 (assoc-ref %build-inputs "fastjar")
787 "/bin/fastjar")
788 ,(string-append "--with-jdk-home="
789 (assoc-ref %build-inputs "classpath"))
790 ,(string-append "--with-java="
791 (assoc-ref %build-inputs "jamvm")
792 "/bin/jamvm"))
793 #:phases
794 (modify-phases %standard-phases
795 (replace 'unpack
796 (lambda* (#:key source inputs #:allow-other-keys)
797 (invoke "tar" "xvf" source)
798 (chdir (string-append "icedtea6-" ,version))
799 (mkdir "openjdk")
800 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
801 ;; The convenient OpenJDK source bundle is no longer
802 ;; available for download, so we have to take the sources
803 ;; from the Mercurial repositories and change the Makefile
804 ;; to avoid tests for the OpenJDK zip archive.
805 (with-directory-excursion "openjdk"
806 (for-each (lambda (part)
807 (mkdir part)
808 (copy-recursively
809 (assoc-ref inputs
810 (string-append part "-src"))
811 part))
812 '("jdk" "corba"
813 "langtools" "jaxp" "jaxws")))
814 (with-directory-excursion "openjdk"
815 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
816 (rename-file "hg-checkout" "hotspot"))
817 (substitute* "patches/freetypeversion.patch"
818 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
819 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
820 (substitute* "Makefile.in"
821 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
822 "echo \"trust me\";")
823 ;; The contents of the bootstrap directory must be
824 ;; writeable but when copying from the store they are
825 ;; not.
826 (("mkdir -p lib/rt" line)
827 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
828 (invoke "chmod" "-R" "u+w" "openjdk")))
829 (add-after 'unpack 'use-classpath
830 (lambda* (#:key inputs #:allow-other-keys)
831 (let ((jvmlib (assoc-ref inputs "classpath"))
832 (jamvm (assoc-ref inputs "jamvm")))
833 ;; Classpath does not provide rt.jar.
834 (substitute* "Makefile.in"
835 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
836 (string-append jvmlib "/share/classpath/glibj.zip")))
837 ;; Make sure we can find all classes.
838 (setenv "CLASSPATH"
839 (string-append jvmlib "/share/classpath/glibj.zip:"
840 jvmlib "/share/classpath/tools.zip:"
841 jamvm "/lib/rt.jar"))
842 (setenv "JAVACFLAGS"
843 (string-append "-cp "
844 jvmlib "/share/classpath/glibj.zip:"
845 jvmlib "/share/classpath/tools.zip")))
846 #t))
847 (add-after 'unpack 'patch-patches
848 (lambda _
849 ;; shebang in patches so that they apply cleanly
850 (substitute* '("patches/jtreg-jrunscript.patch"
851 "patches/hotspot/hs23/drop_unlicensed_test.patch")
852 (("#!/bin/sh") (string-append "#!" (which "sh"))))
853 #t))
854 (add-after 'unpack 'patch-paths
855 (lambda* (#:key inputs #:allow-other-keys)
856 ;; buildtree.make generates shell scripts, so we need to replace
857 ;; the generated shebang
858 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
859 (("/bin/sh") (which "bash")))
860
861 (let ((corebin (string-append
862 (assoc-ref inputs "coreutils") "/bin/"))
863 (binbin (string-append
864 (assoc-ref inputs "binutils") "/bin/"))
865 (grepbin (string-append
866 (assoc-ref inputs "grep") "/bin/")))
867 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
868 "openjdk/corba/make/common/shared/Defs-linux.gmk")
869 (("UNIXCOMMAND_PATH = /bin/")
870 (string-append "UNIXCOMMAND_PATH = " corebin))
871 (("USRBIN_PATH = /usr/bin/")
872 (string-append "USRBIN_PATH = " corebin))
873 (("DEVTOOLS_PATH *= */usr/bin/")
874 (string-append "DEVTOOLS_PATH = " corebin))
875 (("COMPILER_PATH *= */usr/bin/")
876 (string-append "COMPILER_PATH = "
877 (assoc-ref inputs "gcc") "/bin/"))
878 (("DEF_OBJCOPY *=.*objcopy")
879 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
880
881 ;; fix path to alsa header
882 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
883 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
884 (string-append "ALSA_INCLUDE="
885 (assoc-ref inputs "alsa-lib")
886 "/include/alsa/version.h")))
887
888 ;; fix hard-coded utility paths
889 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
890 "openjdk/corba/make/common/shared/Defs-utils.gmk")
891 (("ECHO *=.*echo")
892 (string-append "ECHO = " (which "echo")))
893 (("^GREP *=.*grep")
894 (string-append "GREP = " (which "grep")))
895 (("EGREP *=.*egrep")
896 (string-append "EGREP = " (which "egrep")))
897 (("CPIO *=.*cpio")
898 (string-append "CPIO = " (which "cpio")))
899 (("READELF *=.*readelf")
900 (string-append "READELF = " (which "readelf")))
901 (("^ *AR *=.*ar")
902 (string-append "AR = " (which "ar")))
903 (("^ *TAR *=.*tar")
904 (string-append "TAR = " (which "tar")))
905 (("AS *=.*as")
906 (string-append "AS = " (which "as")))
907 (("LD *=.*ld")
908 (string-append "LD = " (which "ld")))
909 (("STRIP *=.*strip")
910 (string-append "STRIP = " (which "strip")))
911 (("NM *=.*nm")
912 (string-append "NM = " (which "nm")))
913 (("^SH *=.*sh")
914 (string-append "SH = " (which "bash")))
915 (("^FIND *=.*find")
916 (string-append "FIND = " (which "find")))
917 (("LDD *=.*ldd")
918 (string-append "LDD = " (which "ldd")))
919 (("NAWK *=.*(n|g)awk")
920 (string-append "NAWK = " (which "gawk")))
921 (("XARGS *=.*xargs")
922 (string-append "XARGS = " (which "xargs")))
923 (("UNZIP *=.*unzip")
924 (string-append "UNZIP = " (which "unzip")))
925 (("ZIPEXE *=.*zip")
926 (string-append "ZIPEXE = " (which "zip")))
927 (("SED *=.*sed")
928 (string-append "SED = " (which "sed"))))
929
930 ;; Some of these timestamps cause problems as they are more than
931 ;; 10 years ago, failing the build process.
932 (substitute*
933 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
934 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
935 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
936 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
937 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
938 #t)))
939 (add-before 'configure 'set-additional-paths
940 (lambda* (#:key inputs #:allow-other-keys)
941 (setenv "CPATH"
942 (string-append (assoc-ref inputs "libxrender")
943 "/include/X11/extensions" ":"
944 (assoc-ref inputs "libxtst")
945 "/include/X11/extensions" ":"
946 (assoc-ref inputs "libxinerama")
947 "/include/X11/extensions" ":"
948 (or (getenv "CPATH") "")))
949 (setenv "ALT_CUPS_HEADERS_PATH"
950 (string-append (assoc-ref inputs "cups")
951 "/include"))
952 (setenv "ALT_FREETYPE_HEADERS_PATH"
953 (string-append (assoc-ref inputs "freetype")
954 "/include"))
955 (setenv "ALT_FREETYPE_LIB_PATH"
956 (string-append (assoc-ref inputs "freetype")
957 "/lib"))
958 #t))
959 (add-before 'build 'disable-os-version-check
960 ;; allow build on linux major version change
961 (lambda _
962 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
963 #t))
964 (replace 'install
965 (lambda* (#:key outputs #:allow-other-keys)
966 (let ((doc (string-append (assoc-ref outputs "doc")
967 "/share/doc/icedtea"))
968 (jre (assoc-ref outputs "out"))
969 (jdk (assoc-ref outputs "jdk")))
970 (copy-recursively "openjdk.build/docs" doc)
971 (copy-recursively "openjdk.build/j2re-image" jre)
972 (copy-recursively "openjdk.build/j2sdk-image" jdk))
973 #t)))))
974 (native-inputs
975 `(("ant" ,ant-bootstrap)
976 ("alsa-lib" ,alsa-lib)
977 ("attr" ,attr)
978 ("classpath" ,classpath-devel)
979 ("coreutils" ,coreutils)
980 ("cpio" ,cpio)
981 ("cups" ,cups)
982 ("ecj" ,ecj-bootstrap)
983 ("ecj-javac" ,ecj-javac-wrapper-final)
984 ("fastjar" ,fastjar)
985 ("fontconfig" ,fontconfig)
986 ("freetype" ,freetype)
987 ("gtk" ,gtk+-2)
988 ("gawk" ,gawk)
989 ("giflib" ,giflib)
990 ("grep" ,grep)
991 ("jamvm" ,jamvm)
992 ("lcms" ,lcms)
993 ("libjpeg" ,libjpeg)
994 ("libnsl" ,libnsl)
995 ("libpng" ,libpng)
996 ("libtool" ,libtool)
997 ("libx11" ,libx11)
998 ("libxcomposite" ,libxcomposite)
999 ("libxi" ,libxi)
1000 ("libxinerama" ,libxinerama)
1001 ("libxrender" ,libxrender)
1002 ("libxslt" ,libxslt) ;for xsltproc
1003 ("libxt" ,libxt)
1004 ("libxtst" ,libxtst)
1005 ("mit-krb5" ,mit-krb5)
1006 ("nss" ,nss)
1007 ("nss-certs" ,nss-certs)
1008 ("perl" ,perl)
1009 ("pkg-config" ,pkg-config)
1010 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1011 ("unzip" ,unzip)
1012 ("wget" ,wget)
1013 ("which" ,which)
1014 ("zip" ,zip)
1015 ("zlib" ,zlib)
1016 ("openjdk-src"
1017 ,(origin
1018 (method hg-fetch)
1019 (uri (hg-reference
1020 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1021 (changeset "jdk6-b41")))
1022 (sha256
1023 (base32
1024 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1025 ("jdk-src"
1026 ,(origin
1027 (method hg-fetch)
1028 (uri (hg-reference
1029 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1030 (changeset "jdk6-b41")))
1031 (sha256
1032 (base32
1033 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1034 ("hotspot-src"
1035 ,(origin
1036 (method hg-fetch)
1037 (uri (hg-reference
1038 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1039 (changeset "jdk6-b41")))
1040 (sha256
1041 (base32
1042 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1043 (patches
1044 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1045 ("corba-src"
1046 ,(origin
1047 (method hg-fetch)
1048 (uri (hg-reference
1049 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1050 (changeset "jdk6-b41")))
1051 (sha256
1052 (base32
1053 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1054 ("langtools-src"
1055 ,(origin
1056 (method hg-fetch)
1057 (uri (hg-reference
1058 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1059 (changeset "jdk6-b41")))
1060 (sha256
1061 (base32
1062 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1063 ("jaxp-src"
1064 ,(origin
1065 (method hg-fetch)
1066 (uri (hg-reference
1067 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1068 (changeset "jdk6-b41")))
1069 (sha256
1070 (base32
1071 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1072 ("jaxws-src"
1073 ,(origin
1074 (method hg-fetch)
1075 (uri (hg-reference
1076 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1077 (changeset "jdk6-b41")))
1078 (sha256
1079 (base32
1080 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1081 (home-page "http://icedtea.classpath.org")
1082 (synopsis "Java development kit")
1083 (description
1084 "This package provides the OpenJDK built with the IcedTea build harness.
1085This version of the OpenJDK is no longer maintained and is only used for
1086bootstrapping purposes.")
1087 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1088 ;; same license as both GNU Classpath and OpenJDK.
1089 (license license:gpl2+)))
1090
1091(define-public icedtea-7
1092 (let* ((version "2.6.13")
1093 (drop (lambda (name hash)
1094 (origin
1095 (method url-fetch)
1096 (uri (string-append
1097 "http://icedtea.classpath.org/download/drops"
1098 "/icedtea7/" version "/" name ".tar.bz2"))
1099 (sha256 (base32 hash))))))
1100 (package
1101 (name "icedtea")
1102 (version version)
1103 (source (origin
1104 (method url-fetch)
1105 (uri (string-append
1106 "http://icedtea.wildebeest.org/download/source/icedtea-"
1107 version ".tar.xz"))
1108 (sha256
1109 (base32
1110 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1111 (modules '((guix build utils)))
1112 (snippet
1113 '(begin
1114 (substitute* "Makefile.in"
1115 ;; do not leak information about the build host
1116 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1117 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1118 #t))))
1119 (build-system gnu-build-system)
1120 (outputs '("out" ; Java Runtime Environment
1121 "jdk" ; Java Development Kit
1122 "doc")) ; all documentation
1123 (arguments
1124 `(;; There are many test failures. Some are known to
1125 ;; fail upstream, others relate to not having an X
1126 ;; server running at test time, yet others are a
1127 ;; complete mystery to me.
1128
1129 ;; hotspot: passed: 241; failed: 45; error: 2
1130 ;; langtools: passed: 1,934; failed: 26
1131 ;; jdk: unknown
1132 #:tests? #f
1133
1134 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1135 ;; gremlin) doesn't support it yet, so skip this phase.
1136 #:validate-runpath? #f
1137
1138 ;; Apparently, the C locale is needed for some of the tests.
1139 #:locale "C"
1140
1141 #:modules ((guix build utils)
1142 (guix build gnu-build-system)
1143 (ice-9 match)
1144 (ice-9 popen)
1145 (srfi srfi-19)
1146 (srfi srfi-26))
1147
1148 #:configure-flags
1149 ;; TODO: package pcsc and sctp, and add to inputs
1150 `("--disable-system-pcsc"
1151 "--disable-system-sctp"
1152 "--enable-bootstrap"
1153 "--enable-nss"
1154 "--without-rhino"
1155 "--disable-downloading"
1156 "--disable-tests" ;they are run in the check phase instead
1157 "--with-openjdk-src-dir=./openjdk.src"
1158 ,(string-append "--with-jdk-home="
1159 (assoc-ref %build-inputs "jdk")))
1160
1161 #:phases
1162 (modify-phases %standard-phases
1163 (replace 'unpack
1164 (lambda* (#:key source inputs #:allow-other-keys)
1165 (let ((target (string-append "icedtea-" ,version))
1166 (unpack (lambda* (name #:optional dir)
1167 (let ((dir (or dir
1168 (string-drop-right name 5))))
1169 (mkdir dir)
1170 (invoke "tar" "xvf"
1171 (assoc-ref inputs name)
1172 "-C" dir
1173 "--strip-components=1")))))
1174 (mkdir target)
1175 (invoke "tar" "xvf" source
1176 "-C" target "--strip-components=1")
1177 (chdir target)
1178 (unpack "openjdk-src" "openjdk.src")
1179 (with-directory-excursion "openjdk.src"
1180 (for-each unpack
1181 (filter (cut string-suffix? "-drop" <>)
1182 (map (match-lambda
1183 ((name . _) name))
1184 inputs))))
1185 #t)))
1186 (add-after 'unpack 'patch-bitrot
1187 (lambda _
1188 (substitute* '("patches/boot/revert-6973616.patch"
1189 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1190 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1191 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1192 ;; As of attr 2.4.48 this header is no longer
1193 ;; included. It is provided by the libc instead.
1194 (substitute* '("configure"
1195 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1196 (("attr/xattr.h") "sys/xattr.h"))
1197 #t))
1198 (add-after 'unpack 'fix-x11-extension-include-path
1199 (lambda* (#:key inputs #:allow-other-keys)
1200 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1201 (((string-append "\\$\\(firstword \\$\\(wildcard "
1202 "\\$\\(OPENWIN_HOME\\)"
1203 "/include/X11/extensions\\).*$"))
1204 (string-append (assoc-ref inputs "libxrender")
1205 "/include/X11/extensions"
1206 " -I" (assoc-ref inputs "libxtst")
1207 "/include/X11/extensions"
1208 " -I" (assoc-ref inputs "libxinerama")
1209 "/include/X11/extensions"))
1210 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1211 #t))
1212 (add-after 'unpack 'patch-paths
1213 (lambda _
1214 ;; buildtree.make generates shell scripts, so we need to replace
1215 ;; the generated shebang
1216 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1217 (("/bin/sh") (which "bash")))
1218
1219 (let ((corebin (string-append
1220 (assoc-ref %build-inputs "coreutils") "/bin/"))
1221 (binbin (string-append
1222 (assoc-ref %build-inputs "binutils") "/bin/"))
1223 (grepbin (string-append
1224 (assoc-ref %build-inputs "grep") "/bin/")))
1225 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1226 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1227 (("UNIXCOMMAND_PATH = /bin/")
1228 (string-append "UNIXCOMMAND_PATH = " corebin))
1229 (("USRBIN_PATH = /usr/bin/")
1230 (string-append "USRBIN_PATH = " corebin))
1231 (("DEVTOOLS_PATH *= */usr/bin/")
1232 (string-append "DEVTOOLS_PATH = " corebin))
1233 (("COMPILER_PATH *= */usr/bin/")
1234 (string-append "COMPILER_PATH = "
1235 (assoc-ref %build-inputs "gcc") "/bin/"))
1236 (("DEF_OBJCOPY *=.*objcopy")
1237 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1238
1239 ;; fix path to alsa header
1240 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1241 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1242 (string-append "ALSA_INCLUDE="
1243 (assoc-ref %build-inputs "alsa-lib")
1244 "/include/alsa/version.h")))
1245
1246 ;; fix hard-coded utility paths
1247 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1248 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1249 (("ECHO *=.*echo")
1250 (string-append "ECHO = " (which "echo")))
1251 (("^GREP *=.*grep")
1252 (string-append "GREP = " (which "grep")))
1253 (("EGREP *=.*egrep")
1254 (string-append "EGREP = " (which "egrep")))
1255 (("CPIO *=.*cpio")
1256 (string-append "CPIO = " (which "cpio")))
1257 (("READELF *=.*readelf")
1258 (string-append "READELF = " (which "readelf")))
1259 (("^ *AR *=.*ar")
1260 (string-append "AR = " (which "ar")))
1261 (("^ *TAR *=.*tar")
1262 (string-append "TAR = " (which "tar")))
1263 (("AS *=.*as")
1264 (string-append "AS = " (which "as")))
1265 (("LD *=.*ld")
1266 (string-append "LD = " (which "ld")))
1267 (("STRIP *=.*strip")
1268 (string-append "STRIP = " (which "strip")))
1269 (("NM *=.*nm")
1270 (string-append "NM = " (which "nm")))
1271 (("^SH *=.*sh")
1272 (string-append "SH = " (which "bash")))
1273 (("^FIND *=.*find")
1274 (string-append "FIND = " (which "find")))
1275 (("LDD *=.*ldd")
1276 (string-append "LDD = " (which "ldd")))
1277 (("NAWK *=.*(n|g)awk")
1278 (string-append "NAWK = " (which "gawk")))
1279 (("XARGS *=.*xargs")
1280 (string-append "XARGS = " (which "xargs")))
1281 (("UNZIP *=.*unzip")
1282 (string-append "UNZIP = " (which "unzip")))
1283 (("ZIPEXE *=.*zip")
1284 (string-append "ZIPEXE = " (which "zip")))
1285 (("SED *=.*sed")
1286 (string-append "SED = " (which "sed"))))
1287
1288 ;; Some of these timestamps cause problems as they are more than
1289 ;; 10 years ago, failing the build process.
1290 (substitute*
1291 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1292 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1293 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1294 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1295 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1296 #t))
1297 (add-before 'configure 'set-additional-paths
1298 (lambda* (#:key inputs #:allow-other-keys)
1299 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1300 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1301 (string-append "ALSA_INCLUDE="
1302 (assoc-ref inputs "alsa-lib")
1303 "/include/alsa/version.h")))
1304 (setenv "CC" "gcc")
1305 (setenv "CPATH"
1306 (string-append (assoc-ref inputs "libxcomposite")
1307 "/include/X11/extensions" ":"
1308 (assoc-ref inputs "libxrender")
1309 "/include/X11/extensions" ":"
1310 (assoc-ref inputs "libxtst")
1311 "/include/X11/extensions" ":"
1312 (assoc-ref inputs "libxinerama")
1313 "/include/X11/extensions" ":"
1314 (or (getenv "CPATH") "")))
1315 (setenv "ALT_OBJCOPY" (which "objcopy"))
1316 (setenv "ALT_CUPS_HEADERS_PATH"
1317 (string-append (assoc-ref inputs "cups")
1318 "/include"))
1319 (setenv "ALT_FREETYPE_HEADERS_PATH"
1320 (string-append (assoc-ref inputs "freetype")
1321 "/include"))
1322 (setenv "ALT_FREETYPE_LIB_PATH"
1323 (string-append (assoc-ref inputs "freetype")
1324 "/lib"))
1325 #t))
1326 (add-before 'build 'disable-os-version-check
1327 ;; allow build on linux major version change
1328 (lambda _
1329 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1330 #t))
1331 (add-before 'check 'fix-test-framework
1332 (lambda _
1333 ;; Fix PATH in test environment
1334 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1335 (("PATH=/bin:/usr/bin")
1336 (string-append "PATH=" (getenv "PATH"))))
1337 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1338 (("/usr/bin/env") (which "env")))
1339 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1340 (("/bin/rm") (which "rm"))
1341 (("/bin/cp") (which "cp"))
1342 (("/bin/mv") (which "mv")))
1343 #t))
1344 (add-before 'check 'fix-hotspot-tests
1345 (lambda _
1346 (with-directory-excursion "openjdk.src/hotspot/test/"
1347 (substitute* "jprt.config"
1348 (("PATH=\"\\$\\{path4sdk\\}\"")
1349 (string-append "PATH=" (getenv "PATH")))
1350 (("make=/usr/bin/make")
1351 (string-append "make=" (which "make"))))
1352 (substitute* '("runtime/6626217/Test6626217.sh"
1353 "runtime/7110720/Test7110720.sh")
1354 (("/bin/rm") (which "rm"))
1355 (("/bin/cp") (which "cp"))
1356 (("/bin/mv") (which "mv"))))
1357 #t))
1358 (add-before 'check 'fix-jdk-tests
1359 (lambda _
1360 (with-directory-excursion "openjdk.src/jdk/test/"
1361 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1362 (("/bin/pwd") (which "pwd")))
1363 (substitute* "com/sun/jdi/ShellScaffold.sh"
1364 (("/bin/kill") (which "kill")))
1365 (substitute* "start-Xvfb.sh"
1366 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1367 (("/usr/bin/nohup") (which "nohup")))
1368 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1369 (("/bin/rm") (which "rm")))
1370 (substitute* "tools/launcher/MultipleJRE.sh"
1371 (("echo \"#!/bin/sh\"")
1372 (string-append "echo \"#!" (which "rm") "\""))
1373 (("/usr/bin/zip") (which "zip")))
1374 (substitute* "com/sun/jdi/OnThrowTest.java"
1375 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1376 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1377 (("/usr/bin/uptime") (which "uptime")))
1378 (substitute* "java/lang/ProcessBuilder/Basic.java"
1379 (("/usr/bin/env") (which "env"))
1380 (("/bin/false") (which "false"))
1381 (("/bin/true") (which "true"))
1382 (("/bin/cp") (which "cp"))
1383 (("/bin/sh") (which "sh")))
1384 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1385 (("/bin/sh") (which "sh")))
1386 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1387 (("/usr/bin/perl") (which "perl"))
1388 (("/bin/ps") (which "ps"))
1389 (("/bin/true") (which "true")))
1390 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1391 (("/usr/bin/tee") (which "tee")))
1392 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1393 (("/bin/true") (which "true")))
1394 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1395 (("/bin/cat") (which "cat")))
1396 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1397 (("/bin/sh") (which "sh"))
1398 (("/bin/true") (which "true"))
1399 (("/bin/kill") (which "kill")))
1400 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1401 (("/usr/bin/echo") (which "echo")))
1402 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1403 (("/usr/bin/cat") (which "cat")))
1404 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1405 (("/bin/cat") (which "cat"))
1406 (("/bin/sleep") (which "sleep"))
1407 (("/bin/sh") (which "sh")))
1408 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1409 (("/bin/cat") (which "cat")))
1410 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1411 (("/bin/chmod") (which "chmod")))
1412 (substitute* "java/util/zip/ZipFile/Assortment.java"
1413 (("/bin/sh") (which "sh"))))
1414 #t))
1415 (replace 'check
1416 (lambda _
1417 ;; The "make check-*" targets always return zero, so we need to
1418 ;; check for errors in the associated log files to determine
1419 ;; whether any tests have failed.
1420 (use-modules (ice-9 rdelim))
1421 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1422 (checker (lambda (port)
1423 (let loop ()
1424 (let ((line (read-line port)))
1425 (cond
1426 ((eof-object? line) #t)
1427 ((regexp-exec error-pattern line)
1428 (error "test failed"))
1429 (else (loop)))))))
1430 (run-test (lambda (test)
1431 (invoke "make" test)
1432 (call-with-input-file
1433 (string-append "test/" test ".log")
1434 checker))))
1435 (when #f ; skip tests
1436 (run-test "check-hotspot")
1437 (run-test "check-langtools")
1438 (run-test "check-jdk"))
1439 #t)))
1440 (replace 'install
1441 (lambda* (#:key outputs #:allow-other-keys)
1442 (let ((doc (string-append (assoc-ref outputs "doc")
1443 "/share/doc/icedtea"))
1444 (jre (assoc-ref outputs "out"))
1445 (jdk (assoc-ref outputs "jdk")))
1446 (copy-recursively "openjdk.build/docs" doc)
1447 (copy-recursively "openjdk.build/j2re-image" jre)
1448 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1449 #t))
1450 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1451 ;; But that shared object is located in the server/ folder, so it
1452 ;; cannot be found. This phase creates a symbolic link in the
1453 ;; lib/amd64 folder so that the other libraries can find it.
1454 ;;
1455 ;; See:
1456 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1457 ;;
1458 ;; FIXME: Find the bug in the build system, so that this symlink is
1459 ;; not needed.
1460 (add-after 'install 'install-libjvm
1461 (lambda* (#:key inputs outputs #:allow-other-keys)
1462 (let* ((lib-path (string-append (assoc-ref outputs "out")
1463 ;; See 'INSTALL_ARCH_DIR' in
1464 ;; 'configure'.
1465 ,(match (%current-system)
1466 ("i686-linux"
1467 "/lib/i386")
1468 ("x86_64-linux"
1469 "/lib/amd64")
1470 ("armhf-linux"
1471 "/lib/arm")
1472 ("aarch64-linux"
1473 "/lib/aarch64")
1474 ;; We need a catch-all, dropping
1475 ;; '-linux' works in most cases.
1476 (_
1477 (string-append
1478 "/lib/"
1479 (string-drop-right
1480 (%current-system) 6)))))))
1481 (symlink (string-append lib-path "/server/libjvm.so")
1482 (string-append lib-path "/libjvm.so")))
1483 #t))
1484 ;; By default IcedTea only generates an empty keystore. In order to
1485 ;; be able to use certificates in Java programs we need to generate a
1486 ;; keystore from a set of certificates. For convenience we use the
1487 ;; certificates from the nss-certs package.
1488 (add-after 'install 'install-keystore
1489 (lambda* (#:key inputs outputs #:allow-other-keys)
1490 (let* ((keystore "cacerts")
1491 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1492 "/etc/ssl/certs"))
1493 (keytool (string-append (assoc-ref outputs "jdk")
1494 "/bin/keytool")))
1495 (define (extract-cert file target)
1496 (call-with-input-file file
1497 (lambda (in)
1498 (call-with-output-file target
1499 (lambda (out)
1500 (let loop ((line (read-line in 'concat))
1501 (copying? #f))
1502 (cond
1503 ((eof-object? line) #t)
1504 ((string-prefix? "-----BEGIN" line)
1505 (display line out)
1506 (loop (read-line in 'concat) #t))
1507 ((string-prefix? "-----END" line)
1508 (display line out)
1509 #t)
1510 (else
1511 (when copying? (display line out))
1512 (loop (read-line in 'concat) copying?)))))))))
1513 (define (import-cert cert)
1514 (format #t "Importing certificate ~a\n" (basename cert))
1515 (let ((temp "tmpcert"))
1516 (extract-cert cert temp)
1517 (let ((port (open-pipe* OPEN_WRITE keytool
1518 "-import"
1519 "-alias" (basename cert)
1520 "-keystore" keystore
1521 "-storepass" "changeit"
1522 "-file" temp)))
1523 (display "yes\n" port)
1524 (when (not (zero? (status:exit-val (close-pipe port))))
1525 (format #t "failed to import ~a\n" cert)))
1526 (delete-file temp)))
1527
1528 ;; This is necessary because the certificate directory contains
1529 ;; files with non-ASCII characters in their names.
1530 (setlocale LC_ALL "en_US.utf8")
1531 (setenv "LC_ALL" "en_US.utf8")
1532
1533 (for-each import-cert (find-files certs-dir "\\.pem$"))
1534 (mkdir-p (string-append (assoc-ref outputs "out")
1535 "/lib/security"))
1536 (mkdir-p (string-append (assoc-ref outputs "jdk")
1537 "/jre/lib/security"))
1538
1539 ;; The cacerts files we are going to overwrite are chmod'ed as
1540 ;; read-only (444) in icedtea-8 (which derives from this
1541 ;; package). We have to change this so we can overwrite them.
1542 (chmod (string-append (assoc-ref outputs "out")
1543 "/lib/security/" keystore) #o644)
1544 (chmod (string-append (assoc-ref outputs "jdk")
1545 "/jre/lib/security/" keystore) #o644)
1546
1547 (install-file keystore
1548 (string-append (assoc-ref outputs "out")
1549 "/lib/security"))
1550 (install-file keystore
1551 (string-append (assoc-ref outputs "jdk")
1552 "/jre/lib/security"))
1553 #t))))))
1554 (native-inputs
1555 `(("openjdk-src"
1556 ,(drop "openjdk"
1557 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1558 ("corba-drop"
1559 ,(drop "corba"
1560 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1561 ("jaxp-drop"
1562 ,(drop "jaxp"
1563 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1564 ("jaxws-drop"
1565 ,(drop "jaxws"
1566 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1567 ("jdk-drop"
1568 ,(drop "jdk"
1569 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1570 ("langtools-drop"
1571 ,(drop "langtools"
1572 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1573 ("hotspot-drop"
1574 ,(origin
1575 (method url-fetch)
1576 (uri (string-append
1577 "http://icedtea.classpath.org/downloads/drops"
1578 "/icedtea7/" version "/hotspot.tar.bz2"))
1579 (sha256
1580 (base32
1581 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1582 (patches (search-patches
1583 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1584 ("ant" ,ant-bootstrap)
1585 ("attr" ,attr)
1586 ("coreutils" ,coreutils)
1587 ("diffutils" ,diffutils) ;for tests
1588 ("gawk" ,gawk)
1589 ("grep" ,grep)
1590 ("libtool" ,libtool)
1591 ("pkg-config" ,pkg-config)
1592 ("wget" ,wget)
1593 ("which" ,which)
1594 ("cpio" ,cpio)
1595 ("zip" ,zip)
1596 ("unzip" ,unzip)
1597 ("fastjar" ,fastjar)
1598 ("libxslt" ,libxslt) ;for xsltproc
1599 ("nss-certs" ,nss-certs)
1600 ("perl" ,perl)
1601 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1602 ("jdk" ,icedtea-6 "jdk")))
1603 (inputs
1604 `(("alsa-lib" ,alsa-lib)
1605 ("cups" ,cups)
1606 ("libx11" ,libx11)
1607 ("libxcomposite" ,libxcomposite)
1608 ("libxt" ,libxt)
1609 ("libxtst" ,libxtst)
1610 ("libxi" ,libxi)
1611 ("libxinerama" ,libxinerama)
1612 ("libxrender" ,libxrender)
1613 ("libjpeg" ,libjpeg)
1614 ("libpng" ,libpng)
1615 ("mit-krb5" ,mit-krb5)
1616 ("nss" ,nss)
1617 ("giflib" ,giflib)
1618 ("fontconfig" ,fontconfig)
1619 ("freetype" ,freetype)
1620 ("lcms" ,lcms)
1621 ("zlib" ,zlib)
1622 ("gtk" ,gtk+-2)))
1623 (home-page "http://icedtea.classpath.org")
1624 (synopsis "Java development kit")
1625 (description
1626 "This package provides the Java development kit OpenJDK built with the
1627IcedTea build harness.")
1628
1629 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1630 (supported-systems (delete "mips64el-linux" %supported-systems))
1631
1632 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1633 ;; same license as both GNU Classpath and OpenJDK.
1634 (license license:gpl2+))))
1635
1636(define-public icedtea-8
1637 (let* ((version "3.7.0")
1638 (drop (lambda (name hash)
1639 (origin
1640 (method url-fetch)
1641 (uri (string-append
1642 "http://icedtea.classpath.org/download/drops"
1643 "/icedtea8/" version "/" name ".tar.xz"))
1644 (sha256 (base32 hash))))))
1645 (package (inherit icedtea-7)
1646 (version "3.7.0")
1647 (source (origin
1648 (method url-fetch)
1649 (uri (string-append
1650 "http://icedtea.wildebeest.org/download/source/icedtea-"
1651 version ".tar.xz"))
1652 (sha256
1653 (base32
1654 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1655 (modules '((guix build utils)))
1656 (snippet
1657 '(begin
1658 (substitute* '("configure"
1659 "acinclude.m4")
1660 ;; Do not embed build time
1661 (("(DIST_ID=\"Custom build).*$" _ prefix)
1662 (string-append prefix "\"\n"))
1663 ;; Do not leak information about the build host
1664 (("DIST_NAME=\"\\$build_os\"")
1665 "DIST_NAME=\"guix\""))
1666 #t))))
1667 (arguments
1668 `(#:imported-modules
1669 ((guix build ant-build-system)
1670 (guix build syscalls)
1671 ,@%gnu-build-system-modules)
1672 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1673 ((#:modules modules)
1674 `((guix build utils)
1675 (guix build gnu-build-system)
1676 ((guix build ant-build-system) #:prefix ant:)
1677 (ice-9 match)
1678 (ice-9 popen)
1679 (srfi srfi-19)
1680 (srfi srfi-26)))
1681 ((#:configure-flags flags)
1682 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1683 `( ;;"--disable-bootstrap"
1684 "--enable-bootstrap"
1685 "--enable-nss"
1686 "--disable-downloading"
1687 "--disable-system-pcsc"
1688 "--disable-system-sctp"
1689 "--disable-tests" ;they are run in the check phase instead
1690 "--with-openjdk-src-dir=./openjdk.src"
1691 ,(string-append "--with-jdk-home=" jdk))))
1692 ((#:phases phases)
1693 `(modify-phases ,phases
1694 (delete 'fix-x11-extension-include-path)
1695 (delete 'patch-paths)
1696 (delete 'set-additional-paths)
1697 (delete 'patch-patches)
1698 (delete 'patch-bitrot)
1699 ;; Prevent the keytool from recording the current time when
1700 ;; adding certificates at build time.
1701 (add-after 'unpack 'patch-keystore
1702 (lambda _
1703 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1704 (("date = new Date\\(\\);")
1705 "\
1706date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1707new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1708new Date();"))
1709 #t))
1710 (add-after 'unpack 'patch-jni-libs
1711 ;; Hardcode dynamically loaded libraries.
1712 (lambda _
1713 (let* ((library-path (search-path-as-string->list
1714 (getenv "LIBRARY_PATH")))
1715 (find-library (lambda (name)
1716 (search-path
1717 library-path
1718 (string-append "lib" name ".so")))))
1719 (for-each
1720 (lambda (file)
1721 (catch 'decoding-error
1722 (lambda ()
1723 (substitute* file
1724 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1725 _ name version)
1726 (format #f "\"~a\"" (find-library name)))
1727 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1728 (format #f "\"~a\"" (find-library name)))))
1729 (lambda _
1730 ;; Those are safe to skip.
1731 (format (current-error-port)
1732 "warning: failed to substitute: ~a~%"
1733 file))))
1734 (find-files "openjdk.src/jdk/src/solaris/native"
1735 "\\.c|\\.h"))
1736 #t)))
1737 (replace 'install
1738 (lambda* (#:key outputs #:allow-other-keys)
1739 (let ((doc (string-append (assoc-ref outputs "doc")
1740 "/share/doc/icedtea"))
1741 (jre (assoc-ref outputs "out"))
1742 (jdk (assoc-ref outputs "jdk")))
1743 (copy-recursively "openjdk.build/docs" doc)
1744 (copy-recursively "openjdk.build/images/j2re-image" jre)
1745 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1746 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1747 ;; support via NSS.
1748 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1749 (string-append jre "/lib/security/nss.cfg"))
1750 #t)))
1751 (add-after 'install 'strip-jar-timestamps
1752 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1753 (native-inputs
1754 `(("jdk" ,icedtea-7 "jdk")
1755 ("openjdk-src"
1756 ,(drop "openjdk"
1757 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1758 ("aarch32-drop"
1759 ,(drop "aarch32"
1760 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1761 ("corba-drop"
1762 ,(drop "corba"
1763 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1764 ("jaxp-drop"
1765 ,(drop "jaxp"
1766 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1767 ("jaxws-drop"
1768 ,(drop "jaxws"
1769 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1770 ("jdk-drop"
1771 ,(drop "jdk"
1772 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1773 ("langtools-drop"
1774 ,(drop "langtools"
1775 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1776 ("hotspot-drop"
1777 ,(origin
1778 (method url-fetch)
1779 (uri (string-append
1780 "http://icedtea.classpath.org/download/drops"
1781 "/icedtea8/" version "/hotspot.tar.xz"))
1782 (sha256
1783 (base32
1784 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1785 (patches (search-patches
1786 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1787 ("nashorn-drop"
1788 ,(drop "nashorn"
1789 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1790 ("shenandoah-drop"
1791 ,(drop "shenandoah"
1792 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1793 ,@(fold alist-delete (package-native-inputs icedtea-7)
1794 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1795 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1796
1797(define-public openjdk9
1798 (package
1799 (name "openjdk")
1800 (version "9.181")
1801 (source (origin
1802 (method url-fetch)
1803 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1804 (file-name (string-append name "-" version ".tar.bz2"))
1805 (sha256
1806 (base32
1807 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1808 (modules '((guix build utils)))
1809 (snippet
1810 `(begin
1811 (for-each delete-file (find-files "." ".*.bin$"))
1812 (for-each delete-file (find-files "." ".*.exe$"))
1813 (for-each delete-file (find-files "." ".*.jar$"))
1814 #t))))
1815 (build-system gnu-build-system)
1816 (outputs '("out" "jdk" "doc"))
1817 (arguments
1818 `(#:tests? #f; require jtreg
1819 #:imported-modules
1820 ((guix build syscalls)
1821 ,@%gnu-build-system-modules)
1822 #:phases
1823 (modify-phases %standard-phases
1824 (add-after 'patch-source-shebangs 'fix-java-shebangs
1825 (lambda _
1826 ;; This file was "fixed" by patch-source-shebangs, but it requires
1827 ;; this exact first line.
1828 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1829 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1830 #t))
1831 (replace 'configure
1832 (lambda* (#:key inputs outputs #:allow-other-keys)
1833 ;; TODO: unbundle libpng and lcms
1834 (invoke "bash" "./configure"
1835 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1836 "--disable-freetype-bundling"
1837 "--disable-warnings-as-errors"
1838 "--disable-hotspot-gtest"
1839 "--with-giflib=system"
1840 "--with-libjpeg=system"
1841 (string-append "--prefix=" (assoc-ref outputs "out")))
1842 #t))
1843 (replace 'build
1844 (lambda _
1845 (with-output-to-file ".src-rev"
1846 (lambda _
1847 (display ,version)))
1848 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1849 (invoke "make" "all")
1850 #t))
1851 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1852 ;; But that shared object is located in the server/ folder, so it
1853 ;; cannot be found. This phase creates a symbolic link in the
1854 ;; lib/ folder so that the other libraries can find it.
1855 ;;
1856 ;; See:
1857 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1858 ;;
1859 ;; FIXME: Find the bug in the build system, so that this symlink is
1860 ;; not needed.
1861 (add-after 'install 'install-libjvm
1862 (lambda* (#:key inputs outputs #:allow-other-keys)
1863 (let* ((lib-out (string-append (assoc-ref outputs "out")
1864 "/lib"))
1865 (lib-jdk (string-append (assoc-ref outputs "jdk")
1866 "/lib")))
1867 (symlink (string-append lib-jdk "/server/libjvm.so")
1868 (string-append lib-jdk "/libjvm.so"))
1869 (symlink (string-append lib-out "/server/libjvm.so")
1870 (string-append lib-out "/libjvm.so")))
1871 #t))
1872 (replace 'install
1873 (lambda* (#:key outputs #:allow-other-keys)
1874 (let ((out (assoc-ref outputs "out"))
1875 (jdk (assoc-ref outputs "jdk"))
1876 (doc (assoc-ref outputs "doc"))
1877 (images (car (find-files "build" ".*-server-release"
1878 #:directories? #t))))
1879 (copy-recursively (string-append images "/images/jdk") jdk)
1880 (copy-recursively (string-append images "/images/jre") out)
1881 (copy-recursively (string-append images "/images/docs") doc))
1882 #t))
1883 (add-after 'install 'strip-zip-timestamps
1884 (lambda* (#:key outputs #:allow-other-keys)
1885 (use-modules (guix build syscalls))
1886 (for-each (lambda (zip)
1887 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1888 (with-directory-excursion dir
1889 (invoke "unzip" zip))
1890 (delete-file zip)
1891 (for-each (lambda (file)
1892 (let ((s (lstat file)))
1893 (unless (eq? (stat:type s) 'symlink)
1894 (format #t "reset ~a~%" file)
1895 (utime file 0 0 0 0))))
1896 (find-files dir #:directories? #t))
1897 (with-directory-excursion dir
1898 (let ((files (find-files "." ".*" #:directories? #t)))
1899 (apply invoke "zip" "-0" "-X" zip files)))))
1900 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1901 #t)))))
1902 (inputs
1903 `(("alsa-lib" ,alsa-lib)
1904 ("cups" ,cups)
1905 ("fontconfig" ,fontconfig)
1906 ("freetype" ,freetype)
1907 ("giflib" ,giflib)
1908 ("lcms" ,lcms)
1909 ("libelf" ,libelf)
1910 ("libjpeg" ,libjpeg)
1911 ("libice" ,libice)
1912 ("libpng" ,libpng)
1913 ("libx11" ,libx11)
1914 ("libxcomposite" ,libxcomposite)
1915 ("libxi" ,libxi)
1916 ("libxinerama" ,libxinerama)
1917 ("libxrender" ,libxrender)
1918 ("libxt" ,libxt)
1919 ("libxtst" ,libxtst)))
1920 (native-inputs
1921 `(("icedtea-8" ,icedtea-8)
1922 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1923 ("unzip" ,unzip)
1924 ("which" ,which)
1925 ("zip" ,zip)))
1926 (home-page "https://openjdk.java.net/projects/jdk9/")
1927 (synopsis "Java development kit")
1928 (description
1929 "This package provides the Java development kit OpenJDK.")
1930 (license license:gpl2+)))
1931
1932(define-public openjdk10
1933 (package
1934 (inherit openjdk9)
1935 (name "openjdk")
1936 (version "10.46")
1937 (source (origin
1938 (method url-fetch)
1939 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1940 (file-name (string-append name "-" version ".tar.bz2"))
1941 (sha256
1942 (base32
1943 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1944 (patches (search-patches
1945 "openjdk-10-idlj-reproducibility.patch"))
1946 (modules '((guix build utils)))
1947 (snippet
1948 `(begin
1949 (for-each delete-file (find-files "." ".*.bin$"))
1950 (for-each delete-file (find-files "." ".*.exe$"))
1951 (for-each delete-file (find-files "." ".*.jar$"))
1952 #t))))
1953 (arguments
1954 (substitute-keyword-arguments (package-arguments openjdk9)
1955 ((#:phases phases)
1956 `(modify-phases ,phases
1957 (replace 'fix-java-shebangs
1958 (lambda _
1959 ;; This file was "fixed" by patch-source-shebangs, but it requires
1960 ;; this exact first line.
1961 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1962 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1963 #t))
1964 (replace 'configure
1965 (lambda* (#:key inputs outputs #:allow-other-keys)
1966 (invoke "bash" "./configure"
1967 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1968 "--disable-freetype-bundling"
1969 "--disable-warnings-as-errors"
1970 "--disable-hotspot-gtest"
1971 "--with-giflib=system"
1972 "--with-libjpeg=system"
1973 "--with-native-debug-symbols=zipped"
1974 (string-append "--prefix=" (assoc-ref outputs "out")))
1975 #t))))))
1976 (native-inputs
1977 `(("openjdk9" ,openjdk9)
1978 ("openjdk9:jdk" ,openjdk9 "jdk")
1979 ("unzip" ,unzip)
1980 ("which" ,which)
1981 ("zip" ,zip)))))
1982
1983(define-public openjdk11
1984 (package
1985 (name "openjdk")
1986 (version "11.28")
1987 (source (origin
1988 (method url-fetch)
1989 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1990 (file-name (string-append name "-" version ".tar.bz2"))
1991 (sha256
1992 (base32
1993 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1994 (modules '((guix build utils)))
1995 (snippet
1996 `(begin
1997 (for-each delete-file (find-files "." ".*.bin$"))
1998 (for-each delete-file (find-files "." ".*.exe$"))
1999 (for-each delete-file (find-files "." ".*.jar$"))
2000 #t))))
2001 (build-system gnu-build-system)
2002 (outputs '("out" "jdk" "doc"))
2003 (arguments
2004 `(#:imported-modules
2005 ((guix build syscalls)
2006 (ice-9 binary-ports)
2007 (rnrs bytevectors)
2008 ,@%gnu-build-system-modules)
2009 #:tests? #f; requires jtreg
2010 ;; TODO package jtreg
2011 ;; disable parallel builds, as the openjdk build system does not like -j
2012 #:parallel-build? #f
2013 #:parallel-tests? #f
2014 ;; reenable parallel builds and tests by adding the flags manually
2015 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
2016 #:configure-flags
2017 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2018 "--disable-warnings-as-errors"
2019 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2020 "--with-native-debug-symbols=zipped"
2021 ;; do not use the bundled libraries
2022 "--with-giflib=system"
2023 "--with-lcms=system"
2024 "--with-libjpeg=system"
2025 "--with-libpng=system"
2026 "--with-version-pre="
2027 ;; allow the build system to locate the system freetype
2028 ,(string-append "--with-freetype-include="
2029 (assoc-ref %build-inputs "freetype") "/include")
2030 ,(string-append "--with-freetype-lib="
2031 (assoc-ref %build-inputs "freetype") "/lib"))
2032 ;; TODO
2033 #:phases
2034 (modify-phases %standard-phases
2035 (add-after 'patch-source-shebangs 'fix-java-shebangs
2036 (lambda _
2037 ;; This file was "fixed" by patch-source-shebangs, but it requires
2038 ;; this exact first line.
2039 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2040 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2041 #t))
2042 (replace 'build
2043 (lambda _
2044 (with-output-to-file ".src-rev"
2045 (lambda _
2046 (display ,version)))
2047 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
2048 (invoke "make" "all")
2049 #t))
2050 ;; jdk 11 does not build jre by default any more
2051 ;; building it anyways
2052 ;; for further information see:
2053 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2054 (add-after 'build 'build-jre
2055 (lambda _
2056 (invoke "make" "legacy-jre-image")
2057 #t))
2058 (replace 'install
2059 (lambda* (#:key outputs #:allow-other-keys)
2060 (let ((out (assoc-ref outputs "out"))
2061 (jdk (assoc-ref outputs "jdk"))
2062 (doc (assoc-ref outputs "doc"))
2063 (images (car (find-files "build" ".*-server-release"
2064 #:directories? #t))))
2065 (copy-recursively (string-append images "/images/jdk") jdk)
2066 (copy-recursively (string-append images "/images/jre") out)
2067 (copy-recursively (string-append images "/images/docs") doc))
2068 #t))
2069 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2070 ;; But that shared object is located in the server/ folder, so it
2071 ;; cannot be found. This phase creates a symbolic link in the
2072 ;; lib/ folder so that the other libraries can find it.
2073 ;;
2074 ;; See:
2075 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2076 ;;
2077 ;; FIXME: Find the bug in the build system, so that this symlink is
2078 ;; not needed.
2079 (add-after 'install 'install-libjvm
2080 (lambda* (#:key inputs outputs #:allow-other-keys)
2081 (let* ((lib-out (string-append (assoc-ref outputs "out")
2082 "/lib"))
2083 (lib-jdk (string-append (assoc-ref outputs "jdk")
2084 "/lib")))
2085 (symlink (string-append lib-jdk "/server/libjvm.so")
2086 (string-append lib-jdk "/libjvm.so"))
2087 (symlink (string-append lib-out "/server/libjvm.so")
2088 (string-append lib-out "/libjvm.so")))
2089 #t))
2090 (add-after 'install 'strip-character-data-timestamps
2091 (lambda* (#:key outputs #:allow-other-keys)
2092 (use-modules (guix build syscalls))
2093 (let ((archive (string-append
2094 (assoc-ref outputs "jdk") "/lib/src.zip"))
2095 (dir (mkdtemp! "zip-contents.XXXXXX")))
2096 (with-directory-excursion dir
2097 (invoke "unzip" archive))
2098 (delete-file archive)
2099 (with-directory-excursion dir
2100 (let ((char-data-files (find-files "." "CharacterData.*")))
2101 (for-each (lambda (file)
2102 (substitute* file
2103 (((string-append "This file was generated "
2104 "AUTOMATICALLY from a template "
2105 "file.*"))
2106 (string-append "This file was generated "
2107 "AUTOMATICALLY from a template "
2108 "file"))))
2109 char-data-files)))
2110 (with-directory-excursion dir
2111 (let ((files (find-files "." ".*" #:directories? #t)))
2112 (apply invoke "zip" "-0" "-X" archive files))))))
2113 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2114 (lambda* (#:key outputs #:allow-other-keys)
2115 (use-modules (guix build syscalls)
2116 (ice-9 binary-ports)
2117 (rnrs bytevectors))
2118 (letrec ((repack-archive
2119 (lambda (archive)
2120 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2121 (with-directory-excursion dir
2122 (invoke "unzip" archive))
2123 (delete-file archive)
2124 (for-each (compose repack-archive canonicalize-path)
2125 (find-files dir "(ct.sym|.*.jar)$"))
2126 (let ((reset-file-timestamp
2127 (lambda (file)
2128 (let ((s (lstat file)))
2129 (unless (eq? (stat:type s) 'symlink)
2130 (format #t "reset ~a~%" file)
2131 (utime file 0 0 0 0))))))
2132 (for-each reset-file-timestamp
2133 (find-files dir #:directories? #t)))
2134 (with-directory-excursion dir
2135 (let ((files (find-files "." ".*" #:directories? #t)))
2136 (apply invoke "zip" "-0" "-X" archive files)))))))
2137 (for-each repack-archive
2138 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2139 (for-each repack-archive
2140 (find-files (assoc-ref outputs "jdk")
2141 ".*.(zip|jar|diz)$"))
2142 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2143 (let ((repack-jmod
2144 (lambda (file-name)
2145 (call-with-input-file file-name
2146 (lambda (file)
2147 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2148 (if (equal? (get-bytevector-n
2149 file (bytevector-length header))
2150 header)
2151 (let* ((header-length (bytevector-length header))
2152 (temp-file (mkstemp!
2153 (string-copy
2154 "temp-file.XXXXXX")))
2155 (temp-filename (port-filename temp-file))
2156 (content-length
2157 (- (stat:size (stat file))
2158 header-length)))
2159 (sendfile temp-file file content-length header-length)
2160 (delete-file file-name)
2161 (close-port temp-file)
2162 (repack-archive (canonicalize-path temp-filename))
2163 (call-with-output-file file-name
2164 (lambda (file)
2165 (put-bytevector file header)
2166 (call-with-input-file temp-filename
2167 (lambda (temp-file)
2168 (sendfile
2169 file temp-file
2170 (stat:size (stat temp-file)) 0)))))))))))))
2171 (for-each repack-jmod
2172 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2173 #t)))
2174 (add-after 'install 'remove-timestamp-from-api-summary
2175 (lambda* (#:key outputs #:allow-other-keys)
2176 (substitute* (string-append (assoc-ref outputs "doc")
2177 "/api/overview-summary.html")
2178 (("Generated by javadoc \\(11-internal\\).*$")
2179 "Generated by javadoc (11-internal) -->\n"))
2180 #t)))))
2181 (inputs
2182 `(("alsa-lib" ,alsa-lib)
2183 ("cups" ,cups)
2184 ("fontconfig" ,fontconfig)
2185 ("freetype" ,freetype)
2186 ("giflib" ,giflib)
2187 ("lcms" ,lcms)
2188 ("libjpeg" ,libjpeg)
2189 ("libpng" ,libpng)
2190 ("libx11" ,libx11)
2191 ("libxext" ,libxext)
2192 ("libxrender" ,libxrender)
2193 ("libxt" ,libxt)
2194 ("libxtst" ,libxtst)))
2195 (native-inputs
2196 `(("autoconf" ,autoconf)
2197 ("openjdk10" ,openjdk10)
2198 ("openjdk10:jdk" ,openjdk10 "jdk")
2199 ("pkg-config" ,pkg-config)
2200 ("unzip" ,unzip)
2201 ("which" ,which)
2202 ("zip" ,zip)))
2203 (home-page "https://openjdk.java.net/projects/jdk/11/")
2204 (synopsis "Java development kit")
2205 (description
2206 "This package provides the Java development kit OpenJDK.")
2207 (license license:gpl2+)))
2208
2209(define-public openjdk12
2210 (package
2211 (inherit openjdk11)
2212 (name "openjdk")
2213 (version "12.33")
2214 (source (origin
2215 (method url-fetch)
2216 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2217 (file-name (string-append name "-" version ".tar.bz2"))
2218 (sha256
2219 (base32
2220 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2221 (modules '((guix build utils)))
2222 (snippet
2223 `(begin
2224 (for-each delete-file (find-files "." ".*.bin$"))
2225 (for-each delete-file (find-files "." ".*.exe$"))
2226 (for-each delete-file (find-files "." ".*.jar$"))
2227 #t))))
2228 (inputs
2229 `(("alsa-lib" ,alsa-lib)
2230 ("cups" ,cups)
2231 ("fontconfig" ,fontconfig)
2232 ("freetype" ,freetype)
2233 ("giflib" ,giflib)
2234 ("lcms" ,lcms)
2235 ("libjpeg" ,libjpeg)
2236 ("libpng" ,libpng)
2237 ("libx11" ,libx11)
2238 ("libxext" ,libxext)
2239 ("libxrandr" ,libxrandr)
2240 ("libxrender" ,libxrender)
2241 ("libxt" ,libxt)
2242 ("libxtst" ,libxtst)))
2243 (native-inputs
2244 `(("autoconf" ,autoconf)
2245 ("openjdk11" ,openjdk11)
2246 ("openjdk11:jdk" ,openjdk11 "jdk")
2247 ("pkg-config" ,pkg-config)
2248 ("unzip" ,unzip)
2249 ("which" ,which)
2250 ("zip" ,zip)))
2251 (home-page "https://openjdk.java.net/projects/jdk/12")))
2252
2253(define-public icedtea icedtea-8)
2254
2255
2256(define-public ant/java8
2257 (package (inherit ant-bootstrap)
2258 (name "ant")
2259 (version "1.10.1")
2260 (source (origin
2261 (method url-fetch)
2262 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2263 version "-src.tar.gz"))
2264 (sha256
2265 (base32
2266 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2267 (modules '((guix build utils)))
2268 (snippet
2269 '(begin
2270 (for-each delete-file
2271 (find-files "lib/optional" "\\.jar$"))
2272 #t))))
2273 (arguments
2274 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2275 ((#:phases phases)
2276 `(modify-phases ,phases
2277 (add-after 'unpack 'remove-scripts
2278 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2279 ;; wrappers.
2280 (lambda _
2281 (for-each delete-file
2282 (find-files "src/script"
2283 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2284 #t))
2285 (replace 'build
2286 (lambda* (#:key inputs outputs #:allow-other-keys)
2287 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2288
2289 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2290 ;; Ant to build. This is necessary in addition to disabling the
2291 ;; "check" phase, because the dependency on "test-jar" would always
2292 ;; result in the tests to be run.
2293 (substitute* "build.xml"
2294 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2295 (invoke "bash" "bootstrap.sh"
2296 (string-append "-Ddist.dir="
2297 (assoc-ref outputs "out")))))))))
2298 (native-inputs
2299 `(("jdk" ,icedtea-8 "jdk")
2300 ("zip" ,zip)
2301 ("unzip" ,unzip)))))
2302
2303;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2304;; requires Java 8.
2305(define-public ant
2306 (package (inherit ant/java8)
2307 (version "1.9.9")
2308 (source (origin
2309 (method url-fetch)
2310 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2311 version "-src.tar.gz"))
2312 (sha256
2313 (base32
2314 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2315 (native-inputs
2316 `(("jdk" ,icedtea-7 "jdk")
2317 ("zip" ,zip)
2318 ("unzip" ,unzip)))))
2319
2320(define-public ant-apache-bcel
2321 (package
2322 (inherit ant/java8)
2323 (name "ant-apache-bcel")
2324 (arguments
2325 (substitute-keyword-arguments (package-arguments ant/java8)
2326 ((#:phases phases)
2327 `(modify-phases ,phases
2328 (add-after 'unpack 'link-bcel
2329 (lambda* (#:key inputs #:allow-other-keys)
2330 (for-each (lambda (file)
2331 (symlink file
2332 (string-append "lib/optional/"
2333 (basename file))))
2334 (find-files (assoc-ref inputs "java-commons-bcel")
2335 "\\.jar$"))
2336 #t))
2337 (add-after 'build 'install
2338 (lambda* (#:key outputs #:allow-other-keys)
2339 (let* ((out (assoc-ref outputs "out"))
2340 (share (string-append out "/share/java"))
2341 (bin (string-append out "/bin"))
2342 (lib (string-append out "/lib")))
2343 (mkdir-p share)
2344 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2345 (delete-file-recursively bin)
2346 (delete-file-recursively lib)
2347 #t)))))))
2348 (inputs
2349 `(("java-commons-bcel" ,java-commons-bcel)
2350 ,@(package-inputs ant/java8)))))
2351
2352(define-public ant-junit
2353 (package
2354 (inherit ant/java8)
2355 (name "ant-junit")
2356 (arguments
2357 (substitute-keyword-arguments (package-arguments ant/java8)
2358 ((#:phases phases)
2359 `(modify-phases ,phases
2360 (add-after 'unpack 'link-junit
2361 (lambda* (#:key inputs #:allow-other-keys)
2362 (for-each (lambda (file)
2363 (symlink file
2364 (string-append "lib/optional/"
2365 (basename file))))
2366 (find-files (assoc-ref inputs "java-junit")
2367 "\\.jar$"))
2368 #t))
2369 (add-after 'build 'install
2370 (lambda* (#:key outputs #:allow-other-keys)
2371 (let* ((out (assoc-ref outputs "out"))
2372 (share (string-append out "/share/java"))
2373 (bin (string-append out "/bin"))
2374 (lib (string-append out "/lib")))
2375 (mkdir-p share)
2376 (install-file (string-append lib "/ant-junit.jar") share)
2377 (delete-file-recursively bin)
2378 (delete-file-recursively lib)
2379 #t)))))))
2380 (inputs
2381 `(("java-junit" ,java-junit)
2382 ,@(package-inputs ant/java8)))))
2383
2384(define-public java-openjfx-build
2385 (package
2386 (name "java-openjfx-build")
2387 ;; This is a java-8 version
2388 (version "8.202")
2389 (source (origin
2390 (method hg-fetch)
2391 (uri (hg-reference
2392 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2393 (changeset (string-append
2394 (string-join (string-split version #\.) "u")
2395 "-ga"))))
2396 (file-name (string-append name "-" version "-checkout"))
2397 (modules '((guix build utils)))
2398 (snippet
2399 '(begin
2400 ;; Delete included gradle jar
2401 (delete-file-recursively "gradle/wrapper")
2402 #t))
2403 (sha256
2404 (base32
2405 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2406 (build-system ant-build-system)
2407 (arguments
2408 `(#:jar-name "java-openjfx.jar"
2409 #:source-dir "buildSrc/src/main/java"
2410 #:test-dir "buildSrc/src/test"
2411 #:phases
2412 (modify-phases %standard-phases
2413 (add-before 'configure 'generate-jsl-parser
2414 (lambda _
2415 (invoke "antlr3" "-o"
2416 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2417 "buildSrc/src/main/antlr/JSL.g"))))))
2418 (inputs
2419 `(("antlr3" ,antlr3)
2420 ("java-stringtemplate" ,java-stringtemplate)))
2421 (native-inputs
2422 `(("java-junit" ,java-junit)
2423 ("java-hamcrest-core" ,java-hamcrest-core)))
2424 (home-page "https://openjfx.io")
2425 (synopsis "Graphical application toolkit in Java")
2426 (description "OpenJFX is a client application platform for desktop,
2427mobile and embedded systems built on Java. Its goal is to produce a
2428modern, efficient, and fully featured toolkit for developing rich client
2429applications. This package contains base classes for the OpenJFX
2430distribution and helper classes for building other parts of the
2431distribution.")
2432 (license license:gpl2))) ;gpl2 only, with classpath exception
2433
2434(define-public java-openjfx-base
2435 (package (inherit java-openjfx-build)
2436 (name "java-openjfx-base")
2437 (arguments
2438 `(#:jar-name "java-openjfx-base.jar"
2439 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2440 #:test-dir "modules/base/src/test"
2441 #:phases
2442 (modify-phases %standard-phases
2443 (add-before 'check 'remove-empty-file
2444 (lambda _
2445 (with-directory-excursion "modules/base/src/test/java"
2446 ;; These files are completely commented, but junit expects them to
2447 ;; contain a class, so tests fail.
2448 (delete-file
2449 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2450 (delete-file
2451 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2452 (delete-file "javafx/beans/property/PropertiesTest.java")
2453 (delete-file
2454 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2455 ;; This one fails
2456 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2457 #t)))))
2458 (propagated-inputs
2459 `(("java-openjfx-build" ,java-openjfx-build)))
2460 (description "OpenJFX is a client application platform for desktop,
2461mobile and embedded systems built on Java. Its goal is to produce a
2462modern, efficient, and fully featured toolkit for developing rich client
2463applications. This package contains base classes for the OpenJFX
2464distribution.")))
2465
2466(define-public java-openjfx-graphics
2467 (package (inherit java-openjfx-build)
2468 (name "java-openjfx-graphics")
2469 (arguments
2470 `(#:jar-name "java-openjfx-graphics.jar"
2471 #:source-dir "modules/graphics/src/main/java"
2472 #:tests? #f; require X
2473 #:test-dir "modules/graphics/src/test"))
2474 (propagated-inputs
2475 `(("java-openjfx-base" ,java-openjfx-base)
2476 ("java-swt" ,java-swt)))
2477 (description "OpenJFX is a client application platform for desktop,
2478mobile and embedded systems built on Java. Its goal is to produce a
2479modern, efficient, and fully featured toolkit for developing rich client
2480applications. This package contains graphics-related classes for the
2481OpenJFX distribution.")))
2482
2483(define-public java-openjfx-media
2484 (package (inherit java-openjfx-build)
2485 (name "java-openjfx-media")
2486 (propagated-inputs
2487 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2488 (arguments
2489 `(#:jar-name "java-openjfx-media.jar"
2490 #:source-dir "modules/media/src/main/java"
2491 #:tests? #f)); no tests
2492 (description "OpenJFX is a client application platform for desktop,
2493mobile and embedded systems built on Java. Its goal is to produce a
2494modern, efficient, and fully featured toolkit for developing rich client
2495applications. This package contains media-related classes for the
2496OpenJFX distribution.")))
2497
2498(define-public javacc-4
2499 (package
2500 (name "javacc")
2501 (version "4.1")
2502 (source (origin
2503 (method git-fetch)
2504 (uri (git-reference
2505 (url "https://github.com/javacc/javacc.git")
2506 (commit "release_41")))
2507 (file-name (string-append "javacc-" version "-checkout"))
2508 (sha256
2509 (base32
2510 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2511 (modules '((guix build utils)))
2512 ;; delete bundled jars
2513 (snippet '(begin (delete-file-recursively "lib") #t))))
2514 (build-system ant-build-system)
2515 ;; Tests fail with
2516 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2517 ;; JAVACODE failed
2518 (arguments
2519 `(#:tests? #f
2520 #:phases
2521 (modify-phases %standard-phases
2522 ;; Delete tests to avoid build failure (we don't run them anyway).
2523 (add-after 'unpack 'delete-tests
2524 (lambda _
2525 (for-each delete-file
2526 '("src/org/javacc/JavaCCTestCase.java"
2527 "src/org/javacc/parser/ExpansionTest.java"
2528 "src/org/javacc/parser/OptionsTest.java"
2529 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2530 (for-each delete-file-recursively
2531 '("src/org/javacc/parser/test"
2532 "src/org/javacc/jjdoc/test"))
2533 #t))
2534 (replace 'install (install-jars "bin/lib")))))
2535 (home-page "https://javacc.org/")
2536 (synopsis "Java parser generator")
2537 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2538generator for use with Java applications. A parser generator is a tool that
2539reads a grammar specification and converts it to a Java program that can
2540recognize matches to the grammar. In addition to the parser generator itself,
2541JavaCC provides other standard capabilities related to parser generation such
2542as tree building (via a tool called JJTree included with JavaCC), actions,
2543debugging, etc.")
2544 (license license:bsd-3)))
2545
2546(define-public javacc
2547 (package
2548 (inherit javacc-4)
2549 (version "7.0.4")
2550 (source
2551 (origin
2552 (method git-fetch)
2553 (uri (git-reference
2554 (url "https://github.com/javacc/javacc.git")
2555 (commit version)))
2556 (file-name (git-file-name "javacc" version))
2557 (sha256
2558 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2559 (modules '((guix build utils)))
2560 ;; Delete bundled jars.
2561 (snippet '(begin (for-each delete-file-recursively
2562 '("bootstrap" "lib"))
2563 #t))))
2564 (arguments
2565 `(#:make-flags ; bootstrap from javacc-4
2566 (list (string-append "-Dbootstrap-jar="
2567 (assoc-ref %build-inputs "javacc")
2568 "/share/java/javacc.jar"))
2569 #:test-target "test"
2570 #:phases
2571 (modify-phases %standard-phases
2572 (replace 'install (install-jars "target"))
2573 (add-after 'install 'install-bin
2574 (lambda* (#:key outputs inputs #:allow-other-keys)
2575 (let* ((out (assoc-ref outputs "out"))
2576 (dir (string-append out "/share/java"))
2577 (bin (string-append out "/bin"))
2578 (javacc (string-append bin "/javacc")))
2579 (mkdir-p bin)
2580 (with-output-to-file javacc
2581 (lambda _
2582 (display
2583 (string-append "#!/bin/sh\n"
2584 (assoc-ref inputs "jdk") "/bin/java"
2585 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2586 (chmod javacc #o755)
2587 ;; symlink to different names to affect the first argument and
2588 ;; change the behavior of the jar file.
2589 (symlink javacc (string-append bin "/jjdoc"))
2590 (symlink javacc (string-append bin "/jjtree"))
2591 #t))))))
2592
2593 (native-inputs
2594 `(("javacc" ,javacc-4)))))
2595
2596;; This is the last 3.x release of ECJ
2597(define-public java-ecj-3
2598 (package
2599 (name "java-ecj")
2600 (version "3.8.2")
2601 (source (origin
2602 (method url-fetch)
2603 (uri (string-append "http://archive.eclipse.org/eclipse/"
2604 "downloads/drops/R-" version
2605 "-201301310800/ecjsrc-" version ".jar"))
2606 (sha256
2607 (base32
2608 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2609 (build-system ant-build-system)
2610 (arguments
2611 `(#:tests? #f ; none included
2612 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2613 #:make-flags (list "-f" "src/build.xml")
2614 #:build-target "build"
2615 #:phases
2616 (modify-phases %standard-phases
2617 (add-after 'unpack 'fix-manifest
2618 (lambda _
2619 ;; Record the main class to make ecj executable.
2620 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2621 (lambda (in out)
2622 (display "Manifest-Version: 1.0
2623Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2624 out)))
2625 #t))
2626 (replace 'install (install-jars ".")))))
2627 (home-page "https://eclipse.org")
2628 (synopsis "Eclipse Java development tools core batch compiler")
2629 (description "This package provides the Eclipse Java core batch compiler.")
2630 (license license:epl1.0)))
2631
2632;; This is needed for java-cisd-args4j
2633(define-public java-ecj-3.5
2634 (package (inherit java-ecj-3)
2635 (version "3.5.1")
2636 (source (origin
2637 (method url-fetch/zipbomb)
2638 (uri (string-append "http://archive.eclipse.org/eclipse/"
2639 "downloads/drops/R-" version
2640 "-200909170800/ecjsrc-" version ".zip"))
2641 (sha256
2642 (base32
2643 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2644 (build-system ant-build-system)
2645 (arguments
2646 `(#:tests? #f ; none included
2647 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2648 #:build-target "build"
2649 #:phases
2650 (modify-phases %standard-phases
2651 (add-after 'unpack 'fix-manifest
2652 (lambda _
2653 ;; Record the main class to make ecj executable.
2654 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2655 (lambda (in out)
2656 (dump-port in out)
2657 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2658 out)))
2659 #t))
2660 (replace 'install (install-jars ".")))))
2661 (native-inputs
2662 `(("unzip" ,unzip)))))
2663
2664(define-public java-ecj
2665 (package (inherit java-ecj-3)
2666 (version "4.6.3")
2667 (source
2668 (origin
2669 (method url-fetch)
2670 (uri (string-append
2671 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2672 version
2673 "-201703010400/ecjsrc-"
2674 version
2675 ".jar"))
2676 (sha256
2677 (base32
2678 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2679 (arguments
2680 `(#:tests? #f ; none included
2681 #:build-target "build"
2682 #:phases
2683 (modify-phases %standard-phases
2684 (add-after 'unpack 'fix-build.xml
2685 (lambda _
2686 (substitute* "src/build.xml"
2687 (("^.*MANIFEST.*$")
2688 ""))
2689 #t))
2690 (add-after 'unpack 'fix-prop
2691 (lambda _
2692 (substitute* "src/build.xml"
2693 (("^.*properties.*$")
2694 "<include name=\"**/*.properties\"/>
2695 <include name=\"**/*.props\"/>"))
2696 #t))
2697 (add-before 'build 'chdir
2698 (lambda _
2699 (chdir "src")
2700 #t))
2701 (replace 'install (install-jars ".")))))))
2702
2703(define-public java-cisd-base
2704 (let ((revision 38938)
2705 (base-version "14.12.0"))
2706 (package
2707 (name "java-cisd-base")
2708 (version (string-append base-version "-" (number->string revision)))
2709 (source (origin
2710 (method svn-fetch)
2711 (uri (svn-reference
2712 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2713 "base/tags/release/"
2714 (version-major+minor base-version)
2715 ".x/" base-version "/base/"))
2716 (revision revision)))
2717 (file-name (string-append "java-cisd-base-" version "-checkout"))
2718 (sha256
2719 (base32
2720 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2721 (modules '((guix build utils)))
2722 (snippet
2723 '(begin
2724 ;; Delete included gradle jar
2725 (delete-file-recursively "gradle/wrapper")
2726 ;; Delete pre-built native libraries
2727 (delete-file-recursively "libs")
2728 #t))))
2729 (build-system ant-build-system)
2730 (arguments
2731 `(#:make-flags '("-file" "build/build.xml")
2732 #:test-target "jar-test"
2733 #:jdk ,icedtea-8
2734 #:phases
2735 (modify-phases %standard-phases
2736 (add-after 'unpack 'unpack-build-resources
2737 (lambda* (#:key inputs #:allow-other-keys)
2738 (copy-recursively (assoc-ref inputs "build-resources")
2739 "../build_resources")
2740 #t))
2741 (add-after 'unpack-build-resources 'fix-dependencies
2742 (lambda* (#:key inputs #:allow-other-keys)
2743 (substitute* "build/build.xml"
2744 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2745 (string-append (assoc-ref inputs "java-testng")
2746 "/share/java/java-testng.jar"))
2747 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2748 (string-append (assoc-ref inputs "java-commons-lang")
2749 "/share/java/commons-lang-"
2750 ,(package-version java-commons-lang) ".jar"))
2751 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2752 (string-append (assoc-ref inputs "java-commons-io")
2753 "/share/java/commons-io-"
2754 ,(package-version java-commons-io)
2755 "-SNAPSHOT.jar"))
2756 ;; Remove dependency on svn
2757 (("<build-info.*") "")
2758 (("\\$\\{revision.number\\}")
2759 ,(number->string revision))
2760 (("\\$\\{version.number\\}") ,base-version))
2761 ;; Remove dependency on classycle
2762 (substitute* "../build_resources/ant/build-common.xml"
2763 (("<taskdef name=\"dependency-checker.*") "")
2764 (("classname=\"classycle.*") "")
2765 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2766 #t))
2767 ;; A few tests fail because of the lack of a proper /etc/groups and
2768 ;; /etc/passwd file in the build container.
2769 (add-after 'unpack 'disable-broken-tests
2770 (lambda _
2771 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2772 (("Unix.isOperational\\(\\)") "false"))
2773 #t))
2774 ;; These decorators are almost useless and pull in an unpackaged
2775 ;; dependency.
2776 (add-after 'unpack 'remove-useless-decorators
2777 (lambda _
2778 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2779 (("@Private") "")
2780 (("import ch.rinn.restrictions.Private;") ""))
2781 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2782 (("@Friend.*") "")
2783 (("import ch.rinn.restrictions.Friend;") ""))
2784 #t))
2785 (add-before 'configure 'build-native-code
2786 (lambda* (#:key inputs #:allow-other-keys)
2787 (let ((jdk (assoc-ref inputs "jdk"))
2788 (dir ,(match (%current-system)
2789 ("i686-linux"
2790 "i386-Linux")
2791 ((or "armhf-linux" "aarch64-linux")
2792 "arm-Linux")
2793 ((or "x86_64-linux")
2794 "amd64-Linux")
2795 (_ "unknown-Linux"))))
2796 (with-directory-excursion "source/c"
2797 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2798 (string-append "-I" jdk "/include")
2799 (string-append "-I" jdk "/include/linux")
2800 "-o" "libunix.so")
2801 (invoke "gcc" "-shared" "-O3" "-fPIC"
2802 "-DMACHINE_BYTE_ORDER=1"
2803 "copyCommon.c"
2804 "copyByteChar.c"
2805 "copyByteDouble.c"
2806 "copyByteFloat.c"
2807 "copyByteInt.c"
2808 "copyByteLong.c"
2809 "copyByteShort.c"
2810 (string-append "-I" jdk "/include")
2811 (string-append "-I" jdk "/include/linux")
2812 "-o" "libnativedata.so"))
2813 (install-file "source/c/libunix.so"
2814 (string-append "libs/native/unix/" dir))
2815 (install-file "source/c/libnativedata.so"
2816 (string-append "libs/native/nativedata/" dir))
2817 #t)))
2818 ;; In the "check" phase we only build the test executable.
2819 (add-after 'check 'run-tests
2820 (lambda _
2821 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2822 (delete-file "targets/dist/sis-base-test.jar")
2823 #t))
2824 (replace 'install (install-jars "targets/dist")))))
2825 (native-inputs
2826 `(("jdk" ,icedtea-8)
2827 ("java-commons-lang" ,java-commons-lang)
2828 ("java-commons-io" ,java-commons-io)
2829 ("java-testng" ,java-testng)
2830 ("build-resources"
2831 ,(origin
2832 (method svn-fetch)
2833 (uri (svn-reference
2834 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2835 "base/tags/release/"
2836 (version-major+minor base-version)
2837 ".x/" base-version
2838 "/build_resources/"))
2839 (revision revision)))
2840 (sha256
2841 (base32
2842 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2843 (home-page "http://svnsis.ethz.ch")
2844 (synopsis "Utility classes for libraries from ETH Zurich")
2845 (description "This library supplies some utility classes needed for
2846libraries from the SIS division at ETH Zurich like jHDF5.")
2847 ;; The C sources are under a non-copyleft license, which looks like a
2848 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2849 (license (list license:asl2.0
2850 (license:non-copyleft "file://source/c/COPYING"))))))
2851
2852(define-public java-cisd-args4j
2853 (let ((revision 39162)
2854 (base-version "9.11.2"))
2855 (package
2856 (name "java-cisd-args4j")
2857 (version (string-append base-version "-" (number->string revision)))
2858 (source (origin
2859 (method svn-fetch)
2860 (uri (svn-reference
2861 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2862 "args4j/tags/release/"
2863 (version-major+minor base-version)
2864 ".x/" base-version "/args4j/"))
2865 (revision revision)))
2866 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2867 (sha256
2868 (base32
2869 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2870 (build-system ant-build-system)
2871 (arguments
2872 `(#:make-flags '("-file" "build/build.xml")
2873 #:tests? #f ; there are no tests
2874 ;; There are weird build failures with JDK8, such as: "The type
2875 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2876 ;; referenced from required .class files"
2877 #:jdk ,icedtea-7
2878 #:modules ((guix build ant-build-system)
2879 (guix build utils)
2880 (guix build java-utils)
2881 (sxml simple)
2882 (sxml transform)
2883 (sxml xpath))
2884 #:phases
2885 (modify-phases %standard-phases
2886 (add-after 'unpack 'unpack-build-resources
2887 (lambda* (#:key inputs #:allow-other-keys)
2888 (mkdir-p "../build_resources")
2889 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2890 "-C" "../build_resources"
2891 "--strip-components=1")
2892 (mkdir-p "../build_resources/lib")
2893 #t))
2894 (add-after 'unpack-build-resources 'fix-dependencies
2895 (lambda* (#:key inputs #:allow-other-keys)
2896 ;; FIXME: There should be a more convenient abstraction for
2897 ;; editing XML files.
2898 (with-directory-excursion "../build_resources/ant/"
2899 (chmod "build-common.xml" #o664)
2900 (call-with-output-file "build-common.xml.new"
2901 (lambda (port)
2902 (sxml->xml
2903 (pre-post-order
2904 (with-input-from-file "build-common.xml"
2905 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2906 `(;; Remove dependency on classycle and custom ant tasks
2907 (taskdef . ,(lambda (tag . kids)
2908 (let ((name ((sxpath '(name *text*)) kids)))
2909 (if (or (member "build-info" name)
2910 (member "dependency-checker" name)
2911 (member "build-java-subprojects" name)
2912 (member "project-classpath" name))
2913 '() ; skip
2914 `(,tag ,@kids)))))
2915 (typedef . ,(lambda (tag . kids)
2916 (let ((name ((sxpath '(name *text*)) kids)))
2917 (if (member "recursive-jar" name)
2918 '() ; skip
2919 `(,tag ,@kids)))))
2920 (build-java-subprojects . ,(lambda _ '()))
2921 ;; Ignore everything else
2922 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2923 (*text* . ,(lambda (_ txt) txt))))
2924 port)))
2925 (rename-file "build-common.xml.new" "build-common.xml"))
2926 (substitute* "build/build.xml"
2927 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2928 (string-append (assoc-ref inputs "java-cisd-base")
2929 "/share/java/sis-base.jar"))
2930 ;; Remove dependency on svn
2931 (("<build-info.*") "")
2932 (("\\$\\{revision.number\\}")
2933 ,(number->string revision))
2934 (("\\$\\{version.number\\}") ,base-version)
2935 ;; Don't use custom ant tasks.
2936 (("recursive-jar") "jar")
2937 (("<project-classpath.*") ""))
2938 #t))
2939 (replace 'install (install-jars "targets/dist")))))
2940 (inputs
2941 `(("java-cisd-base" ,java-cisd-base)))
2942 (native-inputs
2943 `(("ecj" ,java-ecj-3.5)
2944 ("build-resources"
2945 ,(origin
2946 (method svn-fetch)
2947 (uri (svn-reference
2948 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2949 "args4j/tags/release/"
2950 (version-major+minor base-version)
2951 ".x/" base-version
2952 "/build_resources/"))
2953 (revision revision)))
2954 (sha256
2955 (base32
2956 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2957 (modules '((guix build utils)))
2958 ;; Delete bundled pre-built jars.
2959 (snippet
2960 '(begin (delete-file-recursively "lib/") #t))))))
2961 (home-page "http://svnsis.ethz.ch")
2962 (synopsis "Command line parser library")
2963 (description "This package provides a parser for command line arguments.")
2964 (license license:asl2.0))))
2965
2966(define-public java-cisd-jhdf5
2967 (let ((revision 39162)
2968 (base-version "14.12.6"))
2969 (package
2970 (name "java-cisd-jhdf5")
2971 (version (string-append base-version "-" (number->string revision)))
2972 (source (origin
2973 (method svn-fetch)
2974 (uri (svn-reference
2975 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2976 "jhdf5/tags/release/"
2977 (version-major+minor base-version)
2978 ".x/" base-version "/jhdf5/"))
2979 (revision revision)))
2980 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2981 (sha256
2982 (base32
2983 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2984 (modules '((guix build utils)))
2985 (snippet
2986 '(begin
2987 ;; Delete included gradle jar
2988 (delete-file-recursively "gradle/wrapper")
2989 ;; Delete pre-built native libraries
2990 (delete-file-recursively "libs")
2991 #t))))
2992 (build-system ant-build-system)
2993 (arguments
2994 `(#:make-flags '("-file" "build/build.xml")
2995 #:build-target "jar-all"
2996 #:test-target "jar-test"
2997 #:jdk ,icedtea-8
2998 #:phases
2999 (modify-phases %standard-phases
3000 ;; FIXME: this build phase fails.
3001 (delete 'generate-jar-indices)
3002 ;; Don't erase results from the build phase when building tests.
3003 (add-after 'unpack 'separate-test-target-from-clean
3004 (lambda _
3005 (substitute* "build/build.xml"
3006 (("\"jar-test\" depends=\"clean, ")
3007 "\"jar-test\" depends=\""))
3008 #t))
3009 (add-after 'unpack 'unpack-build-resources
3010 (lambda* (#:key inputs #:allow-other-keys)
3011 (copy-recursively (assoc-ref inputs "build-resources")
3012 "../build_resources")
3013 (delete-file-recursively "../build_resources/lib/")
3014 (mkdir-p "../build_resources/lib")
3015 ;; Remove dependency on classycle
3016 (substitute* "../build_resources/ant/build-common.xml"
3017 (("<taskdef name=\"dependency-checker.*") "")
3018 (("classname=\"classycle.*") "")
3019 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3020 ;; Remove dependency on svn
3021 (substitute* "build/build.xml"
3022 (("<build-info.*") "")
3023 (("\\$\\{revision.number\\}")
3024 ,(number->string revision))
3025 (("\\$\\{version.number\\}") ,base-version))
3026 #t))
3027 (add-after 'unpack-build-resources 'fix-dependencies
3028 (lambda* (#:key inputs #:allow-other-keys)
3029 (substitute* "../build_resources/ant/build-common.xml"
3030 (("../libraries/testng/testng-jdk15.jar")
3031 (string-append (assoc-ref inputs "java-testng")
3032 "/share/java/java-testng.jar")))
3033 (substitute* "build/build.xml"
3034 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3035 (string-append (assoc-ref inputs "java-cisd-base")
3036 "/share/java/sis-base.jar"))
3037 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3038 (string-append (assoc-ref inputs "java-cisd-args4j")
3039 "/share/java/cisd-args4j.jar"))
3040 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3041 (string-append (assoc-ref inputs "java-commons-lang")
3042 "/share/java/commons-lang-"
3043 ,(package-version java-commons-lang) ".jar"))
3044 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3045 (string-append (assoc-ref inputs "java-commons-io")
3046 "/share/java/commons-io-"
3047 ,(package-version java-commons-io)
3048 "-SNAPSHOT.jar"))
3049 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3050 (string-append (assoc-ref inputs "java-testng")
3051 "/share/java/java-testng.jar"))
3052 (("\\$\\{lib\\}/junit4/junit.jar")
3053 (string-append (assoc-ref inputs "java-junit")
3054 "/share/java/junit.jar"))
3055 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3056 (string-append (assoc-ref inputs "java-hamcrest-core")
3057 "/share/java/hamcrest-core.jar")))
3058 ;; Remove dependency on ch.rinn.restrictions
3059 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3060 (substitute* '("BitSetConversionUtils.java"
3061 "HDF5Utils.java")
3062 (("import ch.rinn.restrictions.Private;") "")
3063 (("@Private") "")))
3064 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3065 (substitute* '("BitSetConversionTest.java"
3066 "h5ar/HDF5ArchiverTest.java")
3067 (("import ch.rinn.restrictions.Friend;") "")
3068 (("@Friend.*") ""))
3069 ;; Remove leftovers from removing @Friend
3070 (substitute* "h5ar/HDF5ArchiverTest.java"
3071 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3072 "")))
3073 #t))
3074 (add-before 'configure 'build-native-library
3075 (lambda* (#:key inputs #:allow-other-keys)
3076 (let ((jdk (assoc-ref inputs "jdk"))
3077 (hdf5 (assoc-ref inputs "hdf5"))
3078 (dir ,(match (%current-system)
3079 ("i686-linux"
3080 "i386-Linux")
3081 ((or "armhf-linux" "aarch64-linux")
3082 "arm-Linux")
3083 ((or "x86_64-linux")
3084 "amd64-Linux")
3085 (_ "unknown-Linux"))))
3086 (with-directory-excursion "source/c"
3087 (apply invoke `("gcc" "-shared" "-O3"
3088 "-fPIC"
3089 "-Wl,--exclude-libs,ALL"
3090 ,@(find-files "jhdf5" "\\.c$")
3091 ,@(find-files "hdf-java" "\\.c$")
3092 ,(string-append "-I" hdf5 "/include")
3093 ,(string-append "-I" jdk "/include")
3094 ,(string-append "-I" jdk "/include/linux")
3095 ,(string-append hdf5 "/lib/libhdf5.a")
3096 "-o" "libjhdf5.so" "-lz")))
3097 (install-file "source/c/libjhdf5.so"
3098 (string-append "libs/native/jhdf5/" dir))
3099 #t)))
3100 ;; In the "check" phase we only build the test executable.
3101 (add-after 'check 'run-tests
3102 (lambda _
3103 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3104 (delete-file "targets/dist/sis-jhdf5-test.jar")
3105 #t))
3106 (replace 'install
3107 (install-jars "targets/dist")))))
3108 (inputs
3109 `(("java-cisd-base" ,java-cisd-base)
3110 ("java-cisd-args4j" ,java-cisd-args4j)
3111 ("java-commons-lang" ,java-commons-lang)
3112 ("java-commons-io" ,java-commons-io)
3113 ("hdf5" ,hdf5)
3114 ("zlib" ,zlib)))
3115 (native-inputs
3116 `(("jdk" ,icedtea-8)
3117 ("java-testng" ,java-testng)
3118 ("java-junit" ,java-junit)
3119 ("java-jmock" ,java-jmock)
3120 ("java-hamcrest-core" ,java-hamcrest-core)
3121 ("build-resources"
3122 ,(origin
3123 (method svn-fetch)
3124 (uri (svn-reference
3125 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3126 "jhdf5/tags/release/"
3127 (version-major+minor base-version)
3128 ".x/" base-version
3129 "/build_resources/"))
3130 (revision revision)))
3131 (sha256
3132 (base32
3133 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3134 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3135 (synopsis "Java binding for HDF5")
3136 (description "JHDF5 is a high-level API in Java for reading and writing
3137HDF5 files, building on the libraries provided by the HDF Group.")
3138 ;; The C sources are under a non-copyleft license, which looks like a
3139 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3140 (license (list license:asl2.0
3141 (license:non-copyleft "file://source/c/COPYING"))))))
3142
3143(define-public java-classpathx-servletapi
3144 (package
3145 (name "java-classpathx-servletapi")
3146 (version "3.0.1")
3147 (source (origin
3148 (method url-fetch)
3149 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3150 "servletapi-" version ".tar.gz"))
3151 (sha256
3152 (base32
3153 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3154 (build-system ant-build-system)
3155 (arguments
3156 `(#:tests? #f ; there is no test target
3157 #:build-target "compile"
3158 #:make-flags
3159 (list "-Dbuild.compiler=javac1.8"
3160 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3161 #:phases
3162 (modify-phases %standard-phases
3163 (replace 'install
3164 (lambda* (#:key make-flags #:allow-other-keys)
3165 (apply invoke `("ant" "dist" ,@make-flags)))))))
3166 (home-page "https://www.gnu.org/software/classpathx/")
3167 (synopsis "Java servlet API implementation")
3168 (description "This is the GNU servlet API distribution, part of the
3169ClasspathX project. It provides implementations of version 3.0 of the servlet
3170API and version 2.1 of the Java ServerPages API.")
3171 (license license:gpl3+)))
3172
3173(define-public java-javaee-servletapi
3174 (package
3175 (name "java-javaee-servletapi")
3176 (version "3.1.0")
3177 (source (origin
3178 (method git-fetch)
3179 (uri (git-reference
3180 (url "https://github.com/javaee/servlet-spec.git")
3181 (commit version)))
3182 (file-name (git-file-name name version))
3183 (sha256
3184 (base32
3185 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3186 (build-system ant-build-system)
3187 (arguments
3188 `(#:jar-name "javax-servletapi.jar"
3189 ;; no tests
3190 #:tests? #f
3191 #:source-dir "src/main/java"
3192 #:phases
3193 (modify-phases %standard-phases
3194 (add-before 'build 'copy-resources
3195 (lambda _
3196 (mkdir-p "build/classes/javax/servlet/http")
3197 (let ((from-prefix "src/main/java/javax/servlet/")
3198 (to-prefix "build/classes/javax/servlet/"))
3199 (for-each (lambda (f)
3200 (copy-file (string-append from-prefix f)
3201 (string-append to-prefix f)))
3202 (list "LocalStrings_ja.properties"
3203 "LocalStrings.properties"
3204 "LocalStrings_fr.properties"
3205 "http/LocalStrings_es.properties"
3206 "http/LocalStrings_ja.properties"
3207 "http/LocalStrings.properties"
3208 "http/LocalStrings_fr.properties")))
3209 #t)))))
3210 (native-inputs
3211 `(("unzip" ,unzip)))
3212 (home-page "https://javaee.github.io/servlet-spec/")
3213 (synopsis "Java servlet API")
3214 (description "Java Servlet is the foundation web specification in the
3215Java Enterprise Platform. Developers can build web applications using the
3216Servlet API to interact with the request/response workflow. This project
3217provides information on the continued development of the Java Servlet
3218specification.")
3219 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3220 ;; Some files are licensed under ASL 2.0.
3221 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3222
3223(define-public java-swt
3224 (package
3225 (name "java-swt")
3226 (version "4.7.1a")
3227 (source
3228 ;; The types of many variables and procedures differ in the sources
3229 ;; dependent on whether the target architecture is a 32-bit system or a
3230 ;; 64-bit system. Instead of patching the sources on demand in a build
3231 ;; phase we download either the 32-bit archive (which mostly uses "int"
3232 ;; types) or the 64-bit archive (which mostly uses "long" types).
3233 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3234 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3235 (file32 "x86")
3236 (file64 "x86_64"))
3237 (let-values (((hash file)
3238 (match (or (%current-target-system) (%current-system))
3239 ("x86_64-linux" (values hash64 file64))
3240 (_ (values hash32 file32)))))
3241 (origin
3242 (method url-fetch)
3243 (uri (string-append
3244 "http://download.eclipse.org/eclipse/downloads/drops4/"
3245 "R-" version "-201710090410/swt-" version
3246 "-gtk-linux-" file ".zip"))
3247 (sha256 (base32 hash))))))
3248 (build-system ant-build-system)
3249 (arguments
3250 `(#:jar-name "swt.jar"
3251 #:jdk ,icedtea-8
3252 #:tests? #f ; no "check" target
3253 #:phases
3254 (modify-phases %standard-phases
3255 (replace 'unpack
3256 (lambda* (#:key source #:allow-other-keys)
3257 (mkdir "swt")
3258 (invoke "unzip" source "-d" "swt")
3259 (chdir "swt")
3260 (mkdir "src")
3261 (invoke "unzip" "src.zip" "-d" "src")))
3262 ;; The classpath contains invalid icecat jars. Since we don't need
3263 ;; anything other than the JDK on the classpath, we can simply unset
3264 ;; it.
3265 (add-after 'configure 'unset-classpath
3266 (lambda _ (unsetenv "CLASSPATH") #t))
3267 (add-before 'build 'build-native
3268 (lambda* (#:key inputs outputs #:allow-other-keys)
3269 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3270 ;; Build shared libraries. Users of SWT have to set the system
3271 ;; property swt.library.path to the "lib" directory of this
3272 ;; package output.
3273 (mkdir-p lib)
3274 (setenv "OUTPUT_DIR" lib)
3275 (with-directory-excursion "src"
3276 (invoke "bash" "build.sh")))))
3277 (add-after 'install 'install-native
3278 (lambda* (#:key outputs #:allow-other-keys)
3279 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3280 (for-each (lambda (file)
3281 (install-file file lib))
3282 (find-files "." "\\.so$"))
3283 #t))))))
3284 (inputs
3285 `(("gtk" ,gtk+-2)
3286 ("libxtst" ,libxtst)
3287 ("libxt" ,libxt)
3288 ("mesa" ,mesa)
3289 ("glu" ,glu)))
3290 (native-inputs
3291 `(("pkg-config" ,pkg-config)
3292 ("unzip" ,unzip)))
3293 (home-page "https://www.eclipse.org/swt/")
3294 (synopsis "Widget toolkit for Java")
3295 (description
3296 "SWT is a widget toolkit for Java designed to provide efficient, portable
3297access to the user-interface facilities of the operating systems on which it
3298is implemented.")
3299 ;; SWT code is licensed under EPL1.0
3300 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3301 ;; Cairo bindings contain code under MPL1.1
3302 ;; XULRunner 1.9 bindings contain code under MPL2.0
3303 (license (list
3304 license:epl1.0
3305 license:mpl1.1
3306 license:mpl2.0
3307 license:lgpl2.1+))))
3308
3309(define-public java-xz
3310 (package
3311 (name "java-xz")
3312 (version "1.6")
3313 (source (origin
3314 (method url-fetch)
3315 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3316 (sha256
3317 (base32
3318 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3319 (build-system ant-build-system)
3320 (arguments
3321 `(#:tests? #f ; There are no tests to run.
3322 #:jar-name ,(string-append "xz-" version ".jar")
3323 #:phases
3324 (modify-phases %standard-phases
3325 ;; The unpack phase enters the "maven" directory by accident.
3326 (add-after 'unpack 'chdir
3327 (lambda _ (chdir "..") #t)))))
3328 (native-inputs
3329 `(("unzip" ,unzip)))
3330 (home-page "https://tukaani.org/xz/java.html")
3331 (synopsis "Implementation of XZ data compression in pure Java")
3332 (description "This library aims to be a complete implementation of XZ data
3333compression in pure Java. Single-threaded streamed compression and
3334decompression and random access decompression have been fully implemented.")
3335 (license license:public-domain)))
3336
3337;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3338;; of the latest release.
3339(define-public java-qdox-1.12
3340 (package
3341 (name "java-qdox")
3342 (version "1.12.1")
3343 (source (origin
3344 (method url-fetch)
3345 (uri (string-append "https://repo1.maven.org/maven2/"
3346 "com/thoughtworks/qdox/qdox/" version
3347 "/qdox-" version "-sources.jar"))
3348 (sha256
3349 (base32
3350 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3351 (build-system ant-build-system)
3352 (arguments
3353 `(;; Tests require junit
3354 #:tests? #f
3355 #:jar-name "qdox.jar"
3356 #:phases
3357 (modify-phases %standard-phases
3358 (replace 'unpack
3359 (lambda* (#:key source #:allow-other-keys)
3360 (mkdir "src")
3361 (with-directory-excursion "src"
3362 (invoke "jar" "-xf" source))))
3363 ;; At this point we don't have junit, so we must remove the API
3364 ;; tests.
3365 (add-after 'unpack 'delete-tests
3366 (lambda _
3367 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3368 #t)))))
3369 (home-page "https://github.com/codehaus/qdox")
3370 (synopsis "Parse definitions from Java source files")
3371 (description
3372 "QDox is a high speed, small footprint parser for extracting
3373class/interface/method definitions from source files complete with JavaDoc
3374@code{@@tags}. It is designed to be used by active code generators or
3375documentation tools.")
3376 (license license:asl2.0)))
3377
3378(define-public java-qdox
3379 (package
3380 (name "java-qdox")
3381 ; Newer version exists, but this version is required by java-plexus-component-metadata
3382 (version "2.0-M2")
3383 (source (origin
3384 (method url-fetch)
3385 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3386 ;; Older releases at https://github.com/codehaus/qdox/
3387 ;; Note: The release at maven is pre-generated. The release at
3388 ;; github requires jflex.
3389 (uri (string-append "https://repo1.maven.org/maven2/"
3390 "com/thoughtworks/qdox/qdox/" version
3391 "/qdox-" version "-sources.jar"))
3392 (sha256
3393 (base32
3394 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3395 (build-system ant-build-system)
3396 (arguments
3397 `(#:jar-name "qdox.jar"
3398 #:tests? #f)); no tests
3399 (home-page "https://github.com/codehaus/qdox")
3400 (synopsis "Parse definitions from Java source files")
3401 (description "QDox is a high speed, small footprint parser for extracting
3402class/interface/method definitions from source files complete with JavaDoc
3403@code{@@tags}. It is designed to be used by active code generators or
3404documentation tools.")
3405 (license license:asl2.0)))
3406
3407(define-public java-jarjar
3408 (package
3409 (name "java-jarjar")
3410 (version "1.4")
3411 (source (origin
3412 (method url-fetch)
3413 (uri (string-append
3414 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3415 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3416 (sha256
3417 (base32
3418 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3419 (modules '((guix build utils)))
3420 (snippet
3421 '(begin
3422 ;; Delete bundled thirds-party jar archives.
3423 ;; TODO: unbundle maven-plugin-api.
3424 (delete-file "lib/asm-4.0.jar")
3425 (delete-file "lib/asm-commons-4.0.jar")
3426 (delete-file "lib/junit-4.8.1.jar")
3427 #t))))
3428 (build-system ant-build-system)
3429 (arguments
3430 `(;; Tests require junit, which ultimately depends on this package.
3431 #:tests? #f
3432 #:build-target "jar"
3433 #:phases
3434 (modify-phases %standard-phases
3435 (add-before 'build 'do-not-use-bundled-asm
3436 (lambda* (#:key inputs #:allow-other-keys)
3437 (substitute* "build.xml"
3438 (("<path id=\"path.build\">")
3439 (string-append "<path id=\"path.build\"><fileset dir=\""
3440 (assoc-ref inputs "java-asm-bootstrap")
3441 "/share/java\" includes=\"**/*.jar\"/>"))
3442 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3443 (("lib/asm-commons-4.0.jar")
3444 (string-append (assoc-ref inputs "java-asm-bootstrap")
3445 "/share/java/asm-6.0.jar"))
3446 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3447 (string-append "<include name=\"org/objectweb/asm/"
3448 "commons/Remap*.class\"/>"
3449 "<include name=\"org/objectweb/asm/*.class\"/>"
3450 "<include name=\"org/objectweb/asm/"
3451 "signature/*.class\"/>"
3452 "<include name=\"org/objectweb/asm/"
3453 "commons/SignatureRemapper.class\"/>")))
3454 #t))
3455 (replace 'install
3456 (lambda* (#:key outputs #:allow-other-keys)
3457 (let ((target (string-append (assoc-ref outputs "out")
3458 "/share/java")))
3459 (install-file (string-append "dist/jarjar-" ,version ".jar")
3460 target))
3461 #t)))))
3462 (inputs
3463 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3464 (native-inputs
3465 `(("unzip" ,unzip)))
3466 (home-page "https://code.google.com/archive/p/jarjar/")
3467 (synopsis "Repackage Java libraries")
3468 (description
3469 "Jar Jar Links is a utility that makes it easy to repackage Java
3470libraries and embed them into your own distribution. Jar Jar Links includes
3471an Ant task that extends the built-in @code{jar} task.")
3472 (license license:asl2.0)))
3473
3474(define-public java-hamcrest-core
3475 (package
3476 (name "java-hamcrest-core")
3477 (version "1.3")
3478 (source (origin
3479 (method git-fetch)
3480 (uri (git-reference
3481 (url "https://github.com/hamcrest/JavaHamcrest/")
3482 (commit (string-append "hamcrest-java-" version))))
3483 (file-name (git-file-name name version))
3484 (sha256
3485 (base32
3486 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3487 (modules '((guix build utils)))
3488 (snippet
3489 '(begin
3490 ;; Delete bundled thirds-party jar archives.
3491 (delete-file-recursively "lib")
3492 #t))))
3493 (build-system ant-build-system)
3494 (arguments
3495 `(#:tests? #f ; Tests require junit
3496 #:modules ((guix build ant-build-system)
3497 (guix build utils)
3498 (srfi srfi-1))
3499 #:make-flags (list (string-append "-Dversion=" ,version))
3500 #:test-target "unit-test"
3501 #:build-target "core"
3502 #:phases
3503 (modify-phases %standard-phases
3504 ;; Disable unit tests, because they require junit, which requires
3505 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3506 ;; attribute from the manifest for reproducibility.
3507 (add-before 'configure 'patch-build.xml
3508 (lambda _
3509 (substitute* "build.xml"
3510 (("unit-test, ") "")
3511 (("\\$\\{build.timestamp\\}") "guix"))
3512 #t))
3513 ;; Java's "getMethods()" returns methods in an unpredictable order.
3514 ;; To make the output of the generated code deterministic we must
3515 ;; sort the array of methods.
3516 (add-after 'unpack 'make-method-order-deterministic
3517 (lambda _
3518 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3519 (("import java\\.util\\.Iterator;" line)
3520 (string-append line "\n"
3521 "import java.util.Arrays; import java.util.Comparator;"))
3522 (("allMethods = cls\\.getMethods\\(\\);" line)
3523 (string-append "_" line
3524 "
3525private Method[] getSortedMethods() {
3526 Arrays.sort(_allMethods, new Comparator<Method>() {
3527 @Override
3528 public int compare(Method a, Method b) {
3529 return a.toString().compareTo(b.toString());
3530 }
3531 });
3532 return _allMethods;
3533}
3534
3535private Method[] allMethods = getSortedMethods();")))
3536 #t))
3537 (add-before 'build 'do-not-use-bundled-qdox
3538 (lambda* (#:key inputs #:allow-other-keys)
3539 (substitute* "build.xml"
3540 (("lib/generator/qdox-1.12.jar")
3541 (string-append (assoc-ref inputs "java-qdox-1.12")
3542 "/share/java/qdox.jar")))
3543 #t))
3544 ;; build.xml searches for .jar files in this directoy, which
3545 ;; we remove from the source archive.
3546 (add-before 'build 'create-dummy-directories
3547 (lambda _
3548 (mkdir-p "lib/integration")
3549 #t))
3550 (replace 'install
3551 (lambda* (#:key outputs #:allow-other-keys)
3552 (let* ((target (string-append (assoc-ref outputs "out")
3553 "/share/java/"))
3554 (version-suffix ,(string-append "-" version ".jar"))
3555 (install-without-version-suffix
3556 (lambda (jar)
3557 (copy-file jar
3558 (string-append target
3559 (basename jar version-suffix)
3560 ".jar")))))
3561 (mkdir-p target)
3562 (for-each
3563 install-without-version-suffix
3564 (find-files "build"
3565 (lambda (name _)
3566 (and (string-suffix? ".jar" name)
3567 (not (string-suffix? "-sources.jar" name)))))))
3568 #t)))))
3569 (native-inputs
3570 `(("java-qdox-1.12" ,java-qdox-1.12)
3571 ("java-jarjar" ,java-jarjar)))
3572 (home-page "http://hamcrest.org/")
3573 (synopsis "Library of matchers for building test expressions")
3574 (description
3575 "This package provides a library of matcher objects (also known as
3576constraints or predicates) allowing @code{match} rules to be defined
3577declaratively, to be used in other frameworks. Typical scenarios include
3578testing frameworks, mocking libraries and UI validation rules.")
3579 (license license:bsd-2)))
3580
3581(define-public java-junit
3582 (package
3583 (name "java-junit")
3584 (version "4.12")
3585 (source (origin
3586 (method git-fetch)
3587 (uri (git-reference
3588 (url "https://github.com/junit-team/junit/")
3589 (commit (string-append "r" version))))
3590 (file-name (git-file-name name version))
3591 (sha256
3592 (base32
3593 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3594 (modules '((guix build utils)))
3595 (snippet
3596 '(begin
3597 ;; Delete bundled jar archives.
3598 (delete-file-recursively "lib")
3599 #t))))
3600 (build-system ant-build-system)
3601 (arguments
3602 `(#:tests? #f ; no tests
3603 #:jar-name "junit.jar"))
3604 (inputs
3605 `(("java-hamcrest-core" ,java-hamcrest-core)))
3606 (home-page "https://junit.org/junit4/")
3607 (synopsis "Test framework for Java")
3608 (description
3609 "JUnit is a simple framework to write repeatable tests for Java projects.
3610JUnit provides assertions for testing expected results, test fixtures for
3611sharing common test data, and test runners for running tests.")
3612 (license license:epl1.0)))
3613
3614(define-public java-plexus-utils
3615 (package
3616 (name "java-plexus-utils")
3617 (version "3.2.0")
3618 (source (origin
3619 (method git-fetch)
3620 (uri (git-reference
3621 (url "https://github.com/codehaus-plexus/plexus-utils")
3622 (commit (string-append "plexus-utils-" version))))
3623 (file-name (git-file-name name version))
3624 (sha256
3625 (base32
3626 "1mlx7xrq7lgqjqcpg7y4hi1ghavf28vvk3har82037dqx61n0f15"))))
3627 (build-system ant-build-system)
3628 ;; FIXME: The default build.xml does not include a target to install
3629 ;; javadoc files.
3630 (arguments
3631 `(#:jar-name "plexus-utils.jar"
3632 #:source-dir "src/main"
3633 #:phases
3634 (modify-phases %standard-phases
3635 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3636 (lambda _
3637 (substitute* "src/main/java/org/codehaus/plexus/util/\
3638cli/shell/BourneShell.java"
3639 (("/bin/sh") (which "sh"))
3640 (("/usr/") (getcwd)))
3641 #t))
3642 (add-after 'unpack 'fix-or-disable-broken-tests
3643 (lambda _
3644 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3645 (substitute* '("cli/CommandlineTest.java"
3646 "cli/shell/BourneShellTest.java")
3647 (("/bin/sh") (which "sh"))
3648 (("/bin/echo") (which "echo")))
3649
3650 ;; This test depends on MavenProjectStub, but we don't have
3651 ;; a package for Maven.
3652 (delete-file "introspection/ReflectionValueExtractorTest.java")
3653
3654 ;; FIXME: The command line tests fail, maybe because they use
3655 ;; absolute paths.
3656 (delete-file "cli/CommandlineTest.java"))
3657 #t)))))
3658 (native-inputs
3659 `(("java-hamcrest-core" ,java-hamcrest-core)
3660 ("java-junit" ,java-junit)))
3661 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3662 (synopsis "Common utilities for the Plexus framework")
3663 (description "This package provides various Java utility classes for the
3664Plexus framework to ease working with strings, files, command lines, XML and
3665more.")
3666 (license license:asl2.0)))
3667
3668(define-public java-plexus-interpolation
3669 (package
3670 (name "java-plexus-interpolation")
3671 (version "1.23")
3672 (source (origin
3673 (method git-fetch)
3674 (uri (git-reference
3675 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3676 (commit (string-append "plexus-interpolation-" version))))
3677 (file-name (git-file-name name version))
3678 (sha256
3679 (base32
3680 "005hxxg1adv71a96lz4vp65bk3v1pi76j4c45z29xzizclib16vl"))))
3681 (build-system ant-build-system)
3682 (arguments
3683 `(#:jar-name "plexus-interpolation.jar"
3684 #:source-dir "src/main"))
3685 (native-inputs
3686 `(("java-junit" ,java-junit)
3687 ("java-hamcrest-core" ,java-hamcrest-core)))
3688 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3689 (synopsis "Java components for interpolating ${} strings and the like")
3690 (description "Plexus interpolator is a modular, flexible interpolation
3691framework for the expression language style commonly seen in Maven, Plexus,
3692and other related projects.
3693
3694It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3695package within @code{plexus-utils}, but has been separated in order to allow
3696these two libraries to vary independently of one another.")
3697 (license license:asl2.0)))
3698
3699(define-public java-plexus-classworlds
3700 (package
3701 (name "java-plexus-classworlds")
3702 (version "2.5.2")
3703 (source (origin
3704 (method git-fetch)
3705 (uri (git-reference
3706 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3707 (commit (string-append "plexus-classworlds-" version))))
3708 (file-name (git-file-name name version))
3709 (sha256
3710 (base32
3711 "1iv8x55fbni2hg4l7pdpbwfq75xmvq1f25g6nxma8rcdpihsh13r"))))
3712 (build-system ant-build-system)
3713 (arguments
3714 `(#:jar-name "plexus-classworlds.jar"
3715 #:source-dir "src/main"
3716 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3717 (native-inputs
3718 `(("java-junit" ,java-junit)))
3719 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3720 (synopsis "Java class loader framework")
3721 (description "Plexus classworlds replaces the native @code{ClassLoader}
3722mechanism of Java. It is especially useful for dynamic loading of application
3723components.")
3724 (license license:asl2.0)))
3725
3726(define java-plexus-container-default-bootstrap
3727 (package
3728 (name "java-plexus-container-default-bootstrap")
3729 (version "1.7.1")
3730 (source (origin
3731 (method git-fetch)
3732 (uri (git-reference
3733 (url "https://github.com/codehaus-plexus/plexus-containers")
3734 (commit (string-append "plexus-containers-" version))))
3735 (file-name (git-file-name name version))
3736 (sha256
3737 (base32
3738 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
3739 (build-system ant-build-system)
3740 (arguments
3741 `(#:jar-name "container-default.jar"
3742 #:source-dir "plexus-container-default/src/main/java"
3743 #:test-dir "plexus-container-default/src/test"
3744 #:jdk ,icedtea-8
3745 #:tests? #f; requires plexus-archiver, which depends on this package
3746 #:phases
3747 (modify-phases %standard-phases
3748 (add-before 'build 'copy-resources
3749 (lambda _
3750 (copy-recursively
3751 "plexus-container-default/src/main/resources/"
3752 "build/classes")
3753 #t)))))
3754 (inputs
3755 `(("worldclass" ,java-plexus-classworlds)
3756 ("xbean" ,java-geronimo-xbean-reflect)
3757 ("utils" ,java-plexus-utils)
3758 ("junit" ,java-junit)
3759 ("guava" ,java-guava)))
3760 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3761 (synopsis "Inversion-of-control container")
3762 (description "Plexus-default-container is Plexus' inversion-of-control
3763(@dfn{IoC}) container. It is composed of its public API and its default
3764implementation.")
3765 (license license:asl2.0)))
3766
3767(define-public java-plexus-io
3768 (package
3769 (name "java-plexus-io")
3770 (version "3.0.0")
3771 (source (origin
3772 (method git-fetch)
3773 (uri (git-reference
3774 (url "https://github.com/codehaus-plexus/plexus-io")
3775 (commit (string-append "plexus-io-" version))))
3776 (file-name (git-file-name name version))
3777 (sha256
3778 (base32
3779 "1h4q9l2j9sfbscvxpnyy2hazi0r83h3am86y4r959wrl1b24xxwd"))))
3780 (build-system ant-build-system)
3781 (arguments
3782 `(#:jar-name "plexus-io.jar"
3783 #:source-dir "src/main/java"
3784 #:test-dir "src/test"
3785 #:jdk ,icedtea-8
3786 #:phases
3787 (modify-phases %standard-phases
3788 (add-before 'build 'copy-resources
3789 (lambda _
3790 (mkdir-p "build/classes/META-INF/plexus")
3791 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3792 "build/classes/META-INF/plexus/components.xml")
3793 #t)))))
3794 (inputs
3795 `(("utils" ,java-plexus-utils)
3796 ("commons-io" ,java-commons-io)
3797 ("java-jsr305" ,java-jsr305)))
3798 (native-inputs
3799 `(("junit" ,java-junit)
3800 ("hamcrest" ,java-hamcrest-core)
3801 ("guava" ,java-guava)
3802 ("classworlds" ,java-plexus-classworlds)
3803 ("xbean" ,java-geronimo-xbean-reflect)
3804 ("container-default" ,java-plexus-container-default-bootstrap)))
3805 (home-page "https://github.com/codehaus-plexus/plexus-io")
3806 (synopsis "I/O plexus components")
3807 (description "Plexus IO is a set of plexus components, which are designed
3808for use in I/O operations. This implementation using plexus components allows
3809reusing it in maven.")
3810 (license license:asl2.0)))
3811
3812(define-public java-plexus-archiver
3813 (package
3814 (name "java-plexus-archiver")
3815 (version "4.1.0")
3816 (source (origin
3817 (method url-fetch)
3818 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3819 "/archive/plexus-archiver-" version ".tar.gz"))
3820 (sha256
3821 (base32
3822 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3823 (build-system ant-build-system)
3824 (arguments
3825 `(#:jar-name "plexus-archiver.jar"
3826 #:source-dir "src/main/java"
3827 #:jdk ,icedtea-8
3828 #:test-dir "src/test"
3829 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3830 #:phases
3831 (modify-phases %standard-phases
3832 (add-before 'check 'remove-failing
3833 (lambda _
3834 ;; Requires an older version of plexus container
3835 (delete-file
3836 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3837 #t))
3838 (add-before 'check 'fix-test-building
3839 (lambda _
3840 (substitute* "build.xml"
3841 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3842 #t))
3843 (add-before 'build 'copy-resources
3844 (lambda _
3845 (mkdir-p "build/classes/META-INF/plexus")
3846 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3847 "build/classes/META-INF/plexus/components.xml")
3848 #t)))))
3849 (inputs
3850 `(("utils" ,java-plexus-utils)
3851 ("commons-io" ,java-commons-io)
3852 ("snappy" ,java-iq80-snappy)
3853 ("io" ,java-plexus-io)
3854 ("compress" ,java-commons-compress)
3855 ("container-default" ,java-plexus-container-default-bootstrap)
3856 ("snappy" ,java-snappy)
3857 ("java-jsr305" ,java-jsr305)))
3858 (native-inputs
3859 `(("java-hamcrest-core" ,java-hamcrest-core)
3860 ("junit" ,java-junit)
3861 ("classworld" ,java-plexus-classworlds)
3862 ("xbean" ,java-geronimo-xbean-reflect)
3863 ("xz" ,java-tukaani-xz)
3864 ("guava" ,java-guava)))
3865 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3866 (synopsis "Archiver component of the Plexus project")
3867 (description "Plexus-archiver contains a component to deal with project
3868archives (jar).")
3869 (license license:asl2.0)))
3870
3871(define-public java-plexus-container-default
3872 (package
3873 (inherit java-plexus-container-default-bootstrap)
3874 (name "java-plexus-container-default")
3875 (arguments
3876 `(#:jar-name "container-default.jar"
3877 #:source-dir "plexus-container-default/src/main/java"
3878 #:test-dir "plexus-container-default/src/test"
3879 #:test-exclude (list ;"**/*Test.java"
3880 "**/Abstract*.java"
3881 ;; Requires plexus-hierarchy
3882 "**/PlexusHierarchyTest.java"
3883 ;; Failures
3884 "**/ComponentRealmCompositionTest.java"
3885 "**/PlexusContainerTest.java")
3886 #:jdk ,icedtea-8
3887 #:phases
3888 (modify-phases %standard-phases
3889 (add-before 'build 'copy-resources
3890 (lambda _
3891 (copy-recursively
3892 "plexus-container-default/src/main/resources/"
3893 "build/classes")
3894 #t))
3895 (add-before 'check 'fix-paths
3896 (lambda _
3897 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3898 (substitute*
3899 (string-append
3900 dir "/plexus/component/composition/"
3901 "ComponentRealmCompositionTest.java")
3902 (("src/test") "plexus-container-default/src/test"))
3903 #t))))))
3904 (inputs
3905 `(("worldclass" ,java-plexus-classworlds)
3906 ("xbean" ,java-geronimo-xbean-reflect)
3907 ("utils" ,java-plexus-utils)
3908 ("junit" ,java-junit)
3909 ("guava" ,java-guava)))
3910 (native-inputs
3911 `(("archiver" ,java-plexus-archiver)
3912 ("hamcrest" ,java-hamcrest-core)))))
3913
3914(define-public java-plexus-component-annotations
3915 (package
3916 (inherit java-plexus-container-default)
3917 (name "java-plexus-component-annotations")
3918 (arguments
3919 `(#:jar-name "plexus-component-annotations.jar"
3920 #:source-dir "plexus-component-annotations/src/main/java"
3921 #:tests? #f)); no tests
3922 (inputs '())
3923 (native-inputs '())
3924 (synopsis "Plexus descriptors generator")
3925 (description "This package is a Maven plugin to generate Plexus descriptors
3926from source tags and class annotations.")))
3927
3928(define-public java-plexus-cipher
3929 (package
3930 (name "java-plexus-cipher")
3931 (version "1.7")
3932 (source (origin
3933 (method git-fetch)
3934 (uri (git-reference
3935 (url "https://github.com/codehaus-plexus/plexus-cipher")
3936 (commit (string-append "plexus-cipher-" version))))
3937 (file-name (git-file-name name version))
3938 (sha256
3939 (base32
3940 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
3941 (build-system ant-build-system)
3942 (arguments
3943 `(#:jar-name "plexus-cipher.jar"
3944 #:source-dir "src/main/java"
3945 #:jdk ,icedtea-8
3946 #:tests? #f; FIXME: requires sisu-inject-bean
3947 #:phases
3948 (modify-phases %standard-phases
3949 (add-before 'build 'copy-resources
3950 (lambda _
3951 (copy-recursively "src/main/resources" "build/classes")
3952 (mkdir-p "build/classes/META-INF/sisu")
3953 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3954 (lambda _
3955 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3956 #t)))))
3957 (inputs
3958 `(("java-cdi-api" ,java-cdi-api)
3959 ("java-javax-inject" ,java-javax-inject)))
3960 (home-page "https://github.com/sonatype/plexus-cipher")
3961 (synopsis "Encryption/decryption Component")
3962 (description "Plexus-cipher contains a component to deal with encryption
3963and decryption.")
3964 (license license:asl2.0)))
3965
3966(define-public java-plexus-compiler-api
3967 (package
3968 (name "java-plexus-compiler-api")
3969 (version "2.8.4")
3970 (source (origin
3971 (method git-fetch)
3972 (uri (git-reference
3973 (url "https://github.com/codehaus-plexus/plexus-compiler")
3974 (commit (string-append "plexus-compiler-" version))))
3975 (file-name (git-file-name name version))
3976 (sha256
3977 (base32
3978 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
3979 (build-system ant-build-system)
3980 (arguments
3981 `(#:jar-name "plexus-compiler-api.jar"
3982 #:source-dir "plexus-compiler-api/src/main/java"
3983 #:jdk ,icedtea-8
3984 #:test-dir "plexus-compiler-api/src/test"))
3985 (inputs
3986 `(("java-plexus-container-default" ,java-plexus-container-default)
3987 ("java-plexus-util" ,java-plexus-utils)))
3988 (native-inputs
3989 `(("java-junit" ,java-junit)))
3990 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3991 (synopsis "Plexus Compilers component's API to manipulate compilers")
3992 (description "This package contains the API used by components to manipulate
3993compilers.")
3994 (license (list license:asl2.0
3995 license:expat))))
3996
3997(define-public java-plexus-compiler-javac
3998 (package
3999 (inherit java-plexus-compiler-api)
4000 (name "java-plexus-compiler-javac")
4001 (arguments
4002 `(#:jar-name "plexus-compiler-javac.jar"
4003 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4004 #:jdk ,icedtea-8
4005 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4006 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
4007 (inputs
4008 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4009 ("java-plexus-utils" ,java-plexus-utils)
4010 ("java-plexus-container-default" ,java-plexus-container-default)))
4011 (native-inputs
4012 `(("java-junit" ,java-junit)))
4013 (synopsis "Javac Compiler support for Plexus Compiler component")
4014 (description "This package contains the Javac Compiler support for Plexus
4015Compiler component.")))
4016
4017(define-public java-plexus-sec-dispatcher
4018 (package
4019 (name "java-plexus-sec-dispatcher")
4020 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4021 (source (origin
4022 ;; This project doesn't tag releases or publish tarballs, so we take
4023 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4024 (method git-fetch)
4025 (uri (git-reference
4026 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4027 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4028 (sha256
4029 (base32
4030 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4031 (file-name (git-file-name name version))))
4032 (arguments
4033 `(#:jar-name "plexus-sec-dispatcher.jar"
4034 #:source-dir "src/main/java"
4035 #:jdk ,icedtea-8
4036 #:phases
4037 (modify-phases %standard-phases
4038 (add-before 'build 'generate-models
4039 (lambda* (#:key inputs #:allow-other-keys)
4040 (define (modello-single-mode file version mode)
4041 (invoke "java"
4042 "org.codehaus.modello.ModelloCli"
4043 file mode "src/main/java" version
4044 "false" "true"))
4045 (let ((file "src/main/mdo/settings-security.mdo"))
4046 (modello-single-mode file "1.0.0" "java")
4047 (modello-single-mode file "1.0.0" "xpp3-reader")
4048 (modello-single-mode file "1.0.0" "xpp3-writer"))
4049 #t))
4050 (add-before 'build 'generate-components.xml
4051 (lambda _
4052 (mkdir-p "build/classes/META-INF/plexus")
4053 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4054 (lambda _
4055 (display
4056 "<component-set>\n
4057 <components>\n
4058 <component>\n
4059 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4060 <role-hint>default</role-hint>\n
4061 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4062 <description></description>\n
4063 <requirements>\n
4064 <requirement>\n
4065 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4066 <field-name>_cipher</field-name>\n
4067 </requirement>\n
4068 <requirement>\n
4069 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4070 <field-name>_decryptors</field-name>\n
4071 </requirement>\n
4072 </requirements>\n
4073 <configuration>\n
4074 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4075 </configuration>\n
4076 </component>\n
4077 </components>\n
4078</component-set>\n")))
4079 #t))
4080 (add-before 'check 'fix-paths
4081 (lambda _
4082 (copy-recursively "src/test/resources" "target")
4083 #t)))))
4084 (inputs
4085 `(("java-plexus-cipher" ,java-plexus-cipher)))
4086 (native-inputs
4087 `(("java-modello-core" ,java-modello-core)
4088 ;; for modello:
4089 ("java-plexus-container-default" ,java-plexus-container-default)
4090 ("java-plexus-classworlds" ,java-plexus-classworlds)
4091 ("java-plexus-utils" ,java-plexus-utils)
4092 ("java-guava" ,java-guava)
4093 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4094 ("java-sisu-build-api" ,java-sisu-build-api)
4095 ;; modello plugins:
4096 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4097 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4098 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4099 ;; for tests
4100 ("java-junit" ,java-junit)))
4101 (build-system ant-build-system)
4102 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4103 (synopsis "Plexus Security Dispatcher Component")
4104 (description "This package is the Plexus Security Dispatcher Component.
4105This component decrypts a string passed to it.")
4106 (license license:asl2.0)))
4107
4108(define-public java-plexus-cli
4109 (package
4110 (name "java-plexus-cli")
4111 (version "1.7")
4112 (source (origin
4113 (method git-fetch)
4114 (uri (git-reference
4115 (url "https://github.com/sonatype/plexus-cli")
4116 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4117 (file-name (string-append name "-" version))
4118 (sha256
4119 (base32
4120 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4121 (build-system ant-build-system)
4122 (arguments
4123 `(#:jar-name "plexus-cli.jar"
4124 #:source-dir "src/main/java"
4125 #:jdk ,icedtea-8
4126 #:test-dir "src/test"))
4127 (inputs
4128 `(("java-commons-cli" ,java-commons-cli)
4129 ("java-plexus-container-default" ,java-plexus-container-default)
4130 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4131 (native-inputs
4132 `(("java-plexus-utils" ,java-plexus-utils)
4133 ("java-junit" ,java-junit)
4134 ("java-guava" ,java-guava)))
4135 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4136 (synopsis "CLI building library for plexus")
4137 (description "This package is a library to help creating CLI around
4138Plexus components.")
4139 (license license:asl2.0)))
4140
4141(define-public java-sisu-build-api
4142 (package
4143 (name "java-sisu-build-api")
4144 (version "0.0.7")
4145 (source (origin
4146 (method git-fetch)
4147 (uri (git-reference
4148 (url "https://github.com/sonatype/sisu-build-api")
4149 (commit (string-append "plexus-build-api-" version))))
4150 (file-name (git-file-name name version))
4151 (sha256
4152 (base32
4153 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4154 (build-system ant-build-system)
4155 (arguments
4156 `(#:jar-name "sisu-build-api.jar"
4157 #:source-dir "src/main/java"
4158 #:jdk ,icedtea-8
4159 #:tests? #f; FIXME: how to run the tests?
4160 #:phases
4161 (modify-phases %standard-phases
4162 (add-before 'build 'copy-resources
4163 (lambda _
4164 (copy-recursively "src/main/resources" "build/classes")
4165 (substitute* (find-files "build/classes")
4166 (("\\$\\{project.version\\}") ,version))
4167 #t))
4168 (add-before 'build 'generate-plexus-compontent
4169 (lambda _
4170 (mkdir-p "build/classes/META-INF/plexus")
4171 ;; This file is required for plexus to inject this package.
4172 ;; FIXME: how is it generated?
4173 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4174 (lambda _
4175 (display
4176 "<component-set>\n
4177 <components>\n
4178 <component>\n
4179 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4180 <role-hint>default</role-hint>\n
4181 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4182 <description>Filesystem based non-incremental build context implementation\n
4183which behaves as if all files were just created.</description>\n
4184 </component>\n
4185 </components>\n
4186</component-set>\n")))
4187 #t)))))
4188 (inputs
4189 `(("java-plexus-utils" ,java-plexus-utils)
4190 ("java-plexus-container-default" ,java-plexus-container-default)))
4191 (home-page "https://github.com/sonatype/sisu-build-api/")
4192 (synopsis "Base build API for maven")
4193 (description "This package contains the base build API for maven and
4194a default implementation of it. This API is about scanning files in a
4195project and determining what files need to be rebuilt.")
4196 (license license:asl2.0)))
4197
4198(define-public java-modello-core
4199 (package
4200 (name "java-modello-core")
4201 (version "1.9.1")
4202 (source (origin
4203 (method git-fetch)
4204 (uri (git-reference
4205 (url "https://github.com/codehaus-plexus/modello")
4206 (commit (string-append "modello-" version))))
4207 (file-name (git-file-name name version))
4208 (sha256
4209 (base32
4210 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4211 (build-system ant-build-system)
4212 (arguments
4213 `(#:jar-name "modello-core.jar"
4214 #:source-dir "modello-core/src/main/java"
4215 #:test-dir "modello-core/src/test"
4216 #:main-class "org.codehaus.modello.ModelloCli"
4217 #:jdk ,icedtea-8
4218 #:phases
4219 (modify-phases %standard-phases
4220 (add-before 'build 'copy-resources
4221 (lambda _
4222 (mkdir-p "build/classes/META-INF/plexus")
4223 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4224 "build/classes/META-INF/plexus/components.xml")
4225 #t))
4226 (add-before 'check 'fix-tests
4227 (lambda _
4228 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4229 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4230 "modello/core/io/ModelReaderTest.java")
4231 (("src/test") "modello-core/src/test")))
4232 #t)))))
4233 (inputs
4234 `(("java-plexus-utils" ,java-plexus-utils)
4235 ("java-plexus-container-default" ,java-plexus-container-default)
4236 ("java-sisu-build-api" ,java-sisu-build-api)))
4237 (native-inputs
4238 `(("java-junit" ,java-junit)
4239 ("java-plexus-classworlds" ,java-plexus-classworlds)
4240 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4241 ("java-guava" ,java-guava)))
4242 (home-page "https://codehaus-plexus.github.io/modello/")
4243 (synopsis "Framework for code generation from a simple model")
4244 (description "Modello is a framework for code generation from a simple model.
4245
4246Modello generates code from a simple model format: based on a plugin
4247architecture, various types of code and descriptors can be generated from the
4248single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4249XSD and documentation.")
4250 (license (list
4251 license:expat
4252 ;; Although this package uses only files licensed under expat,
4253 ;; other parts of the source are licensed under different
4254 ;; licenses. We include them to be inherited by other packages.
4255 license:asl2.0
4256 ;; Some files in modello-plugin-java are licensed under a
4257 ;; 5-clause BSD license.
4258 (license:non-copyleft
4259 (string-append "file:///modello-plugins/modello-plugin-java/"
4260 "src/main/java/org/codehaus/modello/plugin/"
4261 "java/javasource/JNaming.java"))))))
4262
4263(define-public java-modello-plugins-java
4264 (package
4265 (inherit java-modello-core)
4266 (name "java-modello-plugins-java")
4267 (arguments
4268 `(#:jar-name "modello-plugins-java.jar"
4269 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4270 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4271 #:jdk ,icedtea-8
4272 #:tests? #f; requires maven-model, which depends on this package
4273 #:phases
4274 (modify-phases %standard-phases
4275 (add-before 'build 'copy-resources
4276 (lambda _
4277 (mkdir-p "build/classes")
4278 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4279 "build/classes")
4280 #t)))))
4281 (inputs
4282 `(("java-modello-core" ,java-modello-core)
4283 ,@(package-inputs java-modello-core)))
4284 (synopsis "Modello Java Plugin")
4285 (description "Modello Java Plugin generates Java objects for the model.")))
4286
4287(define-public java-modello-plugins-xml
4288 (package
4289 (inherit java-modello-core)
4290 (name "java-modello-plugins-xml")
4291 (arguments
4292 `(#:jar-name "modello-plugins-xml.jar"
4293 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4294 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4295 #:jdk ,icedtea-8
4296 #:phases
4297 (modify-phases %standard-phases
4298 (add-before 'build 'copy-resources
4299 (lambda _
4300 (mkdir-p "build/classes")
4301 (copy-recursively
4302 "modello-plugins/modello-plugin-xml/src/main/resources"
4303 "build/classes")
4304 #t))
4305 (add-before 'check 'fix-paths
4306 (lambda _
4307 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4308 (substitute*
4309 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4310 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4311 #t)))))
4312 (inputs
4313 `(("java-modello-core" ,java-modello-core)
4314 ("java-modello-plugins-java" ,java-modello-plugins-java)
4315 ,@(package-inputs java-modello-core)))
4316 (synopsis "Modello XML Plugin")
4317 (description "Modello XML Plugin contains shared code for every plugins
4318working on XML representation of the model.")))
4319
4320(define-public java-modello-test
4321 (package
4322 (inherit java-modello-core)
4323 (name "java-modello-test")
4324 (arguments
4325 `(#:jar-name "modello-test.jar"
4326 #:source-dir "modello-test/src/main/java"
4327 #:tests? #f; no tests
4328 #:jdk ,icedtea-8))
4329 (inputs
4330 `(("java-plexus-utils" ,java-plexus-utils)
4331 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4332 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4333 ("java-plexus-container-default" ,java-plexus-container-default)))
4334 (synopsis "Modello test package")
4335 (description "The modello test package contains the basis to create
4336Modello generator unit-tests, including sample models and xml files to test
4337every feature for every plugin.")))
4338
4339(define-public java-modello-plugins-xpp3
4340 (package
4341 (inherit java-modello-core)
4342 (name "java-modello-plugins-xpp3")
4343 (arguments
4344 `(#:jar-name "modello-plugins-xpp3.jar"
4345 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4346 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4347 ;; One of the test dependencies is maven-model which depends on this package.
4348 #:tests? #f
4349 #:jdk ,icedtea-8
4350 #:phases
4351 (modify-phases %standard-phases
4352 (add-before 'build 'copy-resources
4353 (lambda _
4354 (mkdir-p "build/classes")
4355 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4356 "build/classes")
4357 #t)))))
4358 (inputs
4359 `(("java-modello-core" ,java-modello-core)
4360 ("java-modello-plugins-java" ,java-modello-plugins-java)
4361 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4362 ,@(package-inputs java-modello-core)))
4363 (native-inputs
4364 `(("java-xmlunit" ,java-xmlunit)
4365 ("java-modello-test" ,java-modello-test)
4366 ,@(package-native-inputs java-modello-core)))
4367 (synopsis "Modello XPP3 Plugin")
4368 (description "The modello XPP3 plugin generates XML readers and writers based
4369on the XPP3 API (XML Pull Parser).")))
4370
4371(define-public java-asm
4372 (package
4373 (name "java-asm")
4374 (version "6.0")
4375 (source (origin
4376 (method url-fetch)
4377 (uri (string-append "https://download.forge.ow2.org/asm/"
4378 "asm-" version ".tar.gz"))
4379 (sha256
4380 (base32
4381 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4382 (build-system ant-build-system)
4383 (propagated-inputs
4384 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4385 ("java-aqute-libg" ,java-aqute-libg)))
4386 (arguments
4387 `(#:build-target "compile"
4388 ;; The tests require an old version of Janino, which no longer compiles
4389 ;; with the JDK7.
4390 #:tests? #f
4391 #:make-flags
4392 (list
4393 ;; We don't need these extra ant tasks, but the build system asks us to
4394 ;; provide a path anyway.
4395 "-Dobjectweb.ant.tasks.path=dummy-path"
4396 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4397 ;; used during the build automatically by ant-build-system, but
4398 ;; java-asm's build.xml fails unless we provide something here.
4399 "-Dbiz.aQute.bnd.path=dummy-path")
4400 #:phases
4401 (modify-phases %standard-phases
4402 (add-before 'install 'build-jars
4403 (lambda* (#:key make-flags #:allow-other-keys)
4404 ;; We cannot use the "jar" target because it depends on a couple
4405 ;; of unpackaged, complicated tools.
4406 (mkdir "dist")
4407 (invoke "jar"
4408 "-cf" (string-append "dist/asm-" ,version ".jar")
4409 "-C" "output/build/tmp" ".")))
4410 (replace 'install
4411 (install-jars "dist")))))
4412 (native-inputs
4413 `(("java-junit" ,java-junit)))
4414 (home-page "https://asm.ow2.io/")
4415 (synopsis "Very small and fast Java bytecode manipulation framework")
4416 (description "ASM is an all purpose Java bytecode manipulation and
4417analysis framework. It can be used to modify existing classes or dynamically
4418generate classes, directly in binary form. The provided common
4419transformations and analysis algorithms allow to easily assemble custom
4420complex transformations and code analysis tools.")
4421 (license license:bsd-3)))
4422
4423(define java-asm-bootstrap
4424 (package
4425 (inherit java-asm)
4426 (name "java-asm-bootstrap")
4427 (arguments
4428 (substitute-keyword-arguments (package-arguments java-asm)
4429 ((#:tests? _) #f)))
4430 (native-inputs `())
4431 (propagated-inputs
4432 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4433 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4434 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4435 (delete `("java-aqute-libg" ,java-aqute-libg)
4436 (package-inputs java-asm)))))))
4437
4438(define-public java-cglib
4439 (package
4440 (name "java-cglib")
4441 (version "3.2.4")
4442 (source
4443 (origin
4444 (method git-fetch)
4445 (uri (git-reference
4446 (url "https://github.com/cglib/cglib.git")
4447 (commit (string-append
4448 "RELEASE_"
4449 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4450 version)))))
4451 (file-name (git-file-name name version))
4452 (sha256
4453 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4454 (build-system ant-build-system)
4455 (arguments
4456 `(;; FIXME: tests fail because junit runs
4457 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4458 ;; to describe a test at all.
4459 #:tests? #f
4460 #:jar-name "cglib.jar"
4461 #:phases
4462 (modify-phases %standard-phases
4463 (add-after 'unpack 'chdir
4464 (lambda _ (chdir "cglib") #t)))))
4465 (inputs
4466 `(("java-asm" ,java-asm)
4467 ("java-junit" ,java-junit)))
4468 (home-page "https://github.com/cglib/cglib/")
4469 (synopsis "Java byte code generation library")
4470 (description "The byte code generation library CGLIB is a high level API
4471to generate and transform Java byte code.")
4472 (license license:asl2.0)))
4473
4474(define-public java-objenesis
4475 (package
4476 (name "java-objenesis")
4477 (version "2.5.1")
4478 (source (origin
4479 (method git-fetch)
4480 (uri (git-reference
4481 (url "https://github.com/easymock/objenesis")
4482 (commit version)))
4483 (file-name (git-file-name name version))
4484 (sha256
4485 (base32
4486 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
4487 (build-system ant-build-system)
4488 (arguments
4489 `(#:jar-name "objenesis.jar"
4490 #:source-dir "main/src/"
4491 #:test-dir "main/src/test/"))
4492 (native-inputs
4493 `(("java-junit" ,java-junit)
4494 ("java-hamcrest-core" ,java-hamcrest-core)))
4495 (home-page "http://objenesis.org/")
4496 (synopsis "Bypass the constructor when creating an object")
4497 (description "Objenesis is a small Java library that serves one purpose:
4498to instantiate a new object of a particular class. It is common to see
4499restrictions in libraries stating that classes must require a default
4500constructor. Objenesis aims to overcome these restrictions by bypassing the
4501constructor on object instantiation.")
4502 (license license:asl2.0)))
4503
4504(define-public java-easymock
4505 (package
4506 (name "java-easymock")
4507 (version "3.4")
4508 (source (origin
4509 (method git-fetch)
4510 (uri (git-reference
4511 (url "https://github.com/easymock/easymock/")
4512 (commit (string-append "easymock-" version))))
4513 (file-name (git-file-name name version))
4514 (sha256
4515 (base32
4516 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
4517 (build-system ant-build-system)
4518 (arguments
4519 `(#:jar-name "easymock.jar"
4520 #:source-dir "core/src/main"
4521 #:test-dir "core/src/test"
4522 #:phases
4523 (modify-phases %standard-phases
4524 ;; FIXME: Android support requires the following packages to be
4525 ;; available: com.google.dexmaker.stock.ProxyBuilder
4526 (add-after 'unpack 'delete-android-support
4527 (lambda _
4528 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4529 (substitute* "MocksControl.java"
4530 (("AndroidSupport.isAndroid\\(\\)") "false")
4531 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4532 (delete-file "AndroidClassProxyFactory.java"))
4533 #t))
4534 (add-after 'unpack 'delete-broken-tests
4535 (lambda _
4536 (with-directory-excursion "core/src/test/java/org/easymock"
4537 ;; This test depends on dexmaker.
4538 (delete-file "tests2/ClassExtensionHelperTest.java")
4539
4540 ;; This is not a test.
4541 (delete-file "tests/BaseEasyMockRunnerTest.java")
4542
4543 ;; This test should be executed with a different runner...
4544 (delete-file "tests2/EasyMockAnnotationsTest.java")
4545 ;; ...but deleting it means that we also have to delete these
4546 ;; dependent files.
4547 (delete-file "tests2/EasyMockRunnerTest.java")
4548 (delete-file "tests2/EasyMockRuleTest.java")
4549
4550 ;; This test fails because the file "easymock.properties" does
4551 ;; not exist.
4552 (delete-file "tests2/EasyMockPropertiesTest.java"))
4553 #t)))))
4554 (inputs
4555 `(("java-asm" ,java-asm)
4556 ("java-cglib" ,java-cglib)
4557 ("java-objenesis" ,java-objenesis)))
4558 (native-inputs
4559 `(("java-junit" ,java-junit)
4560 ("java-hamcrest-core" ,java-hamcrest-core)))
4561 (home-page "https://easymock.org/")
4562 (synopsis "Java library providing mock objects for unit tests")
4563 (description "EasyMock is a Java library that provides an easy way to use
4564mock objects in unit testing.")
4565 (license license:asl2.0)))
4566
4567(define-public java-jmock-1
4568 (package
4569 (name "java-jmock")
4570 (version "1.2.0")
4571 (source (origin
4572 (method git-fetch)
4573 (uri (git-reference
4574 (url "https://github.com/jmock-developers/jmock-library")
4575 (commit version)))
4576 (file-name (git-file-name name version))
4577 (sha256
4578 (base32
4579 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
4580 (build-system ant-build-system)
4581 (arguments
4582 `(#:build-target "jars"
4583 #:test-target "run.tests"
4584 #:phases
4585 (modify-phases %standard-phases
4586 (replace 'install (install-jars "build")))))
4587 (home-page "http://jmock.org/")
4588 (synopsis "Mock object library for test-driven development")
4589 (description "JMock is a library that supports test-driven development of
4590Java code with mock objects. Mock objects help you design and test the
4591interactions between the objects in your programs.
4592
4593The jMock library
4594
4595@itemize
4596@item makes it quick and easy to define mock objects
4597@item lets you precisely specify the interactions between
4598 your objects, reducing the brittleness of your tests
4599@item plugs into your favourite test framework
4600@item is easy to extend.
4601@end itemize\n")
4602 (license license:bsd-3)))
4603
4604(define-public java-jmock
4605 (package
4606 (inherit java-jmock-1)
4607 (name "java-jmock")
4608 (version "2.8.2")
4609 (source (origin
4610 (method git-fetch)
4611 (uri (git-reference
4612 (url "https://github.com/jmock-developers/jmock-library")
4613 (commit version)))
4614 (file-name (git-file-name name version))
4615 (sha256
4616 (base32
4617 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
4618 (inputs
4619 `(("java-hamcrest-all" ,java-hamcrest-all)
4620 ("java-asm" ,java-asm)
4621 ("java-bsh" ,java-bsh)
4622 ("java-junit" ,java-junit)))
4623 (native-inputs
4624 `(("cglib" ,java-cglib)))
4625 (arguments
4626 `(#:jar-name "java-jmock.jar"
4627 #:source-dir "jmock/src/main/java"
4628 #:test-dir "jmock/src/test"))))
4629
4630(define-public java-jmock-junit4
4631 (package
4632 (inherit java-jmock)
4633 (name "java-jmock-junit4")
4634 (arguments
4635 `(#:jar-name "java-jmock-junit4.jar"
4636 #:source-dir "jmock-junit4/src/main/java"
4637 #:test-dir "jmock-junit4/src/test"))
4638 (inputs
4639 `(("java-hamcrest-all" ,java-hamcrest-all)
4640 ("java-asm" ,java-asm)
4641 ("java-bsh" ,java-bsh)
4642 ("java-jmock" ,java-jmock)
4643 ("java-jumit" ,java-junit)))))
4644
4645(define-public java-jmock-legacy
4646 (package
4647 (inherit java-jmock)
4648 (name "java-jmock-legacy")
4649 (arguments
4650 `(#:jar-name "java-jmock-legacy.jar"
4651 #:source-dir "jmock-legacy/src/main/java"
4652 #:test-dir "jmock-legacy/src/test"
4653 #:phases
4654 (modify-phases %standard-phases
4655 (add-before 'check 'copy-tests
4656 (lambda _
4657 ;; This file is a dependancy of some tests
4658 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4659 (copy-file (string-append "jmock/src/test/java/" file)
4660 (string-append "jmock-legacy/src/test/java/" file))
4661 #t))))))
4662 (inputs
4663 `(("java-hamcrest-all" ,java-hamcrest-all)
4664 ("java-objenesis" ,java-objenesis)
4665 ("java-cglib" ,java-cglib)
4666 ("java-jmock" ,java-jmock)
4667 ("java-asm" ,java-asm)
4668 ("java-bsh" ,java-bsh)
4669 ("java-junit" ,java-junit)))
4670 (native-inputs
4671 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4672
4673(define-public java-hamcrest-all
4674 (package (inherit java-hamcrest-core)
4675 (name "java-hamcrest-all")
4676 (arguments
4677 `(#:jdk ,icedtea-8
4678 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4679 ((#:build-target _) "bigjar")
4680 ((#:phases phases)
4681 `(modify-phases ,phases
4682 ;; Some build targets override the classpath, so we need to patch
4683 ;; the build.xml to ensure that required dependencies are on the
4684 ;; classpath.
4685 (add-after 'unpack 'patch-classpath-for-integration
4686 (lambda* (#:key inputs #:allow-other-keys)
4687 (substitute* "build.xml"
4688 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4689 (string-join
4690 (cons line
4691 (append
4692 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4693 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4694 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4695 ";"))
4696 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4697 (string-append (assoc-ref inputs "java-hamcrest-core")
4698 "/share/java/hamcrest-core.jar")))
4699 #t)))))))
4700 (inputs
4701 `(("java-junit" ,java-junit)
4702 ("java-jmock" ,java-jmock-1)
4703 ;; This is necessary because of what seems to be a race condition.
4704 ;; This package would sometimes fail to build because hamcrest-core.jar
4705 ;; could not be found, even though it is built as part of this package.
4706 ;; Adding java-hamcrest-core appears to fix this problem. See
4707 ;; https://debbugs.gnu.org/31390 for more information.
4708 ("java-hamcrest-core" ,java-hamcrest-core)
4709 ("java-easymock" ,java-easymock)
4710 ,@(package-inputs java-hamcrest-core)))))
4711
4712(define-public java-jopt-simple
4713 (package
4714 (name "java-jopt-simple")
4715 (version "5.0.3")
4716 (source (origin
4717 (method url-fetch)
4718 (uri (string-append "http://repo1.maven.org/maven2/"
4719 "net/sf/jopt-simple/jopt-simple/"
4720 version "/jopt-simple-"
4721 version "-sources.jar"))
4722 (sha256
4723 (base32
4724 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4725 (build-system ant-build-system)
4726 (arguments
4727 `(#:tests? #f ; there are no tests
4728 #:jar-name "jopt-simple.jar"))
4729 (home-page "https://pholser.github.io/jopt-simple/")
4730 (synopsis "Java library for parsing command line options")
4731 (description "JOpt Simple is a Java library for parsing command line
4732options, such as those you might pass to an invocation of @code{javac}. In
4733the interest of striving for simplicity, as closely as possible JOpt Simple
4734attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4735GNU @code{getopt_long}. It also aims to make option parser configuration and
4736retrieval of options and their arguments simple and expressive, without being
4737overly clever.")
4738 (license license:expat)))
4739
4740(define-public java-commons-math3
4741 (package
4742 (name "java-commons-math3")
4743 (version "3.6.1")
4744 (source (origin
4745 (method url-fetch)
4746 (uri (string-append "mirror://apache/commons/math/source/"
4747 "commons-math3-" version "-src.tar.gz"))
4748 (sha256
4749 (base32
4750 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4751 (build-system ant-build-system)
4752 (arguments
4753 `(#:build-target "jar"
4754 #:test-target "test"
4755 #:make-flags
4756 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4757 (junit (assoc-ref %build-inputs "java-junit")))
4758 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4759 (string-append "-Dhamcrest.jar=" hamcrest
4760 "/share/java/hamcrest-core.jar")))
4761 #:phases
4762 (modify-phases %standard-phases
4763 ;; We want to build the jar in the build phase and run the tests
4764 ;; later in a separate phase.
4765 (add-after 'unpack 'untangle-targets
4766 (lambda _
4767 (substitute* "build.xml"
4768 (("name=\"jar\" depends=\"test\"")
4769 "name=\"jar\" depends=\"compile\""))
4770 #t))
4771 ;; There is no install target.
4772 (replace 'install
4773 (install-jars "target")))))
4774 (native-inputs
4775 `(("java-junit" ,java-junit)
4776 ("java-hamcrest-core" ,java-hamcrest-core)))
4777 (home-page "https://commons.apache.org/math/")
4778 (synopsis "Apache Commons mathematics library")
4779 (description "Commons Math is a library of lightweight, self-contained
4780mathematics and statistics components addressing the most common problems not
4781available in the Java programming language or Commons Lang.")
4782 (license license:asl2.0)))
4783
4784(define-public java-jmh
4785 (package
4786 (name "java-jmh")
4787 (version "1.17.5")
4788 (source (origin
4789 (method hg-fetch)
4790 (uri (hg-reference
4791 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4792 (changeset version)))
4793 (file-name (string-append name "-" version "-checkout"))
4794 (sha256
4795 (base32
4796 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4797 (build-system ant-build-system)
4798 (arguments
4799 `(#:jar-name "jmh-core.jar"
4800 #:source-dir "jmh-core/src/main"
4801 #:test-dir "jmh-core/src/test"
4802 #:phases
4803 (modify-phases %standard-phases
4804 ;; This seems to be a bug in the JDK. It may not be necessary in
4805 ;; future versions of the JDK.
4806 (add-after 'unpack 'fix-bug
4807 (lambda _
4808 (with-directory-excursion
4809 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4810 (substitute* '("IntegerValueConverter.java"
4811 "ThreadsValueConverter.java")
4812 (("public Class<Integer> valueType")
4813 "public Class<? extends Integer> valueType")))
4814 #t)))))
4815 (inputs
4816 `(("java-jopt-simple" ,java-jopt-simple)
4817 ("java-commons-math3" ,java-commons-math3)))
4818 (native-inputs
4819 `(("java-junit" ,java-junit)
4820 ("java-hamcrest-core" ,java-hamcrest-core)))
4821 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
4822 (synopsis "Benchmark harness for the JVM")
4823 (description "JMH is a Java harness for building, running, and analysing
4824nano/micro/milli/macro benchmarks written in Java and other languages
4825targeting the JVM.")
4826 ;; GPLv2 only
4827 (license license:gpl2)))
4828
4829(define-public java-commons-collections4
4830 (package
4831 (name "java-commons-collections4")
4832 (version "4.1")
4833 (source (origin
4834 (method url-fetch)
4835 (uri (string-append "mirror://apache/commons/collections/source/"
4836 "commons-collections4-" version "-src.tar.gz"))
4837 (sha256
4838 (base32
4839 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4840 (build-system ant-build-system)
4841 (arguments
4842 `(#:test-target "test"
4843 #:make-flags
4844 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4845 (junit (assoc-ref %build-inputs "java-junit"))
4846 (easymock (assoc-ref %build-inputs "java-easymock")))
4847 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4848 (string-append "-Dhamcrest.jar=" hamcrest
4849 "/share/java/hamcrest-core.jar")
4850 (string-append "-Deasymock.jar=" easymock
4851 "/share/java/easymock.jar")))
4852 #:phases
4853 (modify-phases %standard-phases
4854 (replace 'install
4855 (install-jars "target")))))
4856 (native-inputs
4857 `(("java-junit" ,java-junit)
4858 ("java-hamcrest-core" ,java-hamcrest-core)
4859 ("java-easymock" ,java-easymock)))
4860 (home-page "https://commons.apache.org/collections/")
4861 (synopsis "Collections framework")
4862 (description "The Java Collections Framework is the recognised standard
4863for collection handling in Java. Commons-Collections seek to build upon the
4864JDK classes by providing new interfaces, implementations and utilities. There
4865are many features, including:
4866
4867@itemize
4868@item @code{Bag} interface for collections that have a number of copies of
4869 each object
4870@item @code{BidiMap} interface for maps that can be looked up from value to
4871 key as well and key to value
4872@item @code{MapIterator} interface to provide simple and quick iteration over
4873 maps
4874@item Transforming decorators that alter each object as it is added to the
4875 collection
4876@item Composite collections that make multiple collections look like one
4877@item Ordered maps and sets that retain the order elements are added in,
4878 including an LRU based map
4879@item Reference map that allows keys and/or values to be garbage collected
4880 under close control
4881@item Many comparator implementations
4882@item Many iterator implementations
4883@item Adapter classes from array and enumerations to collections
4884@item Utilities to test or create typical set-theory properties of collections
4885 such as union, intersection, and closure.
4886@end itemize\n")
4887 (license license:asl2.0)))
4888
4889(define-public java-commons-collections
4890 (package
4891 (inherit java-commons-collections4)
4892 (name "java-commons-collections")
4893 (version "3.2.2")
4894 (source (origin
4895 (method url-fetch)
4896 (uri (string-append "mirror://apache/commons/collections/source/"
4897 "commons-collections-" version "-src.tar.gz"))
4898 (sha256
4899 (base32
4900 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4901 (patches
4902 (search-patches "java-commons-collections-fix-java8.patch"))))
4903 (arguments
4904 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4905 ((#:phases phases)
4906 `(modify-phases ,phases
4907 ;; The manifest is required by the build procedure
4908 (add-before 'build 'add-manifest
4909 (lambda _
4910 (mkdir-p "build/conf")
4911 (call-with-output-file "build/conf/MANIFEST.MF"
4912 (lambda (file)
4913 (format file "Manifest-Version: 1.0\n")))
4914 #t))
4915 (replace 'install
4916 (install-jars "build"))))))))
4917
4918(define java-commons-collections-test-classes
4919 (package
4920 (inherit java-commons-collections)
4921 (arguments
4922 `(#:jar-name "commons-collections-test-classes.jar"
4923 #:source-dir "src/test"
4924 #:tests? #f))
4925 (inputs
4926 `(("collection" ,java-commons-collections)))))
4927
4928(define-public java-commons-beanutils
4929 (package
4930 (name "java-commons-beanutils")
4931 (version "1.9.3")
4932 (source (origin
4933 (method url-fetch)
4934 (uri (string-append "mirror://apache/commons/beanutils/source/"
4935 "commons-beanutils-" version "-src.tar.gz"))
4936 (sha256
4937 (base32
4938 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4939 (build-system ant-build-system)
4940 (arguments
4941 `(#:test-target "test"
4942 #:tests? #f
4943 #:phases
4944 (modify-phases %standard-phases
4945 (replace 'install
4946 (lambda* (#:key outputs #:allow-other-keys)
4947 (rename-file (string-append "dist/commons-beanutils-" ,version
4948 "-SNAPSHOT.jar")
4949 "commons-beanutils.jar")
4950 (install-file "commons-beanutils.jar"
4951 (string-append (assoc-ref outputs "out") "/share/java/"))
4952 #t)))))
4953 (inputs
4954 `(("logging" ,java-commons-logging-minimal)
4955 ("collections" ,java-commons-collections)))
4956 (native-inputs
4957 `(("junit" ,java-junit)
4958 ("collections-test" ,java-commons-collections-test-classes)))
4959 (home-page "https://commons.apache.org/beanutils/")
4960 (synopsis "Dynamically set or get properties in Java")
4961 (description "BeanUtils provides a simplified interface to reflection and
4962introspection to set or get dynamically determined properties through their
4963setter and getter method.")
4964 (license license:asl2.0)))
4965
4966(define-public java-commons-io
4967 (package
4968 (name "java-commons-io")
4969 (version "2.5")
4970 (source
4971 (origin
4972 (method url-fetch)
4973 (uri (string-append "mirror://apache/commons/io/source/"
4974 "commons-io-" version "-src.tar.gz"))
4975 (sha256
4976 (base32
4977 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4978 (build-system ant-build-system)
4979 (outputs '("out" "doc"))
4980 (arguments
4981 `(#:test-target "test"
4982 #:make-flags
4983 (list (string-append "-Djunit.jar="
4984 (assoc-ref %build-inputs "java-junit")
4985 "/share/java/junit.jar"))
4986 #:phases
4987 (modify-phases %standard-phases
4988 (add-after 'build 'build-javadoc ant-build-javadoc)
4989 (replace 'install (install-jars "target"))
4990 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4991 (native-inputs
4992 `(("java-junit" ,java-junit)
4993 ("java-hamcrest-core" ,java-hamcrest-core)))
4994 (home-page "https://commons.apache.org/io/")
4995 (synopsis "Common useful IO related classes")
4996 (description "Commons-IO contains utility classes, stream implementations,
4997file filters and endian classes.")
4998 (license license:asl2.0)))
4999
5000(define-public java-commons-exec-1.1
5001 (package
5002 (name "java-commons-exec")
5003 (version "1.1")
5004 (source
5005 (origin
5006 (method url-fetch)
5007 (uri (string-append "mirror://apache/commons/exec/source/"
5008 "commons-exec-" version "-src.tar.gz"))
5009 (sha256
5010 (base32
5011 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5012 (build-system ant-build-system)
5013 (arguments
5014 `(#:test-target "test"
5015 #:make-flags
5016 (list (string-append "-Dmaven.junit.jar="
5017 (assoc-ref %build-inputs "java-junit")
5018 "/share/java/junit.jar"))
5019 #:phases
5020 (modify-phases %standard-phases
5021 (add-before 'build 'delete-network-tests
5022 (lambda _
5023 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5024 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5025 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5026 #t))
5027 ;; The "build" phase automatically tests.
5028 (delete 'check)
5029 (replace 'install (install-jars "target")))))
5030 (native-inputs
5031 `(("java-junit" ,java-junit)))
5032 (home-page "https://commons.apache.org/proper/commons-exec/")
5033 (synopsis "Common program execution related classes")
5034 (description "Commons-Exec simplifies executing external processes.")
5035 (license license:asl2.0)))
5036
5037(define-public java-commons-exec
5038 (package
5039 (inherit java-commons-exec-1.1)
5040 (version "1.3")
5041 (source
5042 (origin
5043 (method url-fetch)
5044 (uri (string-append "mirror://apache/commons/exec/source/"
5045 "commons-exec-" version "-src.tar.gz"))
5046 (sha256
5047 (base32
5048 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5049 (arguments
5050 `(#:test-target "test"
5051 #:make-flags
5052 (list (string-append "-Dmaven.junit.jar="
5053 (assoc-ref %build-inputs "java-junit")
5054 "/share/java/junit.jar")
5055 "-Dmaven.compiler.source=1.7"
5056 "-Dmaven.compiler.target=1.7")
5057 #:phases
5058 (modify-phases %standard-phases
5059 (add-before 'build 'delete-network-tests
5060 (lambda* (#:key inputs #:allow-other-keys)
5061 ;; This test hangs indefinitely.
5062 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5063 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5064 (("ping -c 10 127.0.0.1") "sleep 10"))
5065 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5066 (("/bin/ls") "ls"))
5067 (call-with-output-file "src/test/scripts/ping.sh"
5068 (lambda (port)
5069 (format port "#!~a/bin/sh\nsleep $1\n"
5070 (assoc-ref inputs "bash"))))
5071 #t))
5072 ;; The "build" phase automatically tests.
5073 (delete 'check)
5074 (replace 'install (install-jars "target")))))
5075 (native-inputs
5076 `(("java-junit" ,java-junit)
5077 ("java-hamcrest-core" ,java-hamcrest-core)))))
5078
5079(define-public java-commons-lang
5080 (package
5081 (name "java-commons-lang")
5082 (version "2.6")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (string-append "mirror://apache/commons/lang/source/"
5087 "commons-lang-" version "-src.tar.gz"))
5088 (sha256
5089 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5090 (build-system ant-build-system)
5091 (outputs '("out" "doc"))
5092 (arguments
5093 `(#:test-target "test"
5094 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5095 #:phases
5096 (modify-phases %standard-phases
5097 (add-after 'build 'build-javadoc ant-build-javadoc)
5098 (add-before 'check 'disable-failing-test
5099 (lambda _
5100 ;; Disable a failing test
5101 (substitute* "src/test/java/org/apache/commons/lang/\
5102time/FastDateFormatTest.java"
5103 (("public void testFormat\\(\\)")
5104 "public void disabled_testFormat()"))
5105 #t))
5106 (replace 'install (install-jars "target"))
5107 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5108 (native-inputs
5109 `(("java-junit" ,java-junit)))
5110 (home-page "https://commons.apache.org/lang/")
5111 (synopsis "Extension of the java.lang package")
5112 (description "The Commons Lang components contains a set of Java classes
5113that provide helper methods for standard Java classes, especially those found
5114in the @code{java.lang} package in the Sun JDK. The following classes are
5115included:
5116
5117@itemize
5118@item StringUtils - Helper for @code{java.lang.String}.
5119@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5120 of characters such as @code{[a-z]} and @code{[abcdez]}.
5121@item RandomStringUtils - Helper for creating randomised strings.
5122@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5123@item NumberRange - A range of numbers with an upper and lower bound.
5124@item ObjectUtils - Helper for @code{java.lang.Object}.
5125@item SerializationUtils - Helper for serializing objects.
5126@item SystemUtils - Utility class defining the Java system properties.
5127@item NestedException package - A sub-package for the creation of nested
5128 exceptions.
5129@item Enum package - A sub-package for the creation of enumerated types.
5130@item Builder package - A sub-package for the creation of @code{equals},
5131 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5132@end itemize\n")
5133 (license license:asl2.0)))
5134
5135(define-public java-commons-lang3
5136 (package
5137 (name "java-commons-lang3")
5138 (version "3.4")
5139 (source
5140 (origin
5141 (method url-fetch)
5142 (uri (string-append "mirror://apache/commons/lang/source/"
5143 "commons-lang3-" version "-src.tar.gz"))
5144 (sha256
5145 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5146 (build-system ant-build-system)
5147 (outputs '("out" "doc"))
5148 (arguments
5149 `(#:test-target "test"
5150 #:make-flags
5151 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5152 (junit (assoc-ref %build-inputs "java-junit"))
5153 (easymock (assoc-ref %build-inputs "java-easymock"))
5154 (io (assoc-ref %build-inputs "java-commons-io")))
5155 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5156 (string-append "-Dhamcrest.jar=" hamcrest
5157 "/share/java/hamcrest-all.jar")
5158 (string-append "-Dcommons-io.jar=" io
5159 "/share/java/commons-io-"
5160 ,(package-version java-commons-io)
5161 "-SNAPSHOT.jar")
5162 (string-append "-Deasymock.jar=" easymock
5163 "/share/java/easymock.jar")))
5164 #:phases
5165 (modify-phases %standard-phases
5166 (add-after 'build 'build-javadoc ant-build-javadoc)
5167 (replace 'install (install-jars "target"))
5168 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5169 (native-inputs
5170 `(("java-junit" ,java-junit)
5171 ("java-commons-io" ,java-commons-io)
5172 ("java-hamcrest-all" ,java-hamcrest-all)
5173 ("java-easymock" ,java-easymock)))
5174 (home-page "https://commons.apache.org/lang/")
5175 (synopsis "Extension of the java.lang package")
5176 (description "The Commons Lang components contains a set of Java classes
5177that provide helper methods for standard Java classes, especially those found
5178in the @code{java.lang} package. The following classes are included:
5179
5180@itemize
5181@item StringUtils - Helper for @code{java.lang.String}.
5182@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5183 characters such as @code{[a-z]} and @code{[abcdez]}.
5184@item RandomStringUtils - Helper for creating randomised strings.
5185@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5186@item NumberRange - A range of numbers with an upper and lower bound.
5187@item ObjectUtils - Helper for @code{java.lang.Object}.
5188@item SerializationUtils - Helper for serializing objects.
5189@item SystemUtils - Utility class defining the Java system properties.
5190@item NestedException package - A sub-package for the creation of nested
5191 exceptions.
5192@item Enum package - A sub-package for the creation of enumerated types.
5193@item Builder package - A sub-package for the creation of @code{equals},
5194 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5195@end itemize\n")
5196 (license license:asl2.0)))
5197
5198(define-public java-commons-bsf
5199 (package
5200 (name "java-commons-bsf")
5201 (version "2.4.0")
5202 (source (origin
5203 (method url-fetch)
5204 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5205 version ".tar.gz"))
5206 (sha256
5207 (base32
5208 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5209 (modules '((guix build utils)))
5210 (snippet
5211 '(begin
5212 (for-each delete-file
5213 (find-files "." "\\.jar$"))
5214 #t))))
5215 (build-system ant-build-system)
5216 (arguments
5217 `(#:build-target "jar"
5218 #:tests? #f; No test file
5219 #:modules ((guix build ant-build-system)
5220 (guix build utils)
5221 (guix build java-utils)
5222 (sxml simple))
5223 #:phases
5224 (modify-phases %standard-phases
5225 (add-before 'build 'create-properties
5226 (lambda _
5227 ;; This file is missing from the distribution
5228 (call-with-output-file "build-properties.xml"
5229 (lambda (port)
5230 (sxml->xml
5231 `(project (@ (basedir ".") (name "build-properties") (default ""))
5232 (property (@ (name "project.name") (value "bsf")))
5233 (property (@ (name "source.level") (value "1.5")))
5234 (property (@ (name "build.lib") (value "build/jar")))
5235 (property (@ (name "src.dir") (value "src")))
5236 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5237 (property (@ (name "build.tests") (value "build/test-classes")))
5238 (property (@ (name "build.dest") (value "build/classes"))))
5239 port)))
5240 #t))
5241 (replace 'install (install-jars "build")))))
5242 (native-inputs
5243 `(("java-junit" ,java-junit)))
5244 (inputs
5245 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5246 (home-page "https://commons.apache.org/proper/commons-bsf")
5247 (synopsis "Bean Scripting Framework")
5248 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5249which provides scripting language support within Java applications, and access
5250to Java objects and methods from scripting languages. BSF allows one to write
5251JSPs in languages other than Java while providing access to the Java class
5252library. In addition, BSF permits any Java application to be implemented in
5253part (or dynamically extended) by a language that is embedded within it. This
5254is achieved by providing an API that permits calling scripting language engines
5255from within Java, as well as an object registry that exposes Java objects to
5256these scripting language engines.")
5257 (license license:asl2.0)))
5258
5259(define-public java-commons-jxpath
5260 (package
5261 (name "java-commons-jxpath")
5262 (version "1.3")
5263 (source (origin
5264 (method url-fetch)
5265 (uri (string-append "mirror://apache/commons/jxpath/source/"
5266 "commons-jxpath-" version "-src.tar.gz"))
5267 (sha256
5268 (base32
5269 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5270 (build-system ant-build-system)
5271 (arguments
5272 `(#:jar-name "commons-jxpath.jar"
5273 ;; tests require more dependencies, including mockrunner which depends on old software
5274 #:tests? #f
5275 #:source-dir "src/java"))
5276 (inputs
5277 `(("servlet" ,java-classpathx-servletapi)
5278 ("java-jdom" ,java-jdom)
5279 ("java-commons-beanutils" ,java-commons-beanutils)))
5280 (native-inputs
5281 `(("java-junit" ,java-junit)))
5282 (home-page "https://commons.apache.org/jxpath/")
5283 (synopsis "Simple interpreter of an expression language called XPath.")
5284 (description "The org.apache.commons.jxpath package defines a simple
5285interpreter of an expression language called XPath. JXPath applies XPath
5286expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5287contexts, DOM etc, including mixtures thereof.")
5288 (license license:asl2.0)))
5289
5290(define-public java-commons-pool
5291 (package
5292 (name "java-commons-pool")
5293 (version "2.6.2")
5294 (source (origin
5295 (method url-fetch)
5296 (uri (string-append "mirror://apache/commons/pool/source/"
5297 "commons-pool2-" version "-src.tar.gz"))
5298 (sha256
5299 (base32
5300 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5301 (arguments
5302 `(#:jar-name "common-pool.jar"
5303 #:source-dir "src/main/java"
5304 #:test-exclude
5305 (list "**/PerformanceTest.java")))
5306 (build-system ant-build-system)
5307 (inputs
5308 `(("java-cglib" ,java-cglib)))
5309 (native-inputs
5310 `(("java-junit" ,java-junit)
5311 ("java-hamcrest-core" ,java-hamcrest-core)
5312 ("java-asm" ,java-asm)
5313 ("java-objenesis" ,java-objenesis)))
5314 (home-page "https://commons.apache.org/proper/commons-pool/")
5315 (synopsis "Object-pooling API in Java")
5316 (description "The commons-pool package provides an object-pooling API
5317and a number of object pool implementations. This package defines a
5318handful of pooling interfaces and some base classes that may be useful when
5319creating new pool implementations.")
5320 (license license:asl2.0)))
5321
5322(define-public java-commons-dbcp
5323 (package
5324 (name "java-commons-dbcp")
5325 (version "2.6.0")
5326 (source (origin
5327 (method url-fetch)
5328 (uri (string-append "mirror://apache/commons/dbcp/source/"
5329 "commons-dbcp2-" version "-src.tar.gz"))
5330 (sha256
5331 (base32
5332 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5333 (arguments
5334 `(#:source-dir "src/main/java"
5335 #:jar-name "java-commons-dbcp.jar"
5336 #:tests? #f)); requires apache-geronimo
5337 (inputs
5338 `(("java-commons-pool" ,java-commons-pool)
5339 ("java-commons-logging" ,java-commons-logging-minimal)
5340 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5341 (native-inputs
5342 `(("java-junit" ,java-junit)))
5343 (build-system ant-build-system)
5344 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5345 (synopsis "Database Connection Pool for Java")
5346 (description "Commons-dbcp allows you to share a pool of database
5347connections between users. Creating a new connection for each user can be
5348time consuming and even unfeasible when the number of simultaneous users is
5349very large. This package provides a way to share a poole of connections to
5350reduce that load.")
5351 (license license:asl2.0)))
5352
5353(define-public java-commons-jcs
5354 (package
5355 (name "java-commons-jcs")
5356 (version "2.2.1")
5357 (source (origin
5358 (method url-fetch)
5359 (uri (string-append "mirror://apache/commons/jcs/source/"
5360 "commons-jcs-dist-" version "-src.tar.gz"))
5361 (sha256
5362 (base32
5363 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5364 (build-system ant-build-system)
5365 (arguments
5366 `(#:jar-name "commons-jcs.jar"
5367 #:source-dir "commons-jcs-core/src/main/java"
5368 #:test-dir "commons-jcs-core/src/test"
5369 #:tests? #f; requires hsqldb
5370 #:phases
5371 (modify-phases %standard-phases
5372 (add-before 'build 'prepare
5373 (lambda _
5374 (with-directory-excursion
5375 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5376 (substitute*
5377 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5378 (("commons.dbcp") "commons.dbcp2")
5379 ((".*\\.setMaxActive.*") ""))
5380 ;;; Remove dependency on velocity-tools
5381 (delete-file "admin/servlet/JCSAdminServlet.java"))
5382 #t)))))
5383 (propagated-inputs
5384 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5385 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5386 ("java-commons-httpclient" ,java-commons-httpclient)
5387 ("java-commons-dbcp" ,java-commons-dbcp)))
5388 (native-inputs
5389 `(("java-junit" ,java-junit)))
5390 (home-page "https://commons.apache.org/proper/commons-jcs/")
5391 (synopsis "Distributed caching system in Java")
5392 (description "JCS is a distributed caching system written in Java. It
5393is intended to speed up applications by providing a means to manage cached
5394data of various dynamic natures. Like any caching system, JCS is most useful
5395for high read, low put applications. Latency times drop sharply and
5396bottlenecks move away from the database in an effectively cached system.")
5397 (license license:asl2.0)))
5398
5399(define-public java-jsr250
5400 (package
5401 (name "java-jsr250")
5402 (version "1.3")
5403 (source (origin
5404 (method url-fetch)
5405 (uri (string-append "https://repo1.maven.org/maven2/"
5406 "javax/annotation/javax.annotation-api/"
5407 version "/javax.annotation-api-"
5408 version "-sources.jar"))
5409 (sha256
5410 (base32
5411 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5412 (build-system ant-build-system)
5413 (arguments
5414 `(#:tests? #f ; no tests included
5415 #:jdk ,icedtea-8
5416 #:jar-name "jsr250.jar"))
5417 (home-page "https://jcp.org/en/jsr/detail?id=250")
5418 (synopsis "Security-related annotations")
5419 (description "This package provides annotations for security. It provides
5420packages in the @code{javax.annotation} and @code{javax.annotation.security}
5421namespaces.")
5422 ;; either cddl or gpl2 only, with classpath exception
5423 (license (list license:cddl1.0
5424 license:gpl2))))
5425
5426(define-public java-jsr305
5427 (package
5428 (name "java-jsr305")
5429 (version "3.0.1")
5430 (source (origin
5431 (method url-fetch)
5432 (uri (string-append "https://repo1.maven.org/maven2/"
5433 "com/google/code/findbugs/"
5434 "jsr305/" version "/jsr305-"
5435 version "-sources.jar"))
5436 (sha256
5437 (base32
5438 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5439 (build-system ant-build-system)
5440 (arguments
5441 `(#:tests? #f ; no tests included
5442 #:jar-name "jsr305.jar"))
5443 (home-page "http://findbugs.sourceforge.net/")
5444 (synopsis "Annotations for the static analyzer called findbugs")
5445 (description "This package provides annotations for the findbugs package.
5446It provides packages in the @code{javax.annotations} namespace.")
5447 (license license:asl2.0)))
5448
5449(define-public java-guava
5450 (package
5451 (name "java-guava")
5452 ;; This is the last release of Guava that can be built with Java 7.
5453 (version "20.0")
5454 (source (origin
5455 (method url-fetch)
5456 (uri (string-append "https://github.com/google/guava/"
5457 "releases/download/v" version
5458 "/guava-" version "-sources.jar"))
5459 (sha256
5460 (base32
5461 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5462 (build-system ant-build-system)
5463 (arguments
5464 `(#:tests? #f ; no tests included
5465 #:jar-name "guava.jar"
5466 #:phases
5467 (modify-phases %standard-phases
5468 (add-after 'unpack 'trim-sources
5469 (lambda _
5470 (with-directory-excursion "src/com/google/common"
5471 ;; Remove annotations to avoid extra dependencies:
5472 ;; * "j2objc" annotations are used when converting Java to
5473 ;; Objective C;
5474 ;; * "errorprone" annotations catch common Java mistakes at
5475 ;; compile time;
5476 ;; * "IgnoreJRERequirement" is used for Android.
5477 (substitute* (find-files "." "\\.java$")
5478 (("import com.google.j2objc.*") "")
5479 (("import com.google.errorprone.annotation.*") "")
5480 (("import org.codehaus.mojo.animal_sniffer.*") "")
5481 (("@CanIgnoreReturnValue") "")
5482 (("@LazyInit") "")
5483 (("@WeakOuter") "")
5484 (("@RetainedWith") "")
5485 (("@Weak") "")
5486 (("@ForOverride") "")
5487 (("@J2ObjCIncompatible") "")
5488 (("@IgnoreJRERequirement") "")))
5489 #t)))))
5490 (inputs
5491 `(("java-jsr305" ,java-jsr305)))
5492 (home-page "https://github.com/google/guava")
5493 (synopsis "Google core libraries for Java")
5494 (description "Guava is a set of core libraries that includes new
5495collection types (such as multimap and multiset), immutable collections, a
5496graph library, functional types, an in-memory cache, and APIs/utilities for
5497concurrency, I/O, hashing, primitives, reflection, string processing, and much
5498more!")
5499 (license license:asl2.0)))
5500
5501;; The java-commons-logging package provides adapters to many different
5502;; logging frameworks. To avoid an excessive dependency graph we try to build
5503;; it with only a minimal set of adapters.
5504(define-public java-commons-logging-minimal
5505 (package
5506 (name "java-commons-logging-minimal")
5507 (version "1.2")
5508 (source (origin
5509 (method url-fetch)
5510 (uri (string-append "mirror://apache/commons/logging/source/"
5511 "commons-logging-" version "-src.tar.gz"))
5512 (sha256
5513 (base32
5514 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5515 (build-system ant-build-system)
5516 (arguments
5517 `(#:tests? #f ; avoid dependency on logging frameworks
5518 #:jar-name "commons-logging-minimal.jar"
5519 #:phases
5520 (modify-phases %standard-phases
5521 (add-after 'unpack 'delete-adapters-and-tests
5522 (lambda _
5523 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5524 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5525 ;; is used by applications; SimpleLog is the only actually usable
5526 ;; implementation that does not depend on another logging
5527 ;; framework.
5528 (for-each
5529 (lambda (file)
5530 (delete-file (string-append
5531 "src/main/java/org/apache/commons/logging/impl/" file)))
5532 (list "Jdk13LumberjackLogger.java"
5533 "WeakHashtable.java"
5534 "Log4JLogger.java"
5535 "ServletContextCleaner.java"
5536 "Jdk14Logger.java"
5537 "AvalonLogger.java"
5538 "LogKitLogger.java"))
5539 (delete-file-recursively "src/test")
5540 #t)))))
5541 (home-page "https://commons.apache.org/logging/")
5542 (synopsis "Common API for logging implementations")
5543 (description "The Logging package is a thin bridge between different
5544logging implementations. A library that uses the commons-logging API can be
5545used with any logging implementation at runtime.")
5546 (license license:asl2.0)))
5547
5548;; This is the last release of the 1.x series.
5549(define-public java-mockito-1
5550 (package
5551 (name "java-mockito")
5552 (version "1.10.19")
5553 (source (origin
5554 (method url-fetch)
5555 (uri (string-append "http://repo1.maven.org/maven2/"
5556 "org/mockito/mockito-core/" version
5557 "/mockito-core-" version "-sources.jar"))
5558 (sha256
5559 (base32
5560 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5561 (build-system ant-build-system)
5562 (arguments
5563 `(#:jar-name "mockito.jar"
5564 #:tests? #f ; no tests included
5565 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5566 ;; patches in build phases.
5567 #:phases
5568 (modify-phases %standard-phases
5569 ;; Mockito was developed against a different version of hamcrest,
5570 ;; which does not require matcher implementations to provide an
5571 ;; implementation of the "describeMismatch" method. We add this
5572 ;; simple definition to pass the build with our version of hamcrest.
5573 (add-after 'unpack 'fix-hamcrest-build-error
5574 (lambda _
5575 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5576 (("public Matcher getActualMatcher\\(\\) .*" line)
5577 (string-append "
5578 public void describeMismatch(Object item, Description description) {
5579 actualMatcher.describeMismatch(item, description);
5580 }"
5581 line)))
5582 #t))
5583 ;; Mockito bundles cglib. We have a cglib package, so let's use
5584 ;; that instead.
5585 (add-after 'unpack 'use-system-libraries
5586 (lambda _
5587 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5588 (substitute* '("CGLIBHacker.java"
5589 "CglibMockMaker.java"
5590 "ClassImposterizer.java"
5591 "DelegatingMockitoMethodProxy.java"
5592 "MethodInterceptorFilter.java"
5593 "MockitoNamingPolicy.java"
5594 "SerializableMockitoMethodProxy.java"
5595 "SerializableNoOp.java")
5596 (("import org.mockito.cglib") "import net.sf.cglib")))
5597 #t)))))
5598 (inputs
5599 `(("java-junit" ,java-junit)
5600 ("java-objenesis" ,java-objenesis)
5601 ("java-cglib" ,java-cglib)
5602 ("java-hamcrest-core" ,java-hamcrest-core)))
5603 (home-page "http://mockito.org")
5604 (synopsis "Mockito is a mock library for Java")
5605 (description "Mockito is a mocking library for Java which lets you write
5606tests with a clean and simple API. It generates mocks using reflection, and
5607it records all mock invocations, including methods arguments.")
5608 (license license:asl2.0)))
5609
5610(define-public java-httpcomponents-httpcore
5611 (package
5612 (name "java-httpcomponents-httpcore")
5613 (version "4.4.6")
5614 (source (origin
5615 (method url-fetch)
5616 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5617 "source/httpcomponents-core-"
5618 version "-src.tar.gz"))
5619 (sha256
5620 (base32
5621 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5622 (build-system ant-build-system)
5623 (arguments
5624 `(#:jar-name "httpcomponents-httpcore.jar"
5625 #:phases
5626 (modify-phases %standard-phases
5627 (add-after 'unpack 'chdir
5628 (lambda _ (chdir "httpcore") #t)))))
5629 (inputs
5630 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5631 ("java-commons-lang3" ,java-commons-lang3)))
5632 (native-inputs
5633 `(("java-junit" ,java-junit)
5634 ("java-mockito" ,java-mockito-1)))
5635 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5636 (synopsis "Low level HTTP transport components")
5637 (description "HttpCore is a set of low level HTTP transport components
5638that can be used to build custom client and server side HTTP services with a
5639minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5640on the classic Java I/O and non-blocking, event driven I/O model based on Java
5641NIO.
5642
5643This package provides the blocking I/O model library.")
5644 (license license:asl2.0)))
5645
5646(define-public java-httpcomponents-httpcore-nio
5647 (package (inherit java-httpcomponents-httpcore)
5648 (name "java-httpcomponents-httpcore-nio")
5649 (arguments
5650 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5651 #:phases
5652 (modify-phases %standard-phases
5653 (add-after 'unpack 'chdir
5654 (lambda _ (chdir "httpcore-nio") #t)))))
5655 (inputs
5656 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5657 ("java-hamcrest-core" ,java-hamcrest-core)
5658 ,@(package-inputs java-httpcomponents-httpcore)))
5659 (description "HttpCore is a set of low level HTTP transport components
5660that can be used to build custom client and server side HTTP services with a
5661minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5662on the classic Java I/O and non-blocking, event driven I/O model based on Java
5663NIO.
5664
5665This package provides the non-blocking I/O model library based on Java
5666NIO.")))
5667
5668(define-public java-httpcomponents-httpcore-ab
5669 (package (inherit java-httpcomponents-httpcore)
5670 (name "java-httpcomponents-httpcore-ab")
5671 (arguments
5672 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5673 #:phases
5674 (modify-phases %standard-phases
5675 (add-after 'unpack 'chdir
5676 (lambda _ (chdir "httpcore-ab") #t)))))
5677 (inputs
5678 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5679 ("java-commons-cli" ,java-commons-cli)
5680 ("java-hamcrest-core" ,java-hamcrest-core)
5681 ,@(package-inputs java-httpcomponents-httpcore)))
5682 (synopsis "Apache HttpCore benchmarking tool")
5683 (description "This package provides the HttpCore benchmarking tool. It is
5684an Apache AB clone based on HttpCore.")))
5685
5686(define-public java-httpcomponents-httpclient
5687 (package
5688 (name "java-httpcomponents-httpclient")
5689 (version "4.5.3")
5690 (source (origin
5691 (method url-fetch)
5692 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5693 "source/httpcomponents-client-"
5694 version "-src.tar.gz"))
5695 (sha256
5696 (base32
5697 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5698 (build-system ant-build-system)
5699 (arguments
5700 `(#:jar-name "httpcomponents-httpclient.jar"
5701 #:phases
5702 (modify-phases %standard-phases
5703 (add-after 'unpack 'chdir
5704 (lambda _ (chdir "httpclient") #t)))))
5705 (inputs
5706 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5707 ("java-commons-codec" ,java-commons-codec)
5708 ("java-hamcrest-core" ,java-hamcrest-core)
5709 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5710 ("java-mockito" ,java-mockito-1)
5711 ("java-junit" ,java-junit)))
5712 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5713 (synopsis "HTTP client library for Java")
5714 (description "Although the @code{java.net} package provides basic
5715functionality for accessing resources via HTTP, it doesn't provide the full
5716flexibility or functionality needed by many applications. @code{HttpClient}
5717seeks to fill this void by providing an efficient, up-to-date, and
5718feature-rich package implementing the client side of the most recent HTTP
5719standards and recommendations.")
5720 (license license:asl2.0)))
5721
5722(define-public java-httpcomponents-httpmime
5723 (package (inherit java-httpcomponents-httpclient)
5724 (name "java-httpcomponents-httpmime")
5725 (arguments
5726 `(#:jar-name "httpcomponents-httpmime.jar"
5727 #:phases
5728 (modify-phases %standard-phases
5729 (add-after 'unpack 'chdir
5730 (lambda _ (chdir "httpmime") #t)))))
5731 (inputs
5732 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5733 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5734 ("java-junit" ,java-junit)
5735 ("java-hamcrest-core" ,java-hamcrest-core)))))
5736
5737(define-public java-commons-net
5738 (package
5739 (name "java-commons-net")
5740 (version "3.6")
5741 (source (origin
5742 (method url-fetch)
5743 (uri (string-append "mirror://apache/commons/net/source/"
5744 "commons-net-" version "-src.tar.gz"))
5745 (sha256
5746 (base32
5747 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5748 (build-system ant-build-system)
5749 (arguments
5750 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5751 ;; should be "resources/examples/examples.properties"), but gets "null"
5752 ;; instead.
5753 #:tests? #f
5754 #:jar-name "commons-net.jar"))
5755 (native-inputs
5756 `(("java-junit" ,java-junit)
5757 ("java-hamcrest-core" ,java-hamcrest-core)))
5758 (home-page "https://commons.apache.org/net/")
5759 (synopsis "Client library for many basic Internet protocols")
5760 (description "The Apache Commons Net library implements the client side of
5761many basic Internet protocols. The purpose of the library is to provide
5762fundamental protocol access, not higher-level abstractions.")
5763 (license license:asl2.0)))
5764
5765(define-public java-jsch
5766 (package
5767 (name "java-jsch")
5768 (version "0.1.55")
5769 (source (origin
5770 (method url-fetch)
5771 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5772 version "/jsch-" version ".zip"))
5773 (sha256
5774 (base32
5775 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5776 (build-system ant-build-system)
5777 (arguments
5778 `(#:build-target "dist"
5779 #:tests? #f ; no tests included
5780 #:phases
5781 (modify-phases %standard-phases
5782 (replace 'install (install-jars "dist")))))
5783 (native-inputs
5784 `(("unzip" ,unzip)))
5785 (home-page "http://www.jcraft.com/jsch/")
5786 (synopsis "Pure Java implementation of SSH2")
5787 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5788to connect to an SSH server and use port forwarding, X11 forwarding, file
5789transfer, etc., and you can integrate its functionality into your own Java
5790programs.")
5791 (license license:bsd-3)))
5792
5793(define-public java-commons-compress
5794 (package
5795 (name "java-commons-compress")
5796 (version "1.13")
5797 (source (origin
5798 (method url-fetch)
5799 (uri (string-append "mirror://apache/commons/compress/source/"
5800 "commons-compress-" version "-src.tar.gz"))
5801 (sha256
5802 (base32
5803 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5804 (build-system ant-build-system)
5805 (arguments
5806 `(#:jar-name "commons-compress.jar"
5807 #:phases
5808 (modify-phases %standard-phases
5809 (add-after 'unpack 'delete-bad-tests
5810 (lambda _
5811 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5812 ;; FIXME: These tests really should not fail. Maybe they are
5813 ;; indicative of problems with our Java packaging work.
5814
5815 ;; This test fails with a null pointer exception.
5816 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5817 ;; This test fails to open test resources.
5818 (delete-file "archivers/zip/ExplodeSupportTest.java")
5819
5820 ;; FIXME: This test adds a dependency on powermock, which is hard to
5821 ;; package at this point.
5822 ;; https://github.com/powermock/powermock
5823 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5824 #t)))))
5825 (inputs
5826 `(("java-junit" ,java-junit)
5827 ("java-hamcrest-core" ,java-hamcrest-core)
5828 ("java-mockito" ,java-mockito-1)
5829 ("java-xz" ,java-xz)))
5830 (home-page "https://commons.apache.org/proper/commons-compress/")
5831 (synopsis "Java library for working with compressed files")
5832 (description "The Apache Commons Compress library defines an API for
5833working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5834Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5835 (license license:asl2.0)))
5836
5837(define-public java-commons-csv
5838 (package
5839 (name "java-commons-csv")
5840 (version "1.4")
5841 (source (origin
5842 (method url-fetch)
5843 (uri (string-append "mirror://apache/commons/csv/source/"
5844 "commons-csv-" version "-src.tar.gz"))
5845 (sha256
5846 (base32
5847 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5848 (build-system ant-build-system)
5849 (arguments
5850 `(#:jar-name "commons-csv.jar"
5851 #:source-dir "src/main/java"
5852 #:tests? #f)); FIXME: requires java-h2
5853 (inputs
5854 `(("java-hamcrest-core" ,java-hamcrest-core)
5855 ("java-commons-io" ,java-commons-io)
5856 ("java-commons-lang3" ,java-commons-lang3)
5857 ("junit" ,java-junit)))
5858 (home-page "https://commons.apache.org/proper/commons-csv/")
5859 (synopsis "Read and write CSV documents")
5860 (description "Commons CSV reads and writes files in variations of the Comma
5861Separated Value (CSV) format. The most common CSV formats are predefined in the
5862CSVFormat class:
5863
5864@itemize
5865@item Microsoft Excel
5866@item Informix UNLOAD
5867@item Informix UNLOAD CSV
5868@item MySQL
5869@item RFC 4180
5870@item TDF
5871@end itemize
5872
5873Custom formats can be created using a fluent style API.")
5874 (license license:asl2.0)))
5875
5876(define-public java-osgi-annotation
5877 (package
5878 (name "java-osgi-annotation")
5879 (version "6.0.0")
5880 (source (origin
5881 (method url-fetch)
5882 (uri (string-append "https://repo1.maven.org/maven2/"
5883 "org/osgi/org.osgi.annotation/" version "/"
5884 "org.osgi.annotation-" version "-sources.jar"))
5885 (sha256
5886 (base32
5887 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5888 (build-system ant-build-system)
5889 (arguments
5890 `(#:tests? #f ; no tests
5891 #:jar-name "osgi-annotation.jar"))
5892 (home-page "https://www.osgi.org")
5893 (synopsis "Annotation module of OSGi framework")
5894 (description
5895 "OSGi, for Open Services Gateway initiative framework, is a module system
5896and service platform for the Java programming language. This package contains
5897the OSGi annotation module, providing additional services to help dynamic
5898components.")
5899 (license license:asl2.0)))
5900
5901(define-public java-osgi-core
5902 (package
5903 (name "java-osgi-core")
5904 (version "6.0.0")
5905 (source (origin
5906 (method url-fetch)
5907 (uri (string-append "https://repo1.maven.org/maven2/"
5908 "org/osgi/org.osgi.core/" version "/"
5909 "org.osgi.core-" version "-sources.jar"))
5910 (sha256
5911 (base32
5912 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5913 (build-system ant-build-system)
5914 (arguments
5915 `(#:tests? #f ; no tests
5916 #:jar-name "osgi-core.jar"))
5917 (inputs
5918 `(("java-osgi-annotation" ,java-osgi-annotation)))
5919 (home-page "https://www.osgi.org")
5920 (synopsis "Core module of OSGi framework")
5921 (description
5922 "OSGi, for Open Services Gateway initiative framework, is a module system
5923and service platform for the Java programming language. This package contains
5924the OSGi Core module.")
5925 (license license:asl2.0)))
5926
5927(define-public java-osgi-service-event
5928 (package
5929 (name "java-osgi-service-event")
5930 (version "1.3.1")
5931 (source (origin
5932 (method url-fetch)
5933 (uri (string-append "https://repo1.maven.org/maven2/"
5934 "org/osgi/org.osgi.service.event/"
5935 version "/org.osgi.service.event-"
5936 version "-sources.jar"))
5937 (sha256
5938 (base32
5939 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5940 (build-system ant-build-system)
5941 (arguments
5942 `(#:tests? #f ; no tests
5943 #:jar-name "osgi-service-event.jar"))
5944 (inputs
5945 `(("java-osgi-annotation" ,java-osgi-annotation)
5946 ("java-osgi-core" ,java-osgi-core)))
5947 (home-page "https://www.osgi.org")
5948 (synopsis "OSGi service event module")
5949 (description
5950 "OSGi, for Open Services Gateway initiative framework, is a module system
5951and service platform for the Java programming language. This package contains
5952the OSGi @code{org.osgi.service.event} module.")
5953 (license license:asl2.0)))
5954
5955(define-public java-eclipse-osgi
5956 (package
5957 (name "java-eclipse-osgi")
5958 (version "3.11.3")
5959 (source (origin
5960 (method url-fetch)
5961 (uri (string-append "https://repo1.maven.org/maven2/"
5962 "org/eclipse/platform/org.eclipse.osgi/"
5963 version "/org.eclipse.osgi-"
5964 version "-sources.jar"))
5965 (sha256
5966 (base32
5967 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5968 (build-system ant-build-system)
5969 (arguments
5970 `(#:tests? #f ; no tests included
5971 #:jar-name "eclipse-equinox-osgi.jar"))
5972 (inputs
5973 `(("java-osgi-annotation" ,java-osgi-annotation)))
5974 (home-page "http://www.eclipse.org/equinox/")
5975 (synopsis "Eclipse Equinox OSGi framework")
5976 (description "This package provides an implementation of the OSGi Core
5977specification.")
5978 (license license:epl1.0)))
5979
5980(define-public java-eclipse-equinox-common
5981 (package
5982 (name "java-eclipse-equinox-common")
5983 (version "3.10.200")
5984 (source (origin
5985 (method url-fetch)
5986 (uri (string-append "https://repo1.maven.org/maven2/"
5987 "org/eclipse/platform/org.eclipse.equinox.common/"
5988 version "/org.eclipse.equinox.common-"
5989 version "-sources.jar"))
5990 (sha256
5991 (base32
5992 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5993 (build-system ant-build-system)
5994 (arguments
5995 `(#:tests? #f ; no tests included
5996 #:jar-name "eclipse-equinox-common.jar"))
5997 (inputs
5998 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5999 (home-page "http://www.eclipse.org/equinox/")
6000 (synopsis "Common Eclipse runtime")
6001 (description "This package provides the common Eclipse runtime.")
6002 (license license:epl1.0)))
6003
6004(define-public java-eclipse-core-jobs
6005 (package
6006 (name "java-eclipse-core-jobs")
6007 (version "3.8.0")
6008 (source (origin
6009 (method url-fetch)
6010 (uri (string-append "https://repo1.maven.org/maven2/"
6011 "org/eclipse/platform/org.eclipse.core.jobs/"
6012 version "/org.eclipse.core.jobs-"
6013 version "-sources.jar"))
6014 (sha256
6015 (base32
6016 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6017 (build-system ant-build-system)
6018 (arguments
6019 `(#:tests? #f ; no tests included
6020 #:jar-name "eclipse-core-jobs.jar"))
6021 (inputs
6022 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6023 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6024 (home-page "http://www.eclipse.org/equinox/")
6025 (synopsis "Eclipse jobs mechanism")
6026 (description "This package provides the Eclipse jobs mechanism.")
6027 (license license:epl1.0)))
6028
6029(define-public java-eclipse-equinox-registry
6030 (package
6031 (name "java-eclipse-equinox-registry")
6032 (version "3.6.100")
6033 (source (origin
6034 (method url-fetch)
6035 (uri (string-append "https://repo1.maven.org/maven2/"
6036 "org/eclipse/platform/org.eclipse.equinox.registry/"
6037 version "/org.eclipse.equinox.registry-"
6038 version "-sources.jar"))
6039 (sha256
6040 (base32
6041 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6042 (build-system ant-build-system)
6043 (arguments
6044 `(#:tests? #f ; no tests included
6045 #:jar-name "eclipse-equinox-registry.jar"))
6046 (inputs
6047 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6048 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6049 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6050 (home-page "http://www.eclipse.org/equinox/")
6051 (synopsis "Eclipse extension registry support")
6052 (description "This package provides support for the Eclipse extension
6053registry.")
6054 (license license:epl1.0)))
6055
6056(define-public java-eclipse-equinox-app
6057 (package
6058 (name "java-eclipse-equinox-app")
6059 (version "1.3.400")
6060 (source (origin
6061 (method url-fetch)
6062 (uri (string-append "https://repo1.maven.org/maven2/"
6063 "org/eclipse/platform/org.eclipse.equinox.app/"
6064 version "/org.eclipse.equinox.app-"
6065 version "-sources.jar"))
6066 (sha256
6067 (base32
6068 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6069 (build-system ant-build-system)
6070 (arguments
6071 `(#:tests? #f ; no tests included
6072 #:jar-name "eclipse-equinox-app.jar"))
6073 (inputs
6074 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6075 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6076 ("java-eclipse-osgi" ,java-eclipse-osgi)
6077 ("java-osgi-service-event" ,java-osgi-service-event)))
6078 (home-page "http://www.eclipse.org/equinox/")
6079 (synopsis "Equinox application container")
6080 (description "This package provides the Equinox application container for
6081Eclipse.")
6082 (license license:epl1.0)))
6083
6084(define-public java-eclipse-equinox-preferences
6085 (package
6086 (name "java-eclipse-equinox-preferences")
6087 (version "3.6.1")
6088 (source (origin
6089 (method url-fetch)
6090 (uri (string-append "https://repo1.maven.org/maven2/"
6091 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6092 version "/org.eclipse.equinox.preferences-"
6093 version "-sources.jar"))
6094 (sha256
6095 (base32
6096 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6097 (build-system ant-build-system)
6098 (arguments
6099 `(#:tests? #f ; no tests included
6100 #:jar-name "eclipse-equinox-preferences.jar"))
6101 (inputs
6102 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6103 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6104 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6105 (home-page "http://www.eclipse.org/equinox/")
6106 (synopsis "Eclipse preferences mechanism")
6107 (description "This package provides the Eclipse preferences mechanism with
6108the module @code{org.eclipse.equinox.preferences}.")
6109 (license license:epl1.0)))
6110
6111(define-public java-eclipse-core-contenttype
6112 (package
6113 (name "java-eclipse-core-contenttype")
6114 (version "3.5.100")
6115 (source (origin
6116 (method url-fetch)
6117 (uri (string-append "https://repo1.maven.org/maven2/"
6118 "org/eclipse/platform/org.eclipse.core.contenttype/"
6119 version "/org.eclipse.core.contenttype-"
6120 version "-sources.jar"))
6121 (sha256
6122 (base32
6123 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6124 (build-system ant-build-system)
6125 (arguments
6126 `(#:tests? #f ; no tests included
6127 #:jar-name "eclipse-core-contenttype.jar"))
6128 (inputs
6129 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6130 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6131 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6132 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6133 (home-page "http://www.eclipse.org/")
6134 (synopsis "Eclipse content mechanism")
6135 (description "This package provides the Eclipse content mechanism in the
6136@code{org.eclipse.core.contenttype} module.")
6137 (license license:epl1.0)))
6138
6139(define-public java-eclipse-core-runtime
6140 (package
6141 (name "java-eclipse-core-runtime")
6142 (version "3.15.100")
6143 (source (origin
6144 (method url-fetch)
6145 (uri (string-append "https://repo1.maven.org/maven2/"
6146 "org/eclipse/platform/org.eclipse.core.runtime/"
6147 version "/org.eclipse.core.runtime-"
6148 version "-sources.jar"))
6149 (sha256
6150 (base32
6151 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6152 (build-system ant-build-system)
6153 (arguments
6154 `(#:tests? #f ; no tests included
6155 #:jar-name "eclipse-core-runtime.jar"))
6156 (inputs
6157 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6158 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6159 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6160 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6161 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6162 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6163 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6164 (home-page "https://www.eclipse.org/")
6165 (synopsis "Eclipse core runtime")
6166 (description "This package provides the Eclipse core runtime with the
6167module @code{org.eclipse.core.runtime}.")
6168 (license license:epl1.0)))
6169
6170(define-public java-eclipse-core-filesystem
6171 (package
6172 (name "java-eclipse-core-filesystem")
6173 (version "1.6.1")
6174 (source (origin
6175 (method url-fetch)
6176 (uri (string-append "https://repo1.maven.org/maven2/"
6177 "org/eclipse/platform/org.eclipse.core.filesystem/"
6178 version "/org.eclipse.core.filesystem-"
6179 version "-sources.jar"))
6180 (sha256
6181 (base32
6182 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6183 (build-system ant-build-system)
6184 (arguments
6185 `(#:tests? #f ; no tests included
6186 #:jar-name "eclipse-core-filesystem.jar"))
6187 (inputs
6188 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6189 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6190 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6191 (home-page "https://www.eclipse.org/")
6192 (synopsis "Eclipse core file system")
6193 (description "This package provides the Eclipse core file system with the
6194module @code{org.eclipse.core.filesystem}.")
6195 (license license:epl1.0)))
6196
6197(define-public java-eclipse-core-expressions
6198 (package
6199 (name "java-eclipse-core-expressions")
6200 (version "3.5.100")
6201 (source (origin
6202 (method url-fetch)
6203 (uri (string-append "https://repo1.maven.org/maven2/"
6204 "org/eclipse/platform/org.eclipse.core.expressions/"
6205 version "/org.eclipse.core.expressions-"
6206 version "-sources.jar"))
6207 (sha256
6208 (base32
6209 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6210 (build-system ant-build-system)
6211 (arguments
6212 `(#:tests? #f ; no tests included
6213 #:jar-name "eclipse-core-expressions.jar"))
6214 (inputs
6215 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6216 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6217 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6218 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6219 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6220 (home-page "https://www.eclipse.org/")
6221 (synopsis "Eclipse core expression language")
6222 (description "This package provides the Eclipse core expression language
6223with the @code{org.eclipse.core.expressions} module.")
6224 (license license:epl1.0)))
6225
6226(define-public java-eclipse-core-variables
6227 (package
6228 (name "java-eclipse-core-variables")
6229 (version "3.3.0")
6230 (source (origin
6231 (method url-fetch)
6232 (uri (string-append "https://repo1.maven.org/maven2/"
6233 "org/eclipse/platform/org.eclipse.core.variables/"
6234 version "/org.eclipse.core.variables-"
6235 version "-sources.jar"))
6236 (sha256
6237 (base32
6238 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6239 (build-system ant-build-system)
6240 (arguments
6241 `(#:tests? #f ; no tests included
6242 #:jar-name "eclipse-core-variables.jar"))
6243 (inputs
6244 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6245 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6246 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6247 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6248 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6249 (home-page "https://www.eclipse.org/platform")
6250 (synopsis "Eclipse core variables")
6251 (description "This package provides the Eclipse core variables module
6252@code{org.eclipse.core.variables}.")
6253 (license license:epl1.0)))
6254
6255(define-public java-eclipse-ant-core
6256 (package
6257 (name "java-eclipse-ant-core")
6258 (version "3.4.100")
6259 (source (origin
6260 (method url-fetch)
6261 (uri (string-append "https://repo1.maven.org/maven2/"
6262 "org/eclipse/platform/org.eclipse.ant.core/"
6263 version "/org.eclipse.ant.core-"
6264 version "-sources.jar"))
6265 (sha256
6266 (base32
6267 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6268 (build-system ant-build-system)
6269 (arguments
6270 `(#:tests? #f ; no tests included
6271 #:jar-name "eclipse-ant-core.jar"))
6272 (inputs
6273 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6274 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6275 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6276 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6277 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6278 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6279 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6280 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6281 (home-page "https://www.eclipse.org/platform")
6282 (synopsis "Ant build tool core libraries")
6283 (description "This package provides the ant build tool core libraries with
6284the module @code{org.eclipse.ant.core}.")
6285 (license license:epl1.0)))
6286
6287(define-public java-eclipse-core-resources
6288 (package
6289 (name "java-eclipse-core-resources")
6290 (version "3.13.200")
6291 (source (origin
6292 (method url-fetch)
6293 (uri (string-append "https://repo1.maven.org/maven2/"
6294 "org/eclipse/platform/org.eclipse.core.resources/"
6295 version "/org.eclipse.core.resources-"
6296 version "-sources.jar"))
6297 (sha256
6298 (base32
6299 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6300 (build-system ant-build-system)
6301 (arguments
6302 `(#:tests? #f ; no tests included
6303 #:jar-name "eclipse-core-resources.jar"))
6304 (inputs
6305 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6306 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6307 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6308 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6309 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6310 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6311 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6312 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6313 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6314 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6315 (home-page "https://www.eclipse.org/")
6316 (synopsis "Eclipse core resource management")
6317 (description "This package provides the Eclipse core resource management
6318module @code{org.eclipse.core.resources}.")
6319 (license license:epl1.0)))
6320
6321(define-public java-eclipse-compare-core
6322 (package
6323 (name "java-eclipse-compare-core")
6324 (version "3.6.0")
6325 (source (origin
6326 (method url-fetch)
6327 (uri (string-append "https://repo1.maven.org/maven2/"
6328 "org/eclipse/platform/org.eclipse.compare.core/"
6329 version "/org.eclipse.compare.core-"
6330 version "-sources.jar"))
6331 (sha256
6332 (base32
6333 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6334 (build-system ant-build-system)
6335 (arguments
6336 `(#:tests? #f ; no tests included
6337 #:jar-name "eclipse-compare-core.jar"))
6338 (inputs
6339 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6340 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6341 ("java-eclipse-osgi" ,java-eclipse-osgi)
6342 ("java-icu4j" ,java-icu4j)))
6343 (home-page "https://www.eclipse.org/")
6344 (synopsis "Eclipse core compare support")
6345 (description "This package provides the Eclipse core compare support
6346module @code{org.eclipse.compare.core}.")
6347 (license license:epl1.0)))
6348
6349(define-public java-eclipse-team-core
6350 (package
6351 (name "java-eclipse-team-core")
6352 (version "3.8.0")
6353 (source (origin
6354 (method url-fetch)
6355 (uri (string-append "https://repo1.maven.org/maven2/"
6356 "org/eclipse/platform/org.eclipse.team.core/"
6357 version "/org.eclipse.team.core-"
6358 version "-sources.jar"))
6359 (sha256
6360 (base32
6361 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6362 (build-system ant-build-system)
6363 (arguments
6364 `(#:tests? #f ; no tests included
6365 #:jar-name "eclipse-team-core.jar"))
6366 (inputs
6367 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6368 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6369 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6370 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6371 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6372 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6373 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6374 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6375 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6376 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6377 (home-page "https://www.eclipse.org/platform")
6378 (synopsis "Eclipse team support core")
6379 (description "This package provides the Eclipse team support core module
6380@code{org.eclipse.team.core}.")
6381 (license license:epl1.0)))
6382
6383(define-public java-eclipse-core-commands
6384 (package
6385 (name "java-eclipse-core-commands")
6386 (version "3.8.1")
6387 (source (origin
6388 (method url-fetch)
6389 (uri (string-append "https://repo1.maven.org/maven2/"
6390 "org/eclipse/platform/org.eclipse.core.commands/"
6391 version "/org.eclipse.core.commands-"
6392 version "-sources.jar"))
6393 (sha256
6394 (base32
6395 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6396 (build-system ant-build-system)
6397 (arguments
6398 `(#:tests? #f ; no tests included
6399 #:jar-name "eclipse-core-commands.jar"))
6400 (inputs
6401 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6402 (home-page "https://www.eclipse.org/platform")
6403 (synopsis "Eclipse core commands")
6404 (description "This package provides Eclipse core commands in the module
6405@code{org.eclipse.core.commands}.")
6406 (license license:epl1.0)))
6407
6408(define-public java-eclipse-text
6409 (package
6410 (name "java-eclipse-text")
6411 (version "3.6.0")
6412 (source (origin
6413 (method url-fetch)
6414 (uri (string-append "https://repo1.maven.org/maven2/"
6415 "org/eclipse/platform/org.eclipse.text/"
6416 version "/org.eclipse.text-"
6417 version "-sources.jar"))
6418 (sha256
6419 (base32
6420 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6421 (build-system ant-build-system)
6422 (arguments
6423 `(#:tests? #f ; no tests included
6424 #:jar-name "eclipse-text.jar"
6425 #:phases
6426 (modify-phases %standard-phases
6427 ;; When creating a new category we must make sure that the new list
6428 ;; matches List<Position>. By default it seems to be too generic
6429 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6430 ;; Without this we get this error:
6431 ;;
6432 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6433 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6434 ;; [javac] fPositions.put(category, new ArrayList<>());
6435 ;; [javac] ^
6436 ;; [javac] required: String,List<Position>
6437 ;; [javac] found: String,ArrayList<Object>
6438 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6439 ;; to List<Position> by method invocation conversion
6440 ;; [javac] where K,V are type-variables:
6441 ;; [javac] K extends Object declared in interface Map
6442 ;; [javac] V extends Object declared in interface Map
6443 ;;
6444 ;; I don't know if this is a good fix. I suspect it is not, but it
6445 ;; seems to work.
6446 (add-after 'unpack 'fix-compilation-error
6447 (lambda _
6448 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6449 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6450 "Positions.put(category, new ArrayList<Position>());"))
6451 #t)))))
6452 (inputs
6453 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6454 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6455 ("java-icu4j" ,java-icu4j)))
6456 (home-page "http://www.eclipse.org/platform")
6457 (synopsis "Eclipse text library")
6458 (description "Platform Text is part of the Platform UI project and
6459provides the basic building blocks for text and text editors within Eclipse
6460and contributes the Eclipse default text editor.")
6461 (license license:epl1.0)))
6462
6463(define-public java-eclipse-jdt-core
6464 (package
6465 (name "java-eclipse-jdt-core")
6466 (version "3.16.0")
6467 (source (origin
6468 (method url-fetch)
6469 (uri (string-append "https://repo1.maven.org/maven2/"
6470 "org/eclipse/jdt/org.eclipse.jdt.core/"
6471 version "/org.eclipse.jdt.core-"
6472 version "-sources.jar"))
6473 (sha256
6474 (base32
6475 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6476 (build-system ant-build-system)
6477 (arguments
6478 `(#:tests? #f ; no tests included
6479 #:jar-name "eclipse-jdt-core.jar"
6480 #:phases
6481 (modify-phases %standard-phases
6482 (add-after 'unpack 'move-sources
6483 (lambda _
6484 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6485 (for-each (lambda (file)
6486 (install-file file (string-append "../" (dirname file))))
6487 (find-files "." ".*")))
6488 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6489 #t))
6490 (add-before 'build 'copy-resources
6491 (lambda _
6492 (with-directory-excursion "src"
6493 (for-each (lambda (file)
6494 (install-file file (string-append "../build/classes/" (dirname file))))
6495 (find-files "." ".*.(props|properties|rsc)")))
6496 #t)))))
6497 (inputs
6498 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6499 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6500 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6501 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6502 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6503 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6504 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6505 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6506 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6507 ("java-eclipse-osgi" ,java-eclipse-osgi)
6508 ("java-eclipse-text" ,java-eclipse-text)))
6509 (home-page "https://www.eclipse.org/jdt")
6510 (synopsis "Java development tools core libraries")
6511 (description "This package provides the core libraries of the Eclipse Java
6512development tools.")
6513 (license license:epl1.0)))
6514
6515(define-public java-eclipse-jdt-compiler-apt
6516 (package
6517 (name "java-eclipse-jdt-compiler-apt")
6518 (version "1.3.400")
6519 (source (origin
6520 (method url-fetch)
6521 (uri (string-append "https://repo1.maven.org/maven2/"
6522 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6523 version "/org.eclipse.jdt.compiler.apt-"
6524 version "-sources.jar"))
6525 (sha256
6526 (base32
6527 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6528 (build-system ant-build-system)
6529 (arguments
6530 `(#:tests? #f ; no tests included
6531 #:jar-name "eclipse-jdt-compiler-apt.jar"
6532 #:jdk ,openjdk11))
6533 (inputs
6534 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6535 (home-page "https://www.eclipse.org/jdt/apt/")
6536 (synopsis "Annotation processing tool")
6537 (description "APT stands for Annotation Processing Tool. APT provides a
6538means for generating files and compiling new Java classes based on annotations
6539found in your source code.")
6540 (license license:epl2.0)))
6541
6542(define-public java-javax-mail
6543 (package
6544 (name "java-javax-mail")
6545 (version "1.5.6")
6546 (source (origin
6547 (method url-fetch)
6548 (uri (string-append "https://repo1.maven.org/maven2/"
6549 "com/sun/mail/javax.mail/"
6550 version "/javax.mail-"
6551 version "-sources.jar"))
6552 (sha256
6553 (base32
6554 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6555 (build-system ant-build-system)
6556 (arguments
6557 `(#:tests? #f ; no tests
6558 #:jar-name "javax-mail.jar"))
6559 (home-page "https://javamail.java.net")
6560 (synopsis "Reference implementation of the JavaMail API")
6561 (description
6562 "This package provides versions of the JavaMail API implementation, IMAP,
6563SMTP, and POP3 service providers, some examples, and documentation for the
6564JavaMail API.")
6565 ;; GPLv2 only with "classpath exception".
6566 (license license:gpl2)))
6567
6568(define-public java-log4j-api
6569 (package
6570 (name "java-log4j-api")
6571 (version "2.4.1")
6572 (source (origin
6573 (method url-fetch)
6574 (uri (string-append "mirror://apache/logging/log4j/" version
6575 "/apache-log4j-" version "-src.tar.gz"))
6576 (sha256
6577 (base32
6578 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6579 (build-system ant-build-system)
6580 (arguments
6581 `(#:tests? #f ; tests require unpackaged software
6582 #:jar-name "log4j-api.jar"
6583 #:make-flags
6584 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6585 "/share/java"))
6586 #:phases
6587 (modify-phases %standard-phases
6588 (add-after 'unpack 'enter-dir
6589 (lambda _ (chdir "log4j-api") #t))
6590 ;; FIXME: The tests require additional software that has not been
6591 ;; packaged yet, such as
6592 ;; * org.apache.maven
6593 ;; * org.apache.felix
6594 (add-after 'enter-dir 'delete-tests
6595 (lambda _ (delete-file-recursively "src/test") #t)))))
6596 (inputs
6597 `(("java-osgi-core" ,java-osgi-core)
6598 ("java-hamcrest-core" ,java-hamcrest-core)
6599 ("java-junit" ,java-junit)))
6600 (home-page "https://logging.apache.org/log4j/2.x/")
6601 (synopsis "API module of the Log4j logging framework for Java")
6602 (description
6603 "This package provides the API module of the Log4j logging framework for
6604Java.")
6605 (license license:asl2.0)))
6606
6607(define-public java-log4j-core
6608 (package
6609 (inherit java-log4j-api)
6610 (name "java-log4j-core")
6611 (inputs
6612 `(("java-osgi-core" ,java-osgi-core)
6613 ("java-hamcrest-core" ,java-hamcrest-core)
6614 ("java-log4j-api" ,java-log4j-api)
6615 ("java-mail" ,java-mail)
6616 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6617 ("java-lmax-disruptor" ,java-lmax-disruptor)
6618 ("java-kafka" ,java-kafka-clients)
6619 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6620 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6621 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6622 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6623 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6624 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6625 ("java-commons-compress" ,java-commons-compress)
6626 ("java-commons-csv" ,java-commons-csv)
6627 ("java-jeromq" ,java-jeromq)
6628 ("java-junit" ,java-junit)))
6629 (native-inputs
6630 `(("hamcrest" ,java-hamcrest-all)
6631 ("java-commons-io" ,java-commons-io)
6632 ("java-commons-lang3" ,java-commons-lang3)
6633 ("slf4j" ,java-slf4j-api)))
6634 (arguments
6635 `(#:tests? #f ; tests require more dependencies
6636 #:test-dir "src/test"
6637 #:source-dir "src/main/java"
6638 #:jar-name "log4j-core.jar"
6639 #:jdk ,icedtea-8
6640 #:make-flags
6641 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6642 "/share/java"))
6643 #:phases
6644 (modify-phases %standard-phases
6645 (add-after 'unpack 'enter-dir
6646 (lambda _ (chdir "log4j-core") #t)))))
6647 (synopsis "Core component of the Log4j framework")
6648 (description "This package provides the core component of the Log4j
6649logging framework for Java.")))
6650
6651(define-public java-log4j-1.2-api
6652 (package
6653 (inherit java-log4j-api)
6654 (name "java-log4j-1.2-api")
6655 (arguments
6656 `(#:jar-name "java-log4j-1.2-api.jar"
6657 #:source-dir "log4j-1.2-api/src/main/java"
6658 #:jdk ,icedtea-8
6659 ;; Tests require maven-model (and other maven subprojects), which is a
6660 ;; cyclic dependency.
6661 #:tests? #f))
6662 (inputs
6663 `(("log4j-api" ,java-log4j-api)
6664 ("log4j-core" ,java-log4j-core)
6665 ("osgi-core" ,java-osgi-core)
6666 ("eclipse-osgi" ,java-eclipse-osgi)
6667 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6668
6669(define-public java-commons-cli
6670 (package
6671 (name "java-commons-cli")
6672 (version "1.4")
6673 (source (origin
6674 (method url-fetch)
6675 (uri (string-append "mirror://apache/commons/cli/source/"
6676 "commons-cli-" version "-src.tar.gz"))
6677 (sha256
6678 (base32
6679 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6680 (build-system ant-build-system)
6681 ;; TODO: javadoc
6682 (arguments
6683 `(#:jar-name "commons-cli.jar"))
6684 (native-inputs
6685 `(("java-junit" ,java-junit)
6686 ("java-hamcrest-core" ,java-hamcrest-core)))
6687 (home-page "https://commons.apache.org/cli/")
6688 (synopsis "Command line arguments and options parsing library")
6689 (description "The Apache Commons CLI library provides an API for parsing
6690command line options passed to programs. It is also able to print help
6691messages detailing the options available for a command line tool.
6692
6693Commons CLI supports different types of options:
6694
6695@itemize
6696@item POSIX like options (ie. tar -zxvf foo.tar.gz)
6697@item GNU like long options (ie. du --human-readable --max-depth=1)
6698@item Java like properties (ie. java -Djava.awt.headless=true Foo)
6699@item Short options with value attached (ie. gcc -O2 foo.c)
6700@item long options with single hyphen (ie. ant -projecthelp)
6701@end itemize
6702
6703This is a part of the Apache Commons Project.")
6704 (license license:asl2.0)))
6705
6706(define-public java-commons-codec
6707 (package
6708 (name "java-commons-codec")
6709 (version "1.10")
6710 (source (origin
6711 (method url-fetch)
6712 (uri (string-append "mirror://apache/commons/codec/source/"
6713 "commons-codec-" version "-src.tar.gz"))
6714 (sha256
6715 (base32
6716 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6717 (build-system ant-build-system)
6718 (outputs '("out" "doc"))
6719 (arguments
6720 `(#:test-target "test"
6721 #:make-flags
6722 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6723 (junit (assoc-ref %build-inputs "java-junit")))
6724 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6725 (string-append "-Dhamcrest.jar=" hamcrest
6726 "/share/java/hamcrest-core.jar")
6727 ;; Do not append version to jar.
6728 "-Dfinal.name=commons-codec"))
6729 #:phases
6730 (modify-phases %standard-phases
6731 (add-after 'build 'build-javadoc ant-build-javadoc)
6732 (replace 'install (install-jars "dist"))
6733 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6734 (native-inputs
6735 `(("java-junit" ,java-junit)
6736 ("java-hamcrest-core" ,java-hamcrest-core)))
6737 (home-page "https://commons.apache.org/codec/")
6738 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6739 (description "The codec package contains simple encoder and decoders for
6740various formats such as Base64 and Hexadecimal. In addition to these widely
6741used encoders and decoders, the codec package also maintains a collection of
6742phonetic encoding utilities.
6743
6744This is a part of the Apache Commons Project.")
6745 (license license:asl2.0)))
6746
6747(define-public java-commons-daemon
6748 (package
6749 (name "java-commons-daemon")
6750 (version "1.1.0")
6751 (source (origin
6752 (method url-fetch)
6753 (uri (string-append "mirror://apache/commons/daemon/source/"
6754 "commons-daemon-" version "-src.tar.gz"))
6755 (sha256
6756 (base32
6757 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
6758 (build-system ant-build-system)
6759 (arguments
6760 `(#:test-target "test"
6761 #:phases
6762 (modify-phases %standard-phases
6763 (add-after 'build 'build-javadoc ant-build-javadoc)
6764 (replace 'install (install-jars "dist"))
6765 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6766 (native-inputs
6767 `(("java-junit" ,java-junit)))
6768 (home-page "https://commons.apache.org/daemon/")
6769 (synopsis "Library to launch Java applications as daemons")
6770 (description "The Daemon package from Apache Commons can be used to
6771implement Java applications which can be launched as daemons. For example the
6772program will be notified about a shutdown so that it can perform cleanup tasks
6773before its process of execution is destroyed by the operation system.
6774
6775This package contains the Java library. You will also need the actual binary
6776for your architecture which is provided by the jsvc package.
6777
6778This is a part of the Apache Commons Project.")
6779 (license license:asl2.0)))
6780
6781(define-public java-javaewah
6782 (package
6783 (name "java-javaewah")
6784 (version "1.1.6")
6785 (source (origin
6786 (method git-fetch)
6787 (uri (git-reference
6788 (url "https://github.com/lemire/javaewah/")
6789 (commit (string-append "JavaEWAH-" version))))
6790 (file-name (git-file-name name version))
6791 (sha256
6792 (base32
6793 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
6794 (build-system ant-build-system)
6795 (arguments `(#:jar-name "javaewah.jar"))
6796 (inputs
6797 `(("java-junit" ,java-junit)
6798 ("java-hamcrest-core" ,java-hamcrest-core)))
6799 (home-page "https://github.com/lemire/javaewah")
6800 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6801 (description "This is a word-aligned compressed variant of the Java
6802@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6803compression scheme. It can be used to implement bitmap indexes.
6804
6805The goal of word-aligned compression is not to achieve the best compression,
6806but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6807cycles, maybe at the expense of storage. However, the EWAH scheme is always
6808more efficient storage-wise than an uncompressed bitmap (as implemented in the
6809@code{BitSet} class by Sun).")
6810 ;; GPL2.0 derivates are explicitly allowed.
6811 (license license:asl2.0)))
6812
6813(define-public java-slf4j-api
6814 (package
6815 (name "java-slf4j-api")
6816 (version "1.7.25")
6817 (source (origin
6818 (method url-fetch)
6819 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6820 version ".tar.gz"))
6821 (sha256
6822 (base32
6823 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6824 (modules '((guix build utils)))
6825 ;; Delete bundled jars.
6826 (snippet
6827 '(begin
6828 (for-each delete-file (find-files "." "\\.jar$"))
6829 #t))))
6830 (build-system ant-build-system)
6831 (arguments
6832 `(#:jar-name "slf4j-api.jar"
6833 #:source-dir "slf4j-api/src/main"
6834 #:test-dir "slf4j-api/src/test"
6835 #:phases
6836 (modify-phases %standard-phases
6837 (add-after 'build 'regenerate-jar
6838 (lambda _
6839 ;; pom.xml ignores these files in the jar creation process. If we don't,
6840 ;; we get the error "This code should have never made it into slf4j-api.jar"
6841 (delete-file-recursively "build/classes/org/slf4j/impl")
6842 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6843 "build/classes" ".")))
6844 (add-before 'check 'dont-test-abstract-classes
6845 (lambda _
6846 ;; abstract classes are not meant to be run with junit
6847 (substitute* "build.xml"
6848 (("<include name=\"\\*\\*/\\*Test.java\" />")
6849 (string-append "<include name=\"**/*Test.java\" />"
6850 "<exclude name=\"**/MultithreadedInitializationTest"
6851 ".java\" />")))
6852 #t)))))
6853 (inputs
6854 `(("java-junit" ,java-junit)
6855 ("java-hamcrest-core" ,java-hamcrest-core)))
6856 (home-page "https://www.slf4j.org/")
6857 (synopsis "Simple logging facade for Java")
6858 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6859simple facade or abstraction for various logging
6860frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6861allowing the end user to plug in the desired logging framework at deployment
6862time.")
6863 (license license:expat)))
6864
6865(define java-slf4j-api-bootstrap
6866 (package
6867 (inherit java-slf4j-api)
6868 (name "java-slf4j-api-bootstrap")
6869 (inputs `())
6870 (arguments
6871 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6872 ((#:tests? _ #f) #f)))))
6873
6874(define-public java-slf4j-simple
6875 (package
6876 (name "java-slf4j-simple")
6877 (version "1.7.25")
6878 (source (package-source java-slf4j-api))
6879 (build-system ant-build-system)
6880 (arguments
6881 `(#:jar-name "slf4j-simple.jar"
6882 #:source-dir "slf4j-simple/src/main"
6883 #:test-dir "slf4j-simple/src/test"
6884 #:phases
6885 (modify-phases %standard-phases
6886 ;; The tests need some test classes from slf4j-api
6887 (add-before 'check 'build-slf4j-api-test-helpers
6888 (lambda _
6889 ;; Add current dir to CLASSPATH ...
6890 (setenv "CLASSPATH"
6891 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6892 ;; ... and build test helper classes here:
6893 (apply invoke
6894 `("javac" "-d" "."
6895 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6896 (inputs
6897 `(("java-junit" ,java-junit)
6898 ("java-hamcrest-core" ,java-hamcrest-core)
6899 ("java-slf4j-api" ,java-slf4j-api)))
6900 (home-page "https://www.slf4j.org/")
6901 (synopsis "Simple implementation of simple logging facade for Java")
6902 (description "SLF4J binding for the Simple implementation, which outputs
6903all events to System.err. Only messages of level INFO and higher are
6904printed.")
6905 (license license:expat)))
6906
6907(define-public antlr2
6908 (package
6909 (name "antlr2")
6910 (version "2.7.7")
6911 (source (origin
6912 (method url-fetch)
6913 (uri (string-append "https://www.antlr2.org/download/antlr-"
6914 version ".tar.gz"))
6915 (sha256
6916 (base32
6917 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6918 (modules '((guix build utils)))
6919 (snippet
6920 '(begin
6921 (delete-file "antlr.jar")
6922 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6923 (("#include <map>")
6924 (string-append
6925 "#include <map>\n"
6926 "#define EOF (-1)\n"
6927 "#include <strings.h>")))
6928 (substitute* "configure"
6929 (("/bin/sh") "sh"))
6930 #t))))
6931 (build-system gnu-build-system)
6932 (arguments
6933 `(#:tests? #f ; no test target
6934 #:imported-modules ((guix build ant-build-system)
6935 (guix build syscalls)
6936 ,@%gnu-build-system-modules)
6937 #:modules (((guix build ant-build-system) #:prefix ant:)
6938 (guix build gnu-build-system)
6939 (guix build utils))
6940 #:phases
6941 (modify-phases %standard-phases
6942 (add-after 'install 'strip-jar-timestamps
6943 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6944 (add-before 'configure 'fix-timestamp
6945 (lambda _
6946 (substitute* "configure"
6947 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6948 #t))
6949 (add-after 'configure 'fix-bin-ls
6950 (lambda _
6951 (substitute* (find-files "." "Makefile")
6952 (("/bin/ls") "ls"))
6953 #t)))))
6954 (native-inputs
6955 `(("which" ,which)
6956 ("zip" ,zip)
6957 ("java" ,icedtea "jdk")))
6958 (inputs
6959 `(("java" ,icedtea)))
6960 (home-page "https://www.antlr2.org")
6961 (synopsis "Framework for constructing recognizers, compilers, and translators")
6962 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6963is a language tool that provides a framework for constructing recognizers,
6964compilers, and translators from grammatical descriptions containing Java, C#,
6965C++, or Python actions. ANTLR provides excellent support for tree construction,
6966tree walking, and translation.")
6967 (license license:public-domain)))
6968
6969(define-public java-stringtemplate-3
6970 (package
6971 (name "java-stringtemplate")
6972 (version "3.2.1")
6973 (source (origin
6974 (method url-fetch)
6975 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6976 "gh-pages/download/stringtemplate-"
6977 version ".tar.gz"))
6978 (sha256
6979 (base32
6980 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6981 (build-system ant-build-system)
6982 (arguments
6983 `(#:jar-name (string-append ,name "-" ,version ".jar")
6984 #:test-dir "test"
6985 #:modules ((guix build ant-build-system)
6986 (guix build utils)
6987 (srfi srfi-1))
6988 #:phases
6989 (modify-phases %standard-phases
6990 (add-before 'check 'fix-tests
6991 (lambda _
6992 (substitute* "build.xml"
6993 (("\\$\\{test.home\\}/java")
6994 "${test.home}/org"))
6995 #t))
6996 (add-before 'build 'generate-grammar
6997 (lambda _
6998 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6999 (for-each (lambda (file)
7000 (format #t "~a\n" file)
7001 (invoke "antlr" file))
7002 '("template.g" "angle.bracket.template.g" "action.g"
7003 "eval.g" "group.g" "interface.g")))
7004 #t)))))
7005 (native-inputs
7006 `(("antlr" ,antlr2)
7007 ("java-junit" ,java-junit)))
7008 (home-page "https://www.stringtemplate.org")
7009 (synopsis "Template engine to generate formatted text output")
7010 (description "StringTemplate is a java template engine (with ports for C#,
7011Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7012or any other formatted text output. StringTemplate is particularly good at
7013code generators, multiple site skins, and internationalization / localization.
7014StringTemplate also powers ANTLR.")
7015 (license license:bsd-3)))
7016
7017;; antlr3 is partially written using antlr3 grammar files. It also depends on
7018;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7019;; files and uses antlr3 at runtime. The latest version requires a recent version
7020;; of antlr3 at runtime.
7021;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7022;; This version of ST4 is sufficient for the latest antlr3.
7023;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7024;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7025;; against the latest ST4.
7026;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7027;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7028;; only grammar files with the antlr2 syntax.
7029;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7030
7031(define-public java-stringtemplate
7032 (package (inherit java-stringtemplate-3)
7033 (name "java-stringtemplate")
7034 (version "4.0.8")
7035 (source (origin
7036 (method url-fetch)
7037 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7038 version ".tar.gz"))
7039 (file-name (string-append name "-" version ".tar.gz"))
7040 (sha256
7041 (base32
7042 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7043 (build-system ant-build-system)
7044 (arguments
7045 `(#:jar-name (string-append ,name "-" ,version ".jar")
7046 #:tests? #f ; FIXME: tests fail for unknown reasons
7047 #:test-dir "test"
7048 #:modules ((guix build ant-build-system)
7049 (guix build utils)
7050 (srfi srfi-1))
7051 #:phases
7052 (modify-phases %standard-phases
7053 (add-before 'check 'fix-test-target
7054 (lambda _
7055 (substitute* "build.xml"
7056 (("\\$\\{test.home\\}/java") "${test.home}/")
7057 (("\\*Test.java") "Test*.java"))
7058 #t))
7059 (add-before 'build 'generate-grammar
7060 (lambda _
7061 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7062 (for-each (lambda (file)
7063 (format #t "~a\n" file)
7064 (invoke "antlr3" file))
7065 '("STParser.g" "Group.g" "CodeGenerator.g")))
7066 #t)))))
7067 (inputs
7068 `(("antlr3" ,antlr3-bootstrap)
7069 ("antlr2" ,antlr2)
7070 ("java-stringtemplate" ,java-stringtemplate-3)
7071 ("java-junit" ,java-junit)))))
7072
7073(define java-stringtemplate-4.0.6
7074 (package (inherit java-stringtemplate)
7075 (name "java-stringtemplate")
7076 (version "4.0.6")
7077 (source (origin
7078 (method url-fetch)
7079 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7080 version ".tar.gz"))
7081 (file-name (string-append name "-" version ".tar.gz"))
7082 (sha256
7083 (base32
7084 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7085 (inputs
7086 `(("antlr3" ,antlr3-3.3)
7087 ("antlr2" ,antlr2)
7088 ("java-stringtemplate" ,java-stringtemplate-3)))))
7089
7090(define-public antlr3
7091 (package
7092 (name "antlr3")
7093 (version "3.5.2")
7094 (source (origin
7095 (method git-fetch)
7096 (uri (git-reference
7097 (url "https://github.com/antlr/antlr3")
7098 (commit version)))
7099 (file-name (git-file-name name version))
7100 (sha256
7101 (base32
7102 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7103 (build-system ant-build-system)
7104 (arguments
7105 `(#:jar-name (string-append ,name "-" ,version ".jar")
7106 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7107 #:tests? #f
7108 #:phases
7109 (modify-phases %standard-phases
7110 (add-after 'install 'bin-install
7111 (lambda* (#:key inputs outputs #:allow-other-keys)
7112 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7113 (bin (string-append (assoc-ref outputs "out") "/bin")))
7114 (mkdir-p bin)
7115 (with-output-to-file (string-append bin "/antlr3")
7116 (lambda _
7117 (display
7118 (string-append "#!" (which "sh") "\n"
7119 "java -cp " jar "/" ,name "-" ,version ".jar:"
7120 (string-concatenate
7121 (find-files (assoc-ref inputs "stringtemplate")
7122 ".*\\.jar"))
7123 ":"
7124 (string-concatenate
7125 (find-files (assoc-ref inputs "stringtemplate4")
7126 ".*\\.jar"))
7127 ":"
7128 (string-concatenate
7129 (find-files (string-append
7130 (assoc-ref inputs "antlr")
7131 "/lib")
7132 ".*\\.jar"))
7133 " org.antlr.Tool $*"))))
7134 (chmod (string-append bin "/antlr3") #o755))
7135 #t))
7136 (add-before 'build 'generate-grammar
7137 (lambda _
7138 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7139 (for-each (lambda (file)
7140 (display file)
7141 (newline)
7142 (invoke "antlr3" file))
7143 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7144 "AssignTokenTypesWalker.g"
7145 "ActionTranslator.g" "TreeToNFAConverter.g"
7146 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7147 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7148 (substitute* "ANTLRParser.java"
7149 (("public Object getTree") "public GrammarAST getTree"))
7150 (substitute* "ANTLRv3Parser.java"
7151 (("public Object getTree") "public CommonTree getTree"))
7152 (chdir "../../../../../java")
7153 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7154 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7155import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7156 (substitute* "org/antlr/tool/ErrorManager.java"
7157 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7158 (chdir "../../../..")
7159 #t))
7160 (add-before 'build 'fix-build-xml
7161 (lambda _
7162 (substitute* "build.xml"
7163 (("target name=\"compile\">")
7164 "target name=\"compile\">
7165<copy todir=\"${classes.dir}\">
7166<fileset dir=\"tool/src/main/resources\">
7167<include name=\"**/*.stg\"/>
7168<include name=\"**/*.st\"/>
7169<include name=\"**/*.sti\"/>
7170<include name=\"**/STLexer.tokens\"/>
7171</fileset>
7172</copy>"))
7173 #t)))))
7174 (native-inputs
7175 `(("antlr" ,antlr2)
7176 ("antlr3" ,antlr3-bootstrap)))
7177 (inputs
7178 `(("junit" ,java-junit)
7179 ("stringtemplate" ,java-stringtemplate-3)
7180 ("stringtemplate4" ,java-stringtemplate)))
7181 (propagated-inputs
7182 `(("stringtemplate" ,java-stringtemplate-3)
7183 ("antlr" ,antlr2)
7184 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7185 (home-page "https://www.antlr3.org")
7186 (synopsis "Framework for constructing recognizers, compilers, and translators")
7187 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7188is a language tool that provides a framework for constructing recognizers,
7189compilers, and translators from grammatical descriptions containing Java, C#,
7190C++, or Python actions. ANTLR provides excellent support for tree construction,
7191tree walking, and translation.")
7192 (license license:bsd-3)))
7193
7194(define antlr3-bootstrap
7195 (package
7196 (inherit antlr3)
7197 (name "antlr3-bootstrap")
7198 (native-inputs
7199 `(("antlr" ,antlr2)
7200 ("antlr3" ,antlr3-3.3)))
7201 (inputs
7202 `(("junit" ,java-junit)))))
7203
7204(define-public antlr3-3.3
7205 (package
7206 (inherit antlr3)
7207 (name "antlr3")
7208 (version "3.3")
7209 (source (origin
7210 (method url-fetch)
7211 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7212 "gh-pages/download/antlr-"
7213 version ".tar.gz"))
7214 (sha256
7215 (base32
7216 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7217 (patches
7218 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7219 (arguments
7220 `(#:jar-name (string-append ,name "-" ,version ".jar")
7221 #:source-dir (string-join '("tool/src/main/java"
7222 "runtime/Java/src/main/java"
7223 "tool/src/main/antlr2"
7224 "tool/src/main/antlr3")
7225 ":")
7226 #:tests? #f ; FIXME: tests seem to require maven plugin
7227 #:modules ((guix build ant-build-system)
7228 (guix build utils)
7229 (srfi srfi-1))
7230 #:phases
7231 (modify-phases %standard-phases
7232 (add-after 'install 'bin-install
7233 (lambda* (#:key inputs outputs #:allow-other-keys)
7234 (let* ((out (assoc-ref outputs "out"))
7235 (jar (string-append out "/share/java"))
7236 (bin (string-append out "/bin")))
7237 (mkdir-p bin)
7238 (with-output-to-file (string-append bin "/antlr3")
7239 (lambda _
7240 (display
7241 (string-append
7242 "#!" (which "sh") "\n"
7243 "java -cp " jar "/antlr3-3.3.jar:"
7244 (string-join
7245 (append (find-files (assoc-ref inputs "java-stringtemplate")
7246 ".*\\.jar$")
7247 (find-files (string-append (assoc-ref inputs "antlr")
7248 "/lib")
7249 ".*\\.jar$"))
7250 ":")
7251 " org.antlr.Tool $*"))))
7252 (chmod (string-append bin "/antlr3") #o755)
7253 #t)))
7254 (add-before 'build 'generate-grammar
7255 (lambda _
7256 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7257 (("import org.antlr.grammar.v2.\\*;")
7258 "import org.antlr.grammar.v2.*;\n
7259import org.antlr.grammar.v2.TreeToNFAConverter;\n
7260import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
7261import org.antlr.grammar.v2.ANTLRTreePrinter;"))
7262 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7263 (for-each (lambda (file)
7264 (format #t "~a\n" file)
7265 (invoke "antlr" file))
7266 '("antlr.g" "antlr.print.g" "assign.types.g"
7267 "buildnfa.g" "codegen.g" "define.g")))
7268 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7269 (for-each (lambda (file)
7270 (format #t "~a\n" file)
7271 (invoke "antlr3" file))
7272 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7273 "ANTLRv3Tree.g")))
7274 #t))
7275 (add-before 'build 'fix-build-xml
7276 (lambda _
7277 (substitute* "build.xml"
7278 (("target name=\"compile\">")
7279 "target name=\"compile\">
7280<copy todir=\"${classes.dir}\">
7281<fileset dir=\"tool/src/main/resources\">
7282<include name=\"**/*.stg\"/>
7283<include name=\"**/*.st\"/>
7284<include name=\"**/*.sti\"/>
7285<include name=\"**/STLexer.tokens\"/>
7286</fileset>
7287</copy>"))
7288 #t)))))
7289 (native-inputs
7290 `(("antlr" ,antlr2)
7291 ("antlr3" ,antlr3-3.1)))
7292 (inputs
7293 `(("junit" ,java-junit)))
7294 (propagated-inputs
7295 `(("java-stringtemplate" ,java-stringtemplate-3)
7296 ("antlr" ,antlr2)
7297 ("antlr3" ,antlr3-3.1)))))
7298
7299(define-public antlr3-3.1
7300 (package
7301 (inherit antlr3)
7302 (version "3.1")
7303 (source (origin
7304 (method url-fetch)
7305 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7306 "gh-pages/download/antlr-"
7307 version ".tar.gz"))
7308 (sha256
7309 (base32
7310 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7311 (patches
7312 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7313 (arguments
7314 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7315 #:source-dir "src:runtime/Java/src"
7316 #:tests? #f
7317 #:phases
7318 (modify-phases %standard-phases
7319 (add-after 'install 'bin-install
7320 (lambda* (#:key inputs outputs #:allow-other-keys)
7321 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7322 (bin (string-append (assoc-ref outputs "out") "/bin")))
7323 (mkdir-p bin)
7324 (with-output-to-file (string-append bin "/antlr3")
7325 (lambda _
7326 (display
7327 (string-append "#!" (which "sh") "\n"
7328 "java -cp " jar "/antlr3-3.1.jar:"
7329 (string-concatenate
7330 (find-files (assoc-ref inputs "stringtemplate")
7331 ".*\\.jar"))
7332 ":"
7333 (string-concatenate
7334 (find-files (string-append
7335 (assoc-ref inputs "antlr")
7336 "/lib")
7337 ".*\\.jar"))
7338 " org.antlr.Tool $*"))))
7339 (chmod (string-append bin "/antlr3") #o755))
7340 #t))
7341 (add-before 'build 'generate-grammar
7342 (lambda _
7343 (let ((dir "src/org/antlr/tool/"))
7344 (for-each (lambda (file)
7345 (display file)
7346 (newline)
7347 (invoke "antlr" "-o" dir (string-append dir file)))
7348 '("antlr.g" "antlr.print.g" "assign.types.g"
7349 "buildnfa.g" "define.g")))
7350 (format #t "codegen.g\n")
7351 (invoke "antlr" "-o" "src/org/antlr/codegen"
7352 "src/org/antlr/codegen/codegen.g")
7353 #t))
7354 (add-before 'build 'fix-build-xml
7355 (lambda _
7356 (substitute* "build.xml"
7357 (("target name=\"compile\">")
7358 "target name=\"compile\">
7359<copy todir=\"${classes.dir}\">
7360<fileset dir=\"src\">
7361<include name=\"**/*.stg\"/>
7362<include name=\"**/*.st\"/>
7363<include name=\"**/*.sti\"/>
7364<include name=\"**/STLexer.tokens\"/>
7365</fileset>
7366</copy>"))
7367 #t)))))
7368 (native-inputs
7369 `(("antlr" ,antlr2)))
7370 (inputs
7371 `(("junit" ,java-junit)))
7372 (propagated-inputs
7373 `(("stringtemplate" ,java-stringtemplate-3)))))
7374
7375(define-public java-commons-cli-1.2
7376 ;; This is a bootstrap dependency for Maven2.
7377 (package
7378 (inherit java-commons-cli)
7379 (version "1.2")
7380 (source (origin
7381 (method url-fetch)
7382 (uri (string-append "mirror://apache/commons/cli/source/"
7383 "commons-cli-" version "-src.tar.gz"))
7384 (sha256
7385 (base32
7386 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7387 (arguments
7388 `(#:jar-name "commons-cli.jar"
7389 #:phases
7390 (modify-phases %standard-phases
7391 (add-before 'check 'fix-build-xml
7392 (lambda* (#:key inputs #:allow-other-keys)
7393 (substitute* "build.xml"
7394 (("dir=\"\\$\\{test.home\\}/java\"")
7395 "dir=\"${test.home}\""))
7396 #t)))))
7397 (native-inputs
7398 `(("java-junit" ,java-junit)))))
7399
7400(define-public java-microemulator-cldc
7401 (package
7402 (name "java-microemulator-cldc")
7403 (version "2.0.4")
7404 (source (origin
7405 (method url-fetch)
7406 (uri (string-append "https://github.com/barteo/microemu/archive/"
7407 "microemulator_"
7408 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7409 version)
7410 ".tar.gz"))
7411 (file-name (string-append name "-" version ".tar.gz"))
7412 (sha256
7413 (base32
7414 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7415 (build-system ant-build-system)
7416 (arguments
7417 `(#:jar-name "microemulator-cldc.jar"
7418 #:source-dir "microemu-cldc/src/main/java"
7419 #:tests? #f)); Requires even older software
7420 (home-page "https://github.com/barteo/microemu")
7421 (synopsis "J2ME CLDC emulator")
7422 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7423Emulator. It allows to demonstrate MIDlet based applications in web browser
7424applet and can be run as a standalone java application.")
7425 (license (list license:asl2.0
7426 ;; or altenatively:
7427 license:lgpl2.1+))))
7428
7429(define-public java-datanucleus-javax-persistence
7430 (package
7431 (name "java-datanucleus-javax-persistence")
7432 (version "2.2.0")
7433 (source (origin
7434 (method url-fetch)
7435 (uri (string-append "https://github.com/datanucleus/"
7436 "javax.persistence/archive/javax.persistence-"
7437 version "-release.tar.gz"))
7438 (sha256
7439 (base32
7440 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7441 (build-system ant-build-system)
7442 (arguments
7443 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7444 #:jdk ,icedtea-8
7445 #:source-dir "src/main/java"
7446 #:tests? #f)); no tests
7447 (home-page "https://github.com/datanucleus/javax.persistence")
7448 (synopsis "JPA API")
7449 (description "This package contains a clean definition of JPA API intended
7450for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7451jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7452used to generate this API.")
7453 (license (list license:edl1.0 license:epl1.0))))
7454
7455(define-public java-osgi-cmpn
7456 (package
7457 (name "java-osgi-cmpn")
7458 (version "6.0.0")
7459 (source (origin
7460 (method url-fetch)
7461 (uri (string-append "https://repo1.maven.org/maven2/"
7462 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7463 version "-sources.jar"))
7464 (sha256
7465 (base32
7466 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7467 (build-system ant-build-system)
7468 (arguments
7469 `(#:jar-name "osgi-cmpn.jar"
7470 #:tests? #f)); no tests
7471 (inputs
7472 `(("annotation" ,java-osgi-annotation)
7473 ("core" ,java-osgi-core)
7474 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7475 ("microemulator" ,java-microemulator-cldc)
7476 ("servlet" ,java-classpathx-servletapi)))
7477 (home-page "https://www.osgi.org")
7478 (synopsis "Compendium specification module of OSGi framework")
7479 (description
7480 "OSGi, for Open Services Gateway initiative framework, is a module system
7481and service platform for the Java programming language. This package contains
7482the compendium specification module, providing interfaces and classes for use
7483in compiling bundles.")
7484 (license license:asl2.0)))
7485
7486(define-public java-osgi-service-component-annotations
7487 (package
7488 (name "java-osgi-service-component-annotations")
7489 (version "1.3.0")
7490 (source (origin
7491 (method url-fetch)
7492 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7493 "org.osgi.service.component.annotations/"
7494 version "/org.osgi.service.component.annotations-"
7495 version "-sources.jar"))
7496 (sha256
7497 (base32
7498 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7499 (build-system ant-build-system)
7500 (arguments
7501 `(#:jar-name "osgi-service-component-annotations.jar"
7502 #:tests? #f)); no tests
7503 (inputs
7504 `(("annotation" ,java-osgi-annotation)))
7505 (home-page "https://www.osgi.org")
7506 (synopsis "Support annotations for osgi-service-component")
7507 (description
7508 "OSGi, for Open Services Gateway initiative framework, is a module system
7509and service platform for the Java programming language. This package contains
7510the support annotations for osgi-service-component.")
7511 (license license:asl2.0)))
7512
7513(define-public java-osgi-dto
7514 (package
7515 (name "java-osgi-dto")
7516 (version "1.0.0")
7517 (source (origin
7518 (method url-fetch)
7519 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7520 "org.osgi.dto/" version "/org.osgi.dto-"
7521 version "-sources.jar"))
7522 (sha256
7523 (base32
7524 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7525 (build-system ant-build-system)
7526 (arguments
7527 `(#:jar-name "osgi-dto.jar"
7528 #:tests? #f)); no tests
7529 (inputs
7530 `(("annotation" ,java-osgi-annotation)))
7531 (home-page "https://www.osgi.org")
7532 (synopsis "Data Transfer Objects")
7533 (description
7534 "OSGi, for Open Services Gateway initiative framework, is a module system
7535and service platform for the Java programming language. This package contains
7536the Data Transfer Objects. It is easily serializable having only public fields
7537of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7538Map and array aggregates may also be used. The aggregates must only hold
7539objects of the listed types or aggregates.")
7540 (license license:asl2.0)))
7541
7542(define-public java-osgi-resource
7543 (package
7544 (name "java-osgi-resource")
7545 (version "1.0.0")
7546 (source (origin
7547 (method url-fetch)
7548 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7549 "org.osgi.resource/"
7550 version "/org.osgi.resource-"
7551 version "-sources.jar"))
7552 (sha256
7553 (base32
7554 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7555 (build-system ant-build-system)
7556 (arguments
7557 `(#:jar-name "osgi-resource.jar"
7558 #:tests? #f)); no tests
7559 (inputs
7560 `(("annotation" ,java-osgi-annotation)
7561 ("dto" ,java-osgi-dto)))
7562 (home-page "https://www.osgi.org")
7563 (synopsis "OSGI Resource")
7564 (description
7565 "OSGi, for Open Services Gateway initiative framework, is a module system
7566and service platform for the Java programming language. This package contains
7567the definition of common types in osgi packages.")
7568 (license license:asl2.0)))
7569
7570(define-public java-osgi-namespace-contract
7571 (package
7572 (name "java-osgi-namespace-contract")
7573 (version "1.0.0")
7574 (source (origin
7575 (method url-fetch)
7576 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7577 "org.osgi.namespace.contract/"
7578 version "/org.osgi.namespace.contract-"
7579 version "-sources.jar"))
7580 (sha256
7581 (base32
7582 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7583 (build-system ant-build-system)
7584 (inputs
7585 `(("resource" ,java-osgi-resource)
7586 ("annotation" ,java-osgi-annotation)))
7587 (arguments
7588 `(#:jar-name "osgi-namespace-contract.jar"
7589 #:tests? #f)); no tests
7590 (home-page "https://www.osgi.org")
7591 (synopsis "Contract Capability and Requirement Namespace")
7592 (description
7593 "OSGi, for Open Services Gateway initiative framework, is a module system
7594and service platform for the Java programming language. This package contains
7595the names for the attributes and directives for a namespace with contracts.")
7596 (license license:asl2.0)))
7597
7598(define-public java-osgi-namespace-extender
7599 (package
7600 (name "java-osgi-namespace-extender")
7601 (version "1.0.1")
7602 (source (origin
7603 (method url-fetch)
7604 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7605 "org.osgi.namespace.extender/"
7606 version "/org.osgi.namespace.extender-"
7607 version "-sources.jar"))
7608 (sha256
7609 (base32
7610 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7611 (build-system ant-build-system)
7612 (inputs
7613 `(("resource" ,java-osgi-resource)
7614 ("annotation" ,java-osgi-annotation)))
7615 (arguments
7616 `(#:jar-name "osgi-namespace-extendent.jar"
7617 #:tests? #f)); no tests
7618 (home-page "https://www.osgi.org")
7619 (synopsis "Extender Capability and Requirement Namespace")
7620 (description
7621 "OSGi, for Open Services Gateway initiative framework, is a module system
7622and service platform for the Java programming language. This package contains
7623the names for the attributes and directives for an extender namespace.")
7624 (license license:asl2.0)))
7625
7626(define-public java-osgi-namespace-service
7627 (package
7628 (name "java-osgi-namespace-service")
7629 (version "1.0.0")
7630 (source (origin
7631 (method url-fetch)
7632 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7633 "org.osgi.namespace.service/"
7634 version "/org.osgi.namespace.service-"
7635 version "-sources.jar"))
7636 (sha256
7637 (base32
7638 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7639 (build-system ant-build-system)
7640 (inputs
7641 `(("resource" ,java-osgi-resource)
7642 ("annotation" ,java-osgi-annotation)))
7643 (arguments
7644 `(#:jar-name "osgi-namespace-service.jar"
7645 #:tests? #f)); no tests
7646 (home-page "https://www.osgi.org")
7647 (synopsis "Service Capability and Requirement Namespace")
7648 (description
7649 "OSGi, for Open Services Gateway initiative framework, is a module system
7650and service platform for the Java programming language. This package contains
7651the names for the attributes and directives for a service namespace.")
7652 (license license:asl2.0)))
7653
7654(define-public java-osgi-util-function
7655 (package
7656 (name "java-osgi-util-function")
7657 (version "1.0.0")
7658 (source (origin
7659 (method url-fetch)
7660 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7661 "org.osgi.util.function/"
7662 version "/org.osgi.util.function-"
7663 version "-sources.jar"))
7664 (sha256
7665 (base32
7666 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7667 (build-system ant-build-system)
7668 (arguments
7669 `(#:jar-name "osgi-util-function.jar"
7670 #:tests? #f)); no tests
7671 (inputs
7672 `(("annotation" ,java-osgi-annotation)))
7673 (home-page "https://www.osgi.org")
7674 (synopsis "OSGI Util Function")
7675 (description
7676 "OSGi, for Open Services Gateway initiative framework, is a module system
7677and service platform for the Java programming language. This package contains
7678an interface for a function that accepts a single argument and produces a result.")
7679 (license license:asl2.0)))
7680
7681(define-public java-osgi-util-promise
7682 (package
7683 (name "java-osgi-util-promise")
7684 (version "1.0.0")
7685 (source (origin
7686 (method url-fetch)
7687 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7688 "org.osgi.util.promise/"
7689 version "/org.osgi.util.promise-"
7690 version "-sources.jar"))
7691 (sha256
7692 (base32
7693 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7694 (build-system ant-build-system)
7695 (arguments
7696 `(#:jar-name "osgi-util-promise.jar"
7697 #:tests? #f)); no tests
7698 (inputs
7699 `(("annotation" ,java-osgi-annotation)
7700 ("function" ,java-osgi-util-function)))
7701 (home-page "https://www.osgi.org")
7702 (synopsis "Promise of a value")
7703 (description
7704 "OSGi, for Open Services Gateway initiative framework, is a module system
7705and service platform for the Java programming language. This package contains
7706an interface and utilitary classes for promises. A Promise represents a future
7707value. It handles the interactions for asynchronous processing.")
7708 (license license:asl2.0)))
7709
7710(define-public java-osgi-service-metatype-annotations
7711 (package
7712 (name "java-osgi-service-metatype-annotations")
7713 (version "1.3.0")
7714 (source (origin
7715 (method url-fetch)
7716 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7717 "org.osgi.service.metatype.annotations/"
7718 version "/org.osgi.service.metatype.annotations-"
7719 version "-sources.jar"))
7720 (sha256
7721 (base32
7722 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7723 (build-system ant-build-system)
7724 (arguments
7725 `(#:jar-name "osgi-service-metatype-annotations.jar"
7726 #:tests? #f)); no tests
7727 (inputs
7728 `(("annotation" ,java-osgi-annotation)))
7729 (home-page "https://www.osgi.org")
7730 (synopsis "Support annotations for metatype")
7731 (description
7732 "OSGi, for Open Services Gateway initiative framework, is a module system
7733and service platform for the Java programming language. This package contains
7734the support annotations for metatype.")
7735 (license license:asl2.0)))
7736
7737(define-public java-osgi-service-repository
7738 (package
7739 (name "java-osgi-service-repository")
7740 (version "1.1.0")
7741 (source (origin
7742 (method url-fetch)
7743 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7744 "org.osgi.service.repository/"
7745 version "/org.osgi.service.repository-"
7746 version "-sources.jar"))
7747 (sha256
7748 (base32
7749 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7750 (build-system ant-build-system)
7751 (arguments
7752 `(#:jar-name "osgi-service-repository.jar"
7753 #:tests? #f)); no tests
7754 (inputs
7755 `(("annotation" ,java-osgi-annotation)
7756 ("promise" ,java-osgi-util-promise)
7757 ("resource" ,java-osgi-resource)))
7758 (home-page "https://www.osgi.org")
7759 (synopsis "OSGI service repository")
7760 (description
7761 "OSGi, for Open Services Gateway initiative framework, is a module system
7762and service platform for the Java programming language. This package contains
7763a repository service that contains resources.")
7764 (license license:asl2.0)))
7765
7766(define-public java-osgi-framework
7767 (package
7768 (name "java-osgi-framework")
7769 (version "1.8.0")
7770 (source (origin
7771 (method url-fetch)
7772 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7773 "org.osgi.framework/" version "/org.osgi.framework-"
7774 version "-sources.jar"))
7775 (sha256
7776 (base32
7777 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7778 (build-system ant-build-system)
7779 (arguments
7780 `(#:jar-name "osgi-framework.jar"
7781 #:tests? #f)); no tests
7782 (inputs
7783 `(("annotation" ,java-osgi-annotation)
7784 ("resource" ,java-osgi-resource)
7785 ("dto" ,java-osgi-dto)))
7786 (home-page "https://www.osgi.org")
7787 (synopsis "OSGi framework")
7788 (description
7789 "OSGi, for Open Services Gateway initiative framework, is a module system
7790and service platform for the Java programming language.")
7791 (license license:asl2.0)))
7792
7793(define-public java-osgi-service-log
7794 (package
7795 (name "java-osgi-service-log")
7796 (version "1.3.0")
7797 (source (origin
7798 (method url-fetch)
7799 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7800 "org.osgi.service.log/"
7801 version "/org.osgi.service.log-"
7802 version "-sources.jar"))
7803 (sha256
7804 (base32
7805 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7806 (build-system ant-build-system)
7807 (arguments
7808 `(#:jar-name "osgi-service-log.jar"
7809 #:tests? #f)); no tests
7810 (inputs
7811 `(("java-osgi-framework" ,java-osgi-framework)))
7812 (home-page "https://www.osgi.org")
7813 (synopsis "Provides methods for bundles to write messages to the log")
7814 (description
7815 "OSGi, for Open Services Gateway initiative framework, is a module system
7816and service platform for the Java programming language. This package contains
7817the log service.")
7818 (license license:asl2.0)))
7819
7820(define-public java-osgi-service-jdbc
7821 (package
7822 (name "java-osgi-service-jdbc")
7823 (version "1.0.0")
7824 (source (origin
7825 (method url-fetch)
7826 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7827 "org.osgi.service.jdbc/"
7828 version "/org.osgi.service.jdbc-"
7829 version "-sources.jar"))
7830 (sha256
7831 (base32
7832 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7833 (build-system ant-build-system)
7834 (arguments
7835 `(#:jar-name "osgi-service-jdbc.jar"
7836 #:tests? #f)); no tests
7837 (home-page "https://www.osgi.org")
7838 (synopsis "Factory for JDBC connection factories")
7839 (description
7840 "OSGi, for Open Services Gateway initiative framework, is a module system
7841and service platform for the Java programming language. This package contains
7842a factory for JDBC connection factories. There are 3 preferred connection
7843factories for getting JDBC connections:
7844
7845@itemize
7846@item @code{javax.sql.DataSource};
7847@item @code{javax.sql.ConnectionPoolDataSource};
7848@item @code{javax.sql.XADataSource}.
7849@end itemize")
7850 (license license:asl2.0)))
7851
7852(define-public java-osgi-service-resolver
7853 (package
7854 (name "java-osgi-service-resolver")
7855 (version "1.0.1")
7856 (source (origin
7857 (method url-fetch)
7858 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7859 "org.osgi.service.resolver/"
7860 version "/org.osgi.service.resolver-"
7861 version "-sources.jar"))
7862 (sha256
7863 (base32
7864 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7865 (build-system ant-build-system)
7866 (arguments
7867 `(#:jar-name "osgi-service-resolver.jar"
7868 #:tests? #f)); no tests
7869 (inputs
7870 `(("annotation" ,java-osgi-annotation)
7871 ("resource" ,java-osgi-resource)))
7872 (home-page "https://www.osgi.org")
7873 (synopsis "OSGI Resolver service")
7874 (description
7875 "OSGi, for Open Services Gateway initiative framework, is a module system
7876and service platform for the Java programming language. This package contains
7877a resolver service that resolves the specified resources in the context supplied
7878by the caller.")
7879 (license license:asl2.0)))
7880
7881(define-public java-osgi-util-tracker
7882 (package
7883 (name "java-osgi-util-tracker")
7884 (version "1.5.1")
7885 (source (origin
7886 (method url-fetch)
7887 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7888 "org.osgi.util.tracker/"
7889 version "/org.osgi.util.tracker-"
7890 version "-sources.jar"))
7891 (sha256
7892 (base32
7893 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7894 (build-system ant-build-system)
7895 (arguments
7896 `(#:jar-name "osgi-util-tracker.jar"
7897 #:tests? #f)); no tests
7898 (inputs
7899 `(("framework" ,java-osgi-framework)
7900 ("annotation" ,java-osgi-annotation)))
7901 (home-page "https://www.osgi.org")
7902 (synopsis "Bundle tracking")
7903 (description
7904 "OSGi, for Open Services Gateway initiative framework, is a module system
7905and service platform for the Java programming language. This package contains
7906bundle tracking utility classes.")
7907 (license license:asl2.0)))
7908
7909(define-public java-osgi-service-cm
7910 (package
7911 (name "java-osgi-service-cm")
7912 (version "1.5.0")
7913 (source (origin
7914 (method url-fetch)
7915 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7916 "org.osgi.service.cm/"
7917 version "/org.osgi.service.cm-"
7918 version "-sources.jar"))
7919 (sha256
7920 (base32
7921 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7922 (build-system ant-build-system)
7923 (arguments
7924 `(#:jar-name "osgi-service-cm.jar"
7925 #:tests? #f)); no tests
7926 (inputs
7927 `(("framework" ,java-osgi-framework)
7928 ("annotation" ,java-osgi-annotation)))
7929 (home-page "https://www.osgi.org")
7930 (synopsis "OSGI Configuration Management")
7931 (description
7932 "OSGi, for Open Services Gateway initiative framework, is a module system
7933and service platform for the Java programming language. This package contains
7934utility classes for the configuration of services.")
7935 (license license:asl2.0)))
7936
7937(define-public java-osgi-service-packageadmin
7938 (package
7939 (name "java-osgi-service-packageadmin")
7940 (version "1.2.0")
7941 (source (origin
7942 (method url-fetch)
7943 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7944 "org.osgi.service.packageadmin/"
7945 version "/org.osgi.service.packageadmin-"
7946 version "-sources.jar"))
7947 (sha256
7948 (base32
7949 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7950 (build-system ant-build-system)
7951 (arguments
7952 `(#:jar-name "osgi-service-packageadmin.jar"
7953 #:tests? #f)); no tests
7954 (inputs
7955 `(("framework" ,java-osgi-framework)))
7956 (home-page "https://www.osgi.org")
7957 (synopsis "OSGI Package Administration")
7958 (description
7959 "OSGi, for Open Services Gateway initiative framework, is a module system
7960and service platform for the Java programming language. This package contains
7961the packageadmin service.")
7962 (license license:asl2.0)))
7963
7964(define-public java-ops4j-base-lang
7965 (package
7966 (name "java-ops4j-base-lang")
7967 (version "1.5.0")
7968 (source (origin
7969 (method url-fetch)
7970 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7971 "archive/base-" version ".tar.gz"))
7972 (sha256
7973 (base32
7974 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7975 (build-system ant-build-system)
7976 (arguments
7977 `(#:jar-name "java-ops4j-base-lang.jar"
7978 #:source-dir "ops4j-base-lang/src/main/java"
7979 #:tests? #f; no tests
7980 #:phases
7981 (modify-phases %standard-phases
7982 (add-before 'build 'add-test-file
7983 (lambda _
7984 ;; That file is required by a test in ops4j-pax-exam-core-spi
7985 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7986 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7987 (lambda _
7988 (display
7989 (string-append
7990 "version=" ,version "\n"
7991 "groupId=org.ops4j.base"
7992 "artifactId=ops4j-base-lang\n"))))
7993 #t)))))
7994 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7995 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7996 (description "OPS4J stands for Open Participation Software for Java. This
7997package contains utilities and extensions related to @code{java.lang}.")
7998 (license license:asl2.0)))
7999
8000(define-public java-ops4j-base-monitors
8001 (package
8002 (inherit java-ops4j-base-lang)
8003 (name "java-ops4j-base-monitors")
8004 (arguments
8005 `(#:jar-name "java-ops4j-base-monitors.jar"
8006 #:source-dir "ops4j-base-monitors/src/main/java"
8007 #:tests? #f)); no tests
8008 (inputs
8009 `(("lang" ,java-ops4j-base-lang)))
8010 (description "OPS4J stands for Open Participation Software for Java. This
8011package contains utilities and extensions related to monitoring.")))
8012
8013(define-public java-ops4j-base-io
8014 (package
8015 (inherit java-ops4j-base-lang)
8016 (name "java-ops4j-base-io")
8017 (arguments
8018 `(#:jar-name "java-ops4j-base-io.jar"
8019 #:source-dir "ops4j-base-io/src/main/java"
8020 #:test-dir "ops4j-base-io/src/test"
8021 #:test-exclude
8022 (list "**/ListerTest.java")))
8023 (inputs
8024 `(("lang" ,java-ops4j-base-monitors)
8025 ("lang" ,java-ops4j-base-lang)))
8026 (native-inputs
8027 `(("junit" ,java-junit)
8028 ("hamcrest" ,java-hamcrest-core)))
8029 (description "OPS4J stands for Open Participation Software for Java. This
8030package contains utilities and extensions related to handling streams and files.")))
8031
8032(define-public java-ops4j-base-util
8033 (package
8034 (inherit java-ops4j-base-lang)
8035 (name "java-ops4j-base-util")
8036 (arguments
8037 `(#:jar-name "java-ops4j-base-util.jar"
8038 #:source-dir "ops4j-base-util/src/main/java"
8039 #:test-dir "ops4j-base-util/src/test"))
8040 (inputs
8041 `(("lang" ,java-ops4j-base-lang)))
8042 (native-inputs
8043 `(("junit" ,java-junit)))
8044 (description "OPS4J stands for Open Participation Software for Java. This
8045package contains utilities and extensions related to environment, i18n and
8046mime types.")))
8047
8048(define-public java-ops4j-base-util-property
8049 (package
8050 (inherit java-ops4j-base-lang)
8051 (name "java-ops4j-base-util-property")
8052 (arguments
8053 `(#:jar-name "java-ops4j-base-util-property.jar"
8054 #:source-dir "ops4j-base-util-property/src/main/java"
8055 #:tests? #f)); no tests
8056 (inputs
8057 `(("lang" ,java-ops4j-base-lang)
8058 ("util" ,java-ops4j-base-util)))
8059 (description "OPS4J stands for Open Participation Software for Java. This
8060package contains utilities and extensions related to resolving properties from
8061different sources.")))
8062
8063(define-public java-ops4j-base-store
8064 (package
8065 (inherit java-ops4j-base-lang)
8066 (name "java-ops4j-base-store")
8067 (arguments
8068 `(#:jar-name "java-ops4j-base-store.jar"
8069 #:source-dir "ops4j-base-store/src/main/java"
8070 #:tests? #f)); no tests
8071 (inputs
8072 `(("lang" ,java-ops4j-base-lang)
8073 ("slf4j" ,java-slf4j-api)
8074 ("io" ,java-ops4j-base-io)))
8075 (description "OPS4J stands for Open Participation Software for Java. This
8076package contains utilities for storing and retrieving data from an
8077@code{InputStream}.")))
8078
8079(define-public java-ops4j-base-spi
8080 (package
8081 (inherit java-ops4j-base-lang)
8082 (name "java-ops4j-base-spi")
8083 (arguments
8084 `(#:jar-name "java-ops4j-base-spi.jar"
8085 #:source-dir "ops4j-base-spi/src/main/java"
8086 #:test-dir "ops4j-base-spi/src/test"))
8087 (native-inputs
8088 `(("junit" ,java-junit)
8089 ("hamcrest" ,java-hamcrest-core)))
8090 (description "OPS4J stands for Open Participation Software for Java. This
8091package contains utilities for obtaining services via the Java SE 6
8092@code{ServiceLoader}.")))
8093
8094(define-public java-aqute-bnd-annotation
8095 (package
8096 (name "java-aqute-bnd-annotation")
8097 (version "3.5.0")
8098 (source (origin
8099 (method url-fetch)
8100 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8101 version ".REL.tar.gz"))
8102 (file-name (string-append name "-" version ".tar.gz"))
8103 (sha256
8104 (base32
8105 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8106 (build-system ant-build-system)
8107 (arguments
8108 `(#:jar-name "java-aqute-bnd-annotation.jar"
8109 #:source-dir "biz.aQute.bnd.annotation/src"
8110 #:tests? #f)); empty test dir
8111 (home-page "https://bnd.bndtools.org/")
8112 (synopsis "Tools for OSGi")
8113 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8114headers based on analyzing the class code, it verifies the project settings,
8115it manages project dependencies, gives diffs jars, and much more.")
8116 (license license:asl2.0)))
8117
8118(define-public java-aqute-libg
8119 (package
8120 (inherit java-aqute-bnd-annotation)
8121 (name "java-aqute-libg")
8122 (arguments
8123 `(#:jar-name "java-aqute-libg.jar"
8124 ;; The build fails when source/target more recent than 1.7. This
8125 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8126 ;;
8127 ;; It is closed as won't fix. There is no way to change the source
8128 ;; so that it works on 1.8, and still works on 1.6, the upstream
8129 ;; target. It work fine on 1.7, so we use 1.7.
8130 #:make-flags (list "-Dant.build.javac.source=1.7"
8131 "-Dant.build.javac.target=1.7")
8132 #:phases
8133 (modify-phases %standard-phases
8134 (add-before 'configure 'chdir
8135 ;; Change to aQute.libg directory, so that the relative
8136 ;; paths in the tests aren't broken.
8137 (lambda _
8138 (chdir "aQute.libg")
8139 #t))
8140 (add-before 'check 'create-test-directory
8141 ;; Copy the test directory to test/java, since that's where
8142 ;; ant-build-system's default project in build.xml expects to find
8143 ;; the test classes. Leave a copy in the original place to not
8144 ;; break paths in tests.
8145 (lambda _
8146 (mkdir "src/test")
8147 (copy-recursively "test" "src/test/java")
8148 #t)))))
8149 (inputs
8150 `(("slf4j" ,java-slf4j-api)
8151 ("osgi-annot" ,java-osgi-annotation)
8152 ("java-osgi-cmpn" ,java-osgi-cmpn)
8153 ("osgi" ,java-osgi-core)))
8154 (native-inputs
8155 `(("hamcrest" ,java-hamcrest-core)
8156 ("java-junit" ,java-junit)))))
8157
8158(define java-aqute-libg-bootstrap
8159 (package
8160 (inherit java-aqute-libg)
8161 (name "java-aqute-libg-bootstrap")
8162 (arguments
8163 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
8164 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8165 ((#:tests? _ #f) #f)))
8166 (inputs
8167 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8168 ,@(delete `("slf4j" ,java-slf4j-api)
8169 (package-inputs java-aqute-libg))))
8170 (native-inputs '())))
8171
8172(define-public java-aqute-bndlib
8173 (package
8174 (inherit java-aqute-bnd-annotation)
8175 (name "java-aqute-bndlib")
8176 (arguments
8177 `(#:jar-name "java-bndlib.jar"
8178 #:source-dir "biz.aQute.bndlib/src"
8179 #:tests? #f)); no tests
8180 (inputs
8181 `(("slf4j" ,java-slf4j-api)
8182 ("osgi-annot" ,java-osgi-annotation)
8183 ("java-aqute-libg" ,java-aqute-libg)
8184 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8185 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8186 ("java-osgi-service-repository" ,java-osgi-service-repository)
8187 ("java-osgi-service-log" ,java-osgi-service-log)
8188 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8189 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8190 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8191 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8192 ("promise" ,java-osgi-util-promise)
8193 ("osgi" ,java-osgi-core)))))
8194
8195(define java-aqute-bndlib-bootstrap
8196 (package
8197 (inherit java-aqute-bndlib)
8198 (name "java-aqute-bndlib-bootstrap")
8199 (inputs
8200 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8201 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8202 ,@(delete `("slf4j" ,java-slf4j-api)
8203 (delete `("java-aqute-libg" ,java-aqute-libg)
8204 (package-inputs java-aqute-bndlib)))))))
8205
8206(define-public java-ops4j-pax-tinybundles
8207 (package
8208 (name "java-ops4j-pax-tinybundles")
8209 (version "2.1.1")
8210 (source (origin
8211 (method url-fetch)
8212 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8213 "archive/tinybundles-" version ".tar.gz"))
8214 (sha256
8215 (base32
8216 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8217 (arguments
8218 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8219 #:source-dir "src/main/java"
8220 #:test-exclude
8221 ;; Abstract base classes for other tests
8222 (list "**/BndTest.java" "**/CoreTest.java")
8223 #:phases
8224 (modify-phases %standard-phases
8225 (add-before 'check 'fix-version
8226 (lambda _
8227 ;; This test has a reference to an old version of bndlib we are not
8228 ;; packaging. It uses the version referenced in pom.xml. We replace
8229 ;; it with our own version.
8230 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8231 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8232 ,(package-version java-aqute-bndlib)))
8233 #t)))))
8234 (inputs
8235 `(("lang" ,java-ops4j-base-lang)
8236 ("io" ,java-ops4j-base-io)
8237 ("store" ,java-ops4j-base-store)
8238 ("slf4j" ,java-slf4j-api)
8239 ("libg" ,java-aqute-libg)
8240 ("bndlib" ,java-aqute-bndlib)))
8241 (native-inputs
8242 `(("junit" ,java-junit)
8243 ("hamcrest" ,java-hamcrest-core)
8244 ("log4j" ,java-log4j-api)
8245 ("bndannotation" ,java-aqute-bnd-annotation)
8246 ("framework" ,java-osgi-framework)))
8247 (build-system ant-build-system)
8248 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8249 (synopsis "Java APIs to create OSGi related artifacts")
8250 (description "Tinybundles is all about creating OSGi related artifacts like
8251Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8252to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8253other hand, this library can be a foundation of real end user tools that need
8254to create those artifacts.")
8255 (license license:asl2.0)))
8256
8257(define-public java-ops4j-pax-exam-core
8258 (package
8259 (name "java-ops4j-pax-exam-core")
8260 (version "4.11.0")
8261 (source (origin
8262 (method url-fetch)
8263 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8264 "archive/exam-reactor-" version ".tar.gz"))
8265 (sha256
8266 (base32
8267 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8268 (arguments
8269 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8270 #:source-dir "core/pax-exam/src/main/java"
8271 #:test-dir "core/pax-exam/src/test"))
8272 (inputs
8273 `(("slf4j" ,java-slf4j-api)
8274 ("lang" ,java-ops4j-base-lang)
8275 ("io" ,java-ops4j-base-io)
8276 ("util-property" ,java-ops4j-base-util-property)
8277 ("util-store" ,java-ops4j-base-store)
8278 ("java-osgi-core" ,java-osgi-core)))
8279 (native-inputs
8280 `(("junit" ,java-junit)
8281 ("hamcrest" ,java-hamcrest-core)))
8282 (build-system ant-build-system)
8283 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8284 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8285 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8286the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8287the system under test at the same time.")
8288 (license license:asl2.0)))
8289
8290(define-public java-ops4j-pax-exam-core-spi
8291 (package
8292 (inherit java-ops4j-pax-exam-core)
8293 (name "java-ops4j-pax-exam-core-spi")
8294 (arguments
8295 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8296 #:source-dir "src/main/java"
8297 #:test-exclude
8298 (list
8299 ;; Abstract base class, not a test
8300 "**/BaseStagedReactorTest.java"
8301 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8302 "**/WarBuilderTest.java")
8303 #:phases
8304 (modify-phases %standard-phases
8305 (add-before 'configure 'chdir
8306 (lambda _
8307 ;; Tests assume we are in this directory
8308 (chdir "core/pax-exam-spi")
8309 #t))
8310 (add-before 'check 'fix-tests
8311 (lambda _
8312 ;; One test checks that this file is present.
8313 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8314 (with-output-to-file
8315 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8316 (lambda _
8317 (display
8318 (string-append "artifactId = pax-exam-spi\n"
8319 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8320 ;; Maven puts compilation results in the target directory, while we
8321 ;; put them in the build directory.
8322 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8323 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8324 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8325 (("target") "build"))
8326 ;; One test is expected to fail, but it doesn't throw the expected exception
8327 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8328 (("AssertionError") "IllegalArgumentException"))
8329 #t)))))
8330 (inputs
8331 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8332 ("lang" ,java-ops4j-base-lang)
8333 ("monitors" ,java-ops4j-base-monitors)
8334 ("store" ,java-ops4j-base-store)
8335 ("io" ,java-ops4j-base-io)
8336 ("spi" ,java-ops4j-base-spi)
8337 ("osgi" ,java-osgi-core)
8338 ("slf4j" ,java-slf4j-api)
8339 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8340 (native-inputs
8341 `(("mockito" ,java-mockito-1)
8342 ("junit" ,java-junit)
8343 ("hamcrest" ,java-hamcrest-core)
8344 ("cglib" ,java-cglib)
8345 ("objenesis" ,java-objenesis)
8346 ("asm" ,java-asm)))))
8347
8348(define-public java-ops4j-pax-exam-core-junit
8349 (package
8350 (inherit java-ops4j-pax-exam-core)
8351 (name "java-ops4j-pax-exam-core-junit")
8352 (arguments
8353 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8354 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8355 #:tests? #f)); no tests
8356 (inputs
8357 `(("junit" ,java-junit)
8358 ("slf4j" ,java-slf4j-api)
8359 ("core" ,java-ops4j-pax-exam-core)
8360 ("spi" ,java-ops4j-pax-exam-core-spi)))
8361 (native-inputs '())))
8362
8363(define-public java-fasterxml-jackson-annotations
8364 (package
8365 (name "java-fasterxml-jackson-annotations")
8366 (version "2.9.4")
8367 (source (origin
8368 (method url-fetch)
8369 (uri (string-append "https://github.com/FasterXML/"
8370 "jackson-annotations/archive/"
8371 "jackson-annotations-" version ".tar.gz"))
8372 (sha256
8373 (base32
8374 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8375 (build-system ant-build-system)
8376 (arguments
8377 `(#:jar-name "jackson-annotations.jar"
8378 #:source-dir "src/main/java"
8379 #:test-dir "src/test"))
8380 (native-inputs
8381 `(("junit" ,java-junit)))
8382 (home-page "https://github.com/FasterXML/jackson-annotations")
8383 (synopsis "General purpose annotations for the Jackson Data Processor")
8384 (description "This package contains general purpose annotations for the
8385Jackson Data Processor, used on value and handler types. The only annotations
8386not included are ones that require dependency to the Databind package.")
8387 (license license:asl2.0)))
8388
8389(define-public java-fasterxml-jackson-core
8390 (package
8391 (name "java-fasterxml-jackson-core")
8392 (version "2.9.4")
8393 (source (origin
8394 (method url-fetch)
8395 (uri (string-append "https://github.com/FasterXML/"
8396 "jackson-core/archive/"
8397 "jackson-core-" version ".tar.gz"))
8398 (sha256
8399 (base32
8400 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8401 (build-system ant-build-system)
8402 (arguments
8403 `(#:jar-name "jackson-core.jar"
8404 #:source-dir "src/main/java"
8405 #:test-dir "src/test"
8406 #:test-exclude
8407 (list
8408 ;; Expected failure. pom.xml excludes these
8409 "**/failing/**"
8410 ;; Base classes that have no constructor for junit
8411 "**/BaseTest.java"
8412 "**/ConcurrencyReadTest.java"
8413 "**/ManualCharAccessTest.java"
8414 "**/ManualCharAccessTest.java"
8415 "**/TrailingCommasTest.java"
8416 "**/AsyncMissingValuesInObjectTest.java"
8417 "**/AsyncMissingValuesInArrayTest.java")
8418 #:phases
8419 (modify-phases %standard-phases
8420 (add-before 'configure 'generate-PackageVersion.java
8421 (lambda _
8422 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8423 (in (string-append out ".in")))
8424 (copy-file in out)
8425 (substitute* out
8426 (("@package@") "com.fasterxml.jackson.core.json")
8427 (("@projectversion@") ,version)
8428 (("@projectgroupid@") "com.fasterxml.jackson.core")
8429 (("@projectartifactid@") "jackson-core")))
8430 #t))
8431 (add-before 'build 'copy-resources
8432 (lambda _
8433 (copy-recursively "src/main/resources"
8434 "build/classes")
8435 #t))
8436 (add-before 'check 'copy-test-resources
8437 (lambda _
8438 (copy-recursively "src/test/resources"
8439 "build/test-classes")
8440 #t)))))
8441 (native-inputs
8442 `(("junit" ,java-junit)
8443 ("hamcrest" ,java-hamcrest-core)))
8444 (home-page "https://github.com/FasterXML/jackson-core")
8445 (synopsis "")
8446 (description "")
8447 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8448
8449(define-public java-fasterxml-jackson-databind
8450 (package
8451 (name "java-fasterxml-jackson-databind")
8452 (version "2.9.4")
8453 (source (origin
8454 (method url-fetch)
8455 (uri (string-append "https://github.com/FasterXML/"
8456 "jackson-databind/archive/"
8457 "jackson-databind-" version ".tar.gz"))
8458 (sha256
8459 (base32
8460 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8461 (build-system ant-build-system)
8462 (arguments
8463 `(#:jar-name "jackson-databind.jar"
8464 #:source-dir "src/main/java"
8465 #:tests? #f; requires javax.measures for which I can't find a free implementation
8466 #:phases
8467 (modify-phases %standard-phases
8468 (add-before 'configure 'generate-PackageVersion.java
8469 (lambda _
8470 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8471 (in (string-append out ".in")))
8472 (copy-file in out)
8473 (substitute* out
8474 (("@package@") "com.fasterxml.jackson.databind.cfg")
8475 (("@projectversion@") ,version)
8476 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8477 (("@projectartifactid@") "jackson-databind")))
8478 #t))
8479 (add-before 'build 'copy-resources
8480 (lambda _
8481 (copy-recursively "src/main/resources" "build/classes")
8482 #t)))))
8483 (inputs
8484 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8485 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8486 (home-page "https://github.com/FasterXML/jackson-databind")
8487 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8488 (description "This package contains the general-purpose data-binding
8489functionality and tree-model for Jackson Data Processor. It builds on core
8490streaming parser/generator package, and uses Jackson Annotations for
8491configuration.")
8492 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8493
8494(define-public java-fasterxml-jackson-modules-base-jaxb
8495 (package
8496 (name "java-fasterxml-jackson-modules-base-jaxb")
8497 (version "2.9.4")
8498 (source (origin
8499 (method url-fetch)
8500 (uri (string-append "https://github.com/FasterXML/"
8501 "jackson-modules-base/archive/"
8502 "jackson-modules-base-" version ".tar.gz"))
8503 (sha256
8504 (base32
8505 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8506 (build-system ant-build-system)
8507 (arguments
8508 `(#:jar-name "jackson-modules-base-jaxb.jar"
8509 #:source-dir "jaxb/src/main/java"
8510 #:test-dir "jaxb/src/test"
8511 #:test-exclude
8512 ;; Base class for tests
8513 (list "**/BaseJaxbTest.java")
8514 #:phases
8515 (modify-phases %standard-phases
8516 (add-before 'configure 'generate-PackageVersion.java
8517 (lambda _
8518 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8519 "jackson/module/jaxb/PackageVersion.java"))
8520 (in (string-append out ".in")))
8521 (copy-file in out)
8522 (substitute* out
8523 (("@package@") "com.fasterxml.jackson.module.jaxb")
8524 (("@projectversion@") ,version)
8525 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8526 (("@projectartifactid@") "jackson-module-jaxb")))
8527 #t))
8528 (add-before 'build 'copy-resources
8529 (lambda _
8530 (copy-recursively "jaxb/src/main/resources" "build/classes")
8531 #t)))))
8532 (inputs
8533 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8534 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8535 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8536 (native-inputs
8537 `(("java-junit" ,java-junit)))
8538 (home-page "https://github.com/FasterXML/jackson-modules-base")
8539 (synopsis "Jaxb annotations jackson module")
8540 (description "This package is the jaxb annotations module for jackson.")
8541 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8542
8543(define-public java-fasterxml-jackson-modules-base-mrbean
8544 (package
8545 (name "java-fasterxml-jackson-modules-base-mrbean")
8546 (version "2.9.4")
8547 (source (origin
8548 (method url-fetch)
8549 (uri (string-append "https://github.com/FasterXML/"
8550 "jackson-modules-base/archive/"
8551 "jackson-modules-base-" version ".tar.gz"))
8552 (sha256
8553 (base32
8554 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8555 (build-system ant-build-system)
8556 (arguments
8557 `(#:jar-name "jackson-modules-base-mrbean.jar"
8558 #:source-dir "mrbean/src/main/java"
8559 #:test-dir "mrbean/src/test"
8560 #:test-exclude
8561 ;; Base class for tests
8562 (list "**/BaseTest.java")
8563 #:phases
8564 (modify-phases %standard-phases
8565 (add-before 'configure 'generate-PackageVersion.java
8566 (lambda _
8567 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8568 "jackson/module/mrbean/PackageVersion.java"))
8569 (in (string-append out ".in")))
8570 (copy-file in out)
8571 (substitute* out
8572 (("@package@") "com.fasterxml.jackson.module.mrbean")
8573 (("@projectversion@") ,version)
8574 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8575 (("@projectartifactid@") "jackson-module-mrbean")))
8576 #t)))))
8577 (inputs
8578 `(("java-asm" ,java-asm)
8579 ("java-fasterxml-jackson-annotations"
8580 ,java-fasterxml-jackson-annotations)
8581 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8582 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8583 (native-inputs
8584 `(("java-junit" ,java-junit)))
8585 (home-page "https://github.com/FasterXML/jackson-modules-base")
8586 (synopsis "POJO type materialization for Java")
8587 (description "This package implements POJO type materialization.
8588Databinders can construct implementation classes for Java interfaces as part
8589of deserialization.")
8590 (license license:asl2.0)))
8591
8592(define-public java-snakeyaml
8593 (package
8594 (name "java-snakeyaml")
8595 (version "1.18")
8596 (source (origin
8597 (method url-fetch)
8598 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8599 version ".tar.gz"))
8600 (file-name (string-append name "-" version ".tar.gz"))
8601 (sha256
8602 (base32
8603 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
8604 (build-system ant-build-system)
8605 (arguments
8606 `(#:jar-name "java-snakeyaml.jar"
8607 #:source-dir "src/main/java"
8608 ;; Tests require velocity, a cyclic dependency, and
8609 ;; java-spring-framework-context which is not packaged.
8610 #:tests? #f))
8611 (home-page "https://bitbucket.org/asomov/snakeyaml")
8612 (synopsis "YAML processor")
8613 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8614 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8615
8616(define-public java-fasterxml-jackson-dataformat-yaml
8617 (package
8618 (name "java-fasterxml-jackson-dataformat-yaml")
8619 (version "2.9.4")
8620 (source (origin
8621 (method url-fetch)
8622 (uri (string-append "https://github.com/FasterXML/"
8623 "jackson-dataformats-text/archive/"
8624 "jackson-dataformats-text-" version ".tar.gz"))
8625 (sha256
8626 (base32
8627 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8628 (build-system ant-build-system)
8629 (arguments
8630 `(#:jar-name "jackson-dataformat-yaml.jar"
8631 #:source-dir "yaml/src/main/java"
8632 #:test-dir "yaml/src/test"
8633 #:test-exclude (list "**/failing/**.java")
8634 #:phases
8635 (modify-phases %standard-phases
8636 (add-before 'configure 'generate-PackageVersion.java
8637 (lambda _
8638 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8639 (in (string-append out ".in")))
8640 (copy-file in out)
8641 (substitute* out
8642 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8643 (("@projectversion@") ,version)
8644 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8645 (("@projectartifactid@") "jackson-dataformat-yaml")))
8646 #t)))))
8647 (inputs
8648 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8649 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8650 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8651 ("java-snakeyaml" ,java-snakeyaml)))
8652 (native-inputs
8653 `(("junit" ,java-junit)
8654 ("hamcrest" ,java-hamcrest-core)
8655 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8656 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8657 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8658 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8659 (synopsis "Yaml backend for Jackson")
8660 (description "Dataformat backends are used to support format alternatives
8661to JSON, supported by default. This is done by sub-classing Jackson core
8662abstractions.")
8663 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8664
8665(define-public java-stax2-api
8666 (package
8667 (name "java-stax2-api")
8668 (version "4.0.0")
8669 (source (origin
8670 (method url-fetch)
8671 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8672 "stax2-api-" version ".tar.gz"))
8673 (sha256
8674 (base32
8675 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8676 (build-system ant-build-system)
8677 (arguments
8678 `(#:jar-name "java-stax2-api.jar"
8679 #:source-dir "src/main/java"
8680 #:tests? #f)); no tests
8681 (home-page "https://github.com/FasterXML/stax2-api")
8682 (synopsis "Stax2 API")
8683 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8684significant new functionalities, such as full-featured bi-direction validation
8685interface and high-performance Typed Access API.")
8686 (license license:bsd-2)))
8687
8688(define-public java-woodstox-core
8689 (package
8690 (name "java-woodstox-core")
8691 (version "5.0.3")
8692 (source (origin
8693 (method url-fetch)
8694 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8695 "woodstox-core-" version ".tar.gz"))
8696 (sha256
8697 (base32
8698 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8699 (build-system ant-build-system)
8700 (arguments
8701 `(#:jar-name "woodstox.jar"
8702 #:test-exclude
8703 (list "**/Base*.java" "failing/**")
8704 #:phases
8705 (modify-phases %standard-phases
8706 (add-before 'build 'remove-msv-dep
8707 (lambda _
8708 ;; we don't need osgi, and it depends on msv
8709 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8710 ;; msv's latest release is from 2011 and we don't need it
8711 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8712 (delete-file-recursively "src/test/java/wstxtest/osgi")
8713 (delete-file-recursively "src/test/java/wstxtest/msv")
8714 #t))
8715 (add-before 'build 'copy-resources
8716 (lambda _
8717 (copy-recursively "src/main/resources" "build/classes")
8718 #t)))))
8719 (inputs
8720 `(("stax2" ,java-stax2-api)))
8721 (native-inputs
8722 `(("junit" ,java-junit)))
8723 (home-page "https://github.com/FasterXML/woodstox")
8724 (synopsis "Stax XML API implementation")
8725 (description "Woodstox is a stax XML API implementation.")
8726 (license license:asl2.0)))
8727
8728(define-public java-fasterxml-jackson-dataformat-xml
8729 (package
8730 (name "java-fasterxml-jackson-dataformat-xml")
8731 (version "2.9.4")
8732 (source (origin
8733 (method url-fetch)
8734 (uri (string-append "https://github.com/FasterXML/"
8735 "jackson-dataformat-xml/archive/"
8736 "jackson-dataformat-xml-" version ".tar.gz"))
8737 (sha256
8738 (base32
8739 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8740 (build-system ant-build-system)
8741 (arguments
8742 `(#:jar-name "jackson-dataformat-xml.jar"
8743 #:source-dir "src/main/java"
8744 #:test-exclude
8745 (list "**/failing/**")
8746 #:phases
8747 (modify-phases %standard-phases
8748 (add-before 'configure 'generate-PackageVersion.java
8749 (lambda _
8750 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8751 (in (string-append out ".in")))
8752 (copy-file in out)
8753 (newline)
8754 (substitute* out
8755 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8756 (("@projectversion@") ,version)
8757 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8758 (("@projectartifactid@") "jackson-dataformat-xml")))
8759 #t))
8760 (add-before 'build 'copy-resources
8761 (lambda _
8762 (copy-recursively "src/main/resources" "build/classes")
8763 #t)))))
8764 (inputs
8765 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8766 ("jackson-core" ,java-fasterxml-jackson-core)
8767 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8768 ("jackson-databind" ,java-fasterxml-jackson-databind)
8769 ("stax2-api" ,java-stax2-api)
8770 ("woodstox" ,java-woodstox-core)))
8771 (native-inputs
8772 `(("junit" ,java-junit)
8773 ("hamcrest" ,java-hamcrest-core)))
8774 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8775 (synopsis "Read and write XML")
8776 (description "This package contains Jackson extension component for reading
8777and writing XML encoded data.
8778
8779Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8780approach (that is, no support is added for \"Schema-first\" approach). Support
8781for JAXB annotations is provided by JAXB annotation module; this module
8782provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8783@code{JsonFactory}) as well as small number of higher level overrides needed to
8784make data-binding work.")
8785 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8786
8787(define-public java-hdrhistogram
8788 (package
8789 (name "java-hdrhistogram")
8790 (version "2.1.9")
8791 (source (origin
8792 (method url-fetch)
8793 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8794 "archive/HdrHistogram-" version ".tar.gz"))
8795 (sha256
8796 (base32
8797 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8798 (build-system ant-build-system)
8799 (arguments
8800 `(#:jar-name "java-hdrhistogram.jar"
8801 #:source-dir "src/main/java"
8802 #:phases
8803 (modify-phases %standard-phases
8804 (add-before 'configure 'set-version
8805 (lambda _
8806 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8807 (template (string-append version-java ".template")))
8808 (copy-file template version-java)
8809 (substitute* version-java
8810 (("\\$VERSION\\$") ,version)
8811 (("\\$BUILD_TIME\\$") "0"))
8812 #t))))))
8813 (native-inputs
8814 `(("junit" ,java-junit)
8815 ("hamcrest" ,java-hamcrest-core)))
8816 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8817 (synopsis "High dynamic range histogram")
8818 (description "Hdrhistogram allows to create histograms that support
8819recording and analyzing sampled data value counts across a configurable integer
8820value range with configurable value precision within the range. Value precision
8821is expressed as the number of significant digits in the value recording, and
8822provides control over value quantization behavior across the value range and
8823the subsequent value resolution at any given level.")
8824 (license license:public-domain)))
8825
8826(define-public java-cofoja
8827 (package
8828 (name "java-cofoja")
8829 (version "1.3")
8830 (source (origin
8831 (method git-fetch)
8832 (uri (git-reference
8833 (url "https://github.com/nhatminhle/cofoja.git")
8834 (commit (string-append "v" version))))
8835 (file-name (string-append "java-cofoja-" version "-checkout"))
8836 (sha256
8837 (base32
8838 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8839 (build-system ant-build-system)
8840 (arguments
8841 `(#:build-target "dist"
8842 #:test-target "test"
8843 #:jdk ,icedtea-8
8844 #:make-flags
8845 (list "-Ddist.dir=dist")
8846 #:modules ((guix build ant-build-system)
8847 (guix build java-utils)
8848 (guix build utils)
8849 (srfi srfi-1)
8850 (ice-9 match))
8851 #:phases
8852 (modify-phases %standard-phases
8853 ;; The bulid system ignores the class path the ant-build-system sets
8854 ;; up and instead expects to find all dependencies in the "lib"
8855 ;; directory.
8856 (add-after 'unpack 'create-libdir
8857 (lambda* (#:key inputs #:allow-other-keys)
8858 (mkdir-p "lib")
8859 (for-each
8860 (lambda (file)
8861 (let ((target (string-append "lib/" (basename file))))
8862 (unless (file-exists? target)
8863 (symlink file target))))
8864 (append-map (match-lambda
8865 ((label . dir)
8866 (find-files dir "\\.jar$")))
8867 inputs))
8868 #t))
8869 (replace 'install (install-jars "dist")))))
8870 (inputs
8871 `(("java-asm" ,java-asm)))
8872 (native-inputs
8873 `(("java-junit" ,java-junit)))
8874 (home-page "https://github.com/nhatminhle/cofoja")
8875 (synopsis "Contracts for Java")
8876 (description "Contracts for Java, or Cofoja for short, is a contract
8877programming framework and test tool for Java, which uses annotation processing
8878and bytecode instrumentation to provide run-time checking. (In particular,
8879this is not a static analysis tool.)")
8880 (license license:lgpl3+)))
8881
8882(define-public java-aopalliance
8883 (package
8884 (name "java-aopalliance")
8885 (version "1.0")
8886 (source (origin
8887 (method git-fetch)
8888 ;; Note: this git repository is not official, but contains the
8889 ;; source code that is in the CVS repository. Downloading the
8890 ;; tarball from sourceforge is undeterministic, and the cvs download
8891 ;; fails.
8892 (uri (git-reference
8893 (url "https://github.com/hoverruan/aopalliance")
8894 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8895 (file-name (string-append name "-" version))
8896 (sha256
8897 (base32
8898 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8899 (build-system ant-build-system)
8900 (arguments
8901 `(#:jar-name "java-aopalliance.jar"
8902 #:jdk ,icedtea-8
8903 #:tests? #f; no tests
8904 #:source-dir "aopalliance/src/main"))
8905 (home-page "http://aopalliance.sourceforge.net")
8906 (synopsis "Aspect-Oriented Programming")
8907 (description "The AOP Alliance project is a joint project between several
8908software engineering people who are interested in Aspect-Oriented Programming
8909(AOP) and Java.")
8910 (license license:public-domain)))
8911
8912(define-public java-javax-inject
8913 (package
8914 (name "java-javax-inject")
8915 (version "tck-1")
8916 (source (origin
8917 (method url-fetch)
8918 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8919 "archive/javax.inject-" version ".tar.gz"))
8920 (sha256
8921 (base32
8922 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8923 (build-system ant-build-system)
8924 (arguments
8925 `(#:jar-name "java-javax-inject.jar"
8926 #:jdk ,icedtea-8
8927 #:tests? #f)); no tests
8928 (home-page "http://github.com/javax-inject/javax-inject")
8929 (synopsis "JSR-330: Dependency Injection for Java")
8930 (description "This package specifies a means for obtaining objects in such
8931a way as to maximize reusability, testability and maintainability compared to
8932traditional approaches such as constructors, factories, and service locators
8933(e.g., JNDI). This process, known as dependency injection, is beneficial to
8934most nontrivial applications.
8935
8936Many types depend on other types. For example, a @var{Stopwatch} might depend
8937on a @var{TimeSource}. The types on which a type depends are known as its
8938dependencies. The process of finding an instance of a dependency to use at run
8939time is known as resolving the dependency. If no such instance can be found,
8940the dependency is said to be unsatisfied, and the application is broken.")
8941 (license license:asl2.0)))
8942
8943(define-public java-guice
8944 (package
8945 (name "java-guice")
8946 (version "4.1")
8947 (source (origin
8948 (method url-fetch)
8949 (uri (string-append "https://github.com/google/guice/archive/"
8950 version ".tar.gz"))
8951 (file-name (string-append name "-" version ".tar.gz"))
8952 (modules '((guix build utils)))
8953 (snippet
8954 `(begin
8955 (for-each delete-file (find-files "." ".*.jar"))))
8956 (sha256
8957 (base32
8958 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8959 (build-system ant-build-system)
8960 (arguments
8961 `(#:jar-name "java-guice.jar"
8962 #:jdk ,icedtea-8
8963 #:tests? #f; FIXME: tests are not in a java sub directory
8964 #:source-dir "core/src"))
8965 (inputs
8966 `(("guava" ,java-guava)
8967 ("java-cglib" ,java-cglib)
8968 ("java-aopalliance" ,java-aopalliance)
8969 ("java-javax-inject" ,java-javax-inject)
8970 ("java-asm" ,java-asm)))
8971 (home-page "https://github.com/google/guice")
8972 (synopsis "Lightweight dependency injection framework")
8973 (description "Guice is a lightweight dependency injection framework fo
8974Java 6 and above.")
8975 (license license:asl2.0)))
8976
8977(define-public java-guice-servlet
8978 (package
8979 (inherit java-guice)
8980 (name "java-guice-servlet")
8981 (arguments
8982 `(#:jar-name "guice-servlet.jar"
8983 #:source-dir "extensions/servlet/src/"
8984 #:jdk ,icedtea-8
8985 #:tests? #f)); FIXME: not in a java subdir
8986 (inputs
8987 `(("guice" ,java-guice)
8988 ("servlet" ,java-classpathx-servletapi)
8989 ,@(package-inputs java-guice)))))
8990
8991(define-public java-assertj
8992 (package
8993 (name "java-assertj")
8994 (version "3.8.0")
8995 (source (origin
8996 (method url-fetch)
8997 (uri (string-append "https://github.com/joel-costigliola/"
8998 "assertj-core/archive/"
8999 "assertj-core-" version ".tar.gz"))
9000 (sha256
9001 (base32
9002 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
9003 (build-system ant-build-system)
9004 (arguments
9005 `(#:jar-name "java-assertj.jar"
9006 #:jdk ,icedtea-8
9007 #:source-dir "src/main/java"
9008 #:tests? #f)); depends on tng-junit which depends on assertj
9009 (inputs
9010 `(("cglib" ,java-cglib)
9011 ("junit" ,java-junit)
9012 ("hamcrest" ,java-hamcrest-core)))
9013 (native-inputs
9014 `(("mockito" ,java-mockito-1)))
9015 (home-page "https://joel-costigliola.github.io/assertj/index.html")
9016 (synopsis "Fluent assertions for java")
9017 (description "AssertJ core is a Java library that provides a fluent
9018interface for writing assertions. Its main goal is to improve test code
9019readability and make maintenance of tests easier.")
9020 (license license:asl2.0)))
9021
9022(define-public java-jboss-javassist
9023 (package
9024 (name "java-jboss-javassist")
9025 (version "3.21.0")
9026 (source (origin
9027 (method url-fetch)
9028 (uri (string-append "https://github.com/jboss-javassist/javassist/"
9029 "archive/rel_"
9030 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
9031 "_ga.tar.gz"))
9032 (sha256
9033 (base32
9034 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
9035 (build-system ant-build-system)
9036 (arguments
9037 `(#:jar-name "java-jboss-javassist.jar"
9038 #:jdk ,icedtea-8
9039 #:source-dir "src/main"
9040 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
9041 #:phases
9042 (modify-phases %standard-phases
9043 (add-before 'configure 'remove-binary
9044 (lambda _
9045 (delete-file "javassist.jar")
9046 #t)))))
9047 (native-inputs
9048 `(("junit" ,java-junit)))
9049 (home-page "https://github.com/jboss-javassist/javassist")
9050 (synopsis "Java bytecode engineering toolkit")
9051 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9052manipulation simple. It is a class library for editing bytecodes in Java; it
9053enables Java programs to define a new class at runtime and to modify a class
9054file when the JVM loads it.")
9055 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
9056
9057(define-public java-jcommander
9058 (package
9059 (name "java-jcommander")
9060 (version "1.71")
9061 (source (origin
9062 (method url-fetch)
9063 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
9064 version ".tar.gz"))
9065 (file-name (string-append name "-" version ".tar.gz"))
9066 (sha256
9067 (base32
9068 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
9069 (build-system ant-build-system)
9070 (arguments
9071 `(#:jar-name "java-jcommander.jar"
9072 #:jdk ,icedtea-8
9073 #:tests? #f; requires testng which depends on jcommander
9074 #:source-dir "src/main/java"))
9075 (home-page "https://jcommander.org")
9076 (synopsis "Command line parameters parser")
9077 (description "JCommander is a very small Java framework that makes it
9078trivial to parse command line parameters. Parameters are declared with
9079annotations.")
9080 (license license:asl2.0)))
9081
9082(define-public java-bsh
9083 (package
9084 (name "java-bsh")
9085 (version "2.0b6")
9086 (source (origin
9087 (method url-fetch)
9088 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
9089 version ".tar.gz"))
9090 (file-name (string-append name "-" version ".tar.gz"))
9091 (sha256
9092 (base32
9093 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
9094 (build-system ant-build-system)
9095 (arguments
9096 `(#:build-target "jarall"
9097 #:test-target "junit-tests-all"
9098 #:phases
9099 (modify-phases %standard-phases
9100 (replace 'install
9101 (lambda* (#:key outputs #:allow-other-keys)
9102 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9103 (mkdir-p share)
9104 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9105 #t))))))
9106 (home-page "http://beanshell.org/")
9107 (synopsis "Lightweight Scripting for Java")
9108 (description "BeanShell is a small, free, embeddable Java source
9109interpreter with object scripting language features, written in Java.
9110BeanShell dynamically executes standard Java syntax and extends it with common
9111scripting conveniences such as loose types, commands, and method closures like
9112those in Perl and JavaScript.")
9113 (license license:asl2.0)))
9114
9115(define-public java-fest-util
9116 (package
9117 (name "java-fest-util")
9118 (version "1.2.5")
9119 (source (origin
9120 (method url-fetch)
9121 (uri (string-append "https://github.com/alexruiz/fest-util/"
9122 "archive/fest-util-" version ".tar.gz"))
9123 (sha256
9124 (base32
9125 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
9126 (build-system ant-build-system)
9127 (arguments
9128 `(#:jar-name "java-fest-util.jar"
9129 #:source-dir "src/main/java"))
9130 (native-inputs
9131 `(("junit" ,java-junit)
9132 ("hamcrest" ,java-hamcrest-core)))
9133 (home-page "https://github.com/alexruiz/fest-util")
9134 (synopsis "FEST common utilities")
9135 (description "Common utilities used in all FEST module.")
9136 (license license:asl2.0)))
9137
9138(define-public java-fest-test
9139 (package
9140 (name "java-fest-test")
9141 (version "2.1.0")
9142 (source (origin
9143 (method url-fetch)
9144 (uri (string-append "https://github.com/alexruiz/fest-test/"
9145 "archive/fest-test-" version ".tar.gz"))
9146 (sha256
9147 (base32
9148 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
9149 (build-system ant-build-system)
9150 (arguments
9151 `(#:jar-name "java-fest-test.jar"
9152 #:source-dir "src/main/java"
9153 #:tests? #f)); no tests
9154 (inputs
9155 `(("junit" ,java-junit)))
9156 (home-page "https://github.com/alexruiz/fest-test")
9157 (synopsis "Common FEST testing infrastructure")
9158 (description "Fest-test contains the common FEST testing infrastructure.")
9159 (license license:asl2.0)))
9160
9161(define-public java-fest-assert
9162 (package
9163 (name "java-fest-assert")
9164 (version "2.0M10")
9165 (source (origin
9166 (method url-fetch)
9167 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
9168 "archive/fest-assert-core-" version ".tar.gz"))
9169 (sha256
9170 (base32
9171 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
9172 (build-system ant-build-system)
9173 (arguments
9174 `(#:jar-name "java-fest-assert.jar"
9175 #:source-dir "src/main/java"
9176 #:test-exclude
9177 (list
9178 "**/Abstract*.java"
9179 "**/*BaseTest.java"
9180 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9181 "**/MessageFormatter_format_Test.java"
9182 "**/internal/*/*_assert*_Test.java")))
9183 (inputs
9184 `(("java-fest-util" ,java-fest-util)))
9185 (native-inputs
9186 `(("java-junit" ,java-junit)
9187 ("java-fest-test" ,java-fest-test)
9188 ("java-hamcrest-core" ,java-hamcrest-core)
9189 ("java-mockito" ,java-mockito-1)
9190 ("java-cglib" ,java-cglib)
9191 ("java-objenesis" ,java-objenesis)
9192 ("java-asm" ,java-asm)))
9193 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9194 (synopsis "FEST fluent assertions")
9195 (description "FEST-Assert provides a fluent interface for assertions.")
9196 (license license:asl2.0)))
9197
9198(define-public java-testng
9199 (package
9200 (name "java-testng")
9201 (version "6.14.3")
9202 (source (origin
9203 (method git-fetch)
9204 (uri (git-reference
9205 (url "https://github.com/cbeust/testng.git")
9206 (commit version)))
9207 (file-name (string-append name "-" version "-checkout"))
9208 (sha256
9209 (base32
9210 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
9211 (build-system ant-build-system)
9212 (arguments
9213 `(#:jdk ,icedtea-8; java.util.function
9214 #:jar-name "java-testng.jar"
9215 #:source-dir "src/main/java"
9216 #:phases
9217 (modify-phases %standard-phases
9218 ;; FIXME: I don't know why these tests fail
9219 (add-after 'unpack 'delete-failing-tests
9220 (lambda _
9221 (substitute* "src/test/resources/testng.xml"
9222 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9223 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9224 #t))
9225 ;; We don't have groovy
9226 (add-after 'unpack 'delete-groovy-tests
9227 (lambda _
9228 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9229 (substitute* "src/test/resources/testng.xml"
9230 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9231 #t))
9232 (add-before 'build 'copy-resources
9233 (lambda _
9234 (copy-recursively "src/main/resources" "build/classes")
9235 #t))
9236 (add-before 'check 'copy-test-resources
9237 (lambda _
9238 (copy-recursively "src/test/resources" "build/test-classes")
9239 #t))
9240 (replace 'check
9241 (lambda _
9242 (invoke "ant" "compile-tests")
9243 ;; we don't have groovy
9244 (substitute* "src/test/resources/testng.xml"
9245 (("<class name=\"test.groovy.GroovyTest\" />") ""))
9246 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9247 ":build/classes"
9248 ":build/test-classes")
9249 "-Dtest.resources.dir=src/test/resources"
9250 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
9251 (propagated-inputs
9252 `(("junit" ,java-junit)
9253 ("java-jsr305" ,java-jsr305)
9254 ("java-bsh" ,java-bsh)
9255 ("java-jcommander" ,java-jcommander)
9256 ("java-guice" ,java-guice)
9257 ("snakeyaml" ,java-snakeyaml)))
9258 (native-inputs
9259 `(("guava" ,java-guava)
9260 ("java-javax-inject" ,java-javax-inject)
9261 ("java-hamcrest" ,java-hamcrest-all)
9262 ("java-assertj" ,java-assertj)
9263 ("java-mockito" ,java-mockito-1)
9264 ("cglib" ,java-cglib)
9265 ("asm" ,java-asm)
9266 ("aopalliance" ,java-aopalliance)))
9267 (home-page "https://testng.org")
9268 (synopsis "Testing framework")
9269 (description "TestNG is a testing framework inspired from JUnit and NUnit
9270but introducing some new functionalities that make it more powerful and easier
9271to use.")
9272 (license license:asl2.0)))
9273
9274(define-public java-jnacl
9275 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9276 (revision "2"))
9277 (package
9278 (name "java-jnacl")
9279 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9280 (source (origin
9281 (method git-fetch)
9282 (uri (git-reference
9283 (url "https://github.com/neilalexander/jnacl.git")
9284 (commit commit)))
9285 (file-name (git-file-name name version))
9286 (sha256
9287 (base32
9288 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9289 (build-system ant-build-system)
9290 (arguments
9291 `(#:jar-name "jnacl.jar"
9292 #:source-dir "src/main/java"
9293 #:jdk ,icedtea-8
9294 #:phases
9295 (modify-phases %standard-phases
9296 (add-before 'build 'fix-tests
9297 (lambda _
9298 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9299 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9300 (("assertions.Assertions") "assertions.api.Assertions"))
9301 #t))
9302 (replace 'check
9303 (lambda _
9304 (invoke "ant" "compile-tests")
9305 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9306 ":build/classes"
9307 ":build/test-classes")
9308 "org.testng.TestNG" "-testclass"
9309 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9310 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9311 ":build/classes"
9312 ":build/test-classes")
9313 "org.testng.TestNG" "-testclass"
9314 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9315 (native-inputs
9316 `(("java-testng" ,java-testng)
9317 ("java-fest-util" ,java-fest-util)
9318 ("java-fest-assert" ,java-fest-assert)))
9319 (home-page "https://github.com/neilalexander/jnacl")
9320 (synopsis "Java implementation of NaCl")
9321 (description "Pure Java implementation of the NaCl: Networking and
9322Cryptography library.")
9323 (license license:bsd-2))))
9324
9325(define-public java-mvel2
9326 (package
9327 (name "java-mvel2")
9328 (version "2.3.1")
9329 (source (origin
9330 (method url-fetch)
9331 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9332 version ".Final.tar.gz"))
9333 (sha256
9334 (base32
9335 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9336 (build-system ant-build-system)
9337 (arguments
9338 `(#:jar-name "mvel2.jar"
9339 #:source-dir "src/main/java"
9340 #:test-exclude
9341 (list "**/Abstract*.java"
9342 ;; Base class with no tests
9343 "**/MVELThreadTest.java")
9344 #:phases
9345 (modify-phases %standard-phases
9346 (add-after 'install 'install-bin
9347 (lambda* (#:key outputs #:allow-other-keys)
9348 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9349 (mkdir-p bin)
9350 (with-output-to-file (string-append bin "/mvel2")
9351 (lambda _
9352 (display
9353 (string-append
9354 "#!" (which "bash") "\n"
9355 "if [ \"$#\" -ne \"2\" ]; then\n"
9356 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9357 "exit\n"
9358 "fi\n"
9359 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9360 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9361 " org.mvel2.sh.Main $1"))))
9362 (chmod (string-append bin "/mvel2") #o755))
9363 #t)))))
9364 (native-inputs
9365 `(("junit" ,java-junit)
9366 ("hamcrest" ,java-hamcrest-core)))
9367 (home-page "https://github.com/mvel/mvel")
9368 (synopsis "MVFLEX Expression Language")
9369 (description "MVEL has largely been inspired by Java syntax, but has some
9370fundamental differences aimed at making it more efficient as an expression
9371language, such as operators that directly support collection, array and string
9372matching, as well as regular expressions. MVEL is used to evaluate expressions
9373written using Java syntax.
9374
9375In addition to the expression language, MVEL serves as a templating language for
9376configuration and string construction.")
9377 (license license:asl2.0)))
9378
9379(define-public java-commons-jexl-2
9380 (package
9381 (name "java-commons-jexl")
9382 (version "2.1.1")
9383 (source (origin
9384 (method url-fetch)
9385 (uri (string-append "mirror://apache/commons/jexl/source/"
9386 "commons-jexl-" version "-src.tar.gz"))
9387 (sha256
9388 (base32
9389 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9390 (build-system ant-build-system)
9391 (arguments
9392 `(#:jar-name "commons-jexl-2.jar"
9393 #:jdk ,icedtea-8
9394 #:source-dir "src/main/java"
9395 #:phases
9396 (modify-phases %standard-phases
9397 (add-before 'check 'disable-broken-tests
9398 (lambda* (#:key inputs #:allow-other-keys)
9399 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9400 (substitute* "ArithmeticTest.java"
9401 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9402 (("asserter.assertExpression\\(\"imanull") "//"))
9403 ;; This test fails with "ambiguous method invocation"
9404 (delete-file "CacheTest.java")
9405 ;; This test doesn't have access to the temp directory
9406 (substitute* "ClassCreatorTest.java"
9407 (("java.io.tmpdir") "user.dir"))
9408 ;; This test fails in trying to detect whether it can run.
9409 (substitute* "ClassCreator.java"
9410 (("boolean canRun =.*") "boolean canRun = false;\n"))
9411 ;; ...and these tests depend on it.
9412 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9413 (delete-file "scripting/JexlScriptEngineTest.java"))
9414 #t))
9415 (add-before 'build 'run-javacc
9416 (lambda _
9417 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9418 (invoke "java" "jjtree" "Parser.jjt")
9419 (invoke "java" "javacc" "Parser.jj"))
9420 #t)))))
9421 (inputs
9422 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9423 (native-inputs
9424 `(("java-junit" ,java-junit)
9425 ("java-hamcrest-core" ,java-hamcrest-core)
9426 ("javacc" ,javacc-4)))
9427 (home-page "https://commons.apache.org/proper/commons-jexl/")
9428 (synopsis "Java Expression Language ")
9429 (description "JEXL is a library intended to facilitate the implementation
9430of dynamic and scripting features in applications and frameworks written in
9431Java. JEXL implements an Expression Language based on some extensions to the
9432JSTL Expression Language supporting most of the constructs seen in
9433shell-script or ECMAScript. Its goal is to expose scripting features usable
9434by technical operatives or consultants working with enterprise platforms.")
9435 (license license:asl2.0)))
9436
9437(define-public java-lz4
9438 (package
9439 (name "java-lz4")
9440 (version "1.4.0")
9441 (source (origin
9442 (method url-fetch)
9443 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9444 version ".tar.gz"))
9445 (file-name (string-append name "-" version ".tar.gz"))
9446 (sha256
9447 (base32
9448 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9449 (build-system ant-build-system)
9450 (arguments
9451 `(#:jar-name "lz4.jar"
9452 #:jdk ,icedtea-8
9453 #:source-dir "src/java:src/java-unsafe"
9454 #:tests? #f; FIXME: requires more dependencies
9455 #:phases
9456 (modify-phases %standard-phases
9457 (add-before 'configure 'generate-source
9458 (lambda _
9459 (with-directory-excursion "src/build/source_templates"
9460 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9461 #t)))))
9462 (native-inputs
9463 `(("mvel" ,java-mvel2)))
9464 (home-page "https://jpountz.github.io/lz4-java")
9465 (synopsis "Compression algorithm")
9466 (description "LZ4 - Java is a Java port of the popular lz4 compression
9467algorithms and xxHash hashing algorithm.")
9468 (license license:asl2.0)))
9469
9470(define-public java-bouncycastle
9471 (package
9472 (name "java-bouncycastle")
9473 (version "1.60")
9474 (source (origin
9475 (method url-fetch)
9476 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9477 (substring version 0 1) "v"
9478 (substring version 2 4) ".tar.gz"))
9479 (sha256
9480 (base32
9481 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9482 (modules '((guix build utils)))
9483 (snippet
9484 '(begin
9485 (for-each delete-file
9486 (find-files "." "\\.jar$"))
9487 #t))))
9488 (build-system ant-build-system)
9489 (arguments
9490 `(#:jdk ,icedtea-8
9491 #:tests? #f
9492 #:phases
9493 (modify-phases %standard-phases
9494 (replace 'build
9495 (lambda _
9496 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9497 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9498 ;; FIXME: the tests freeze.
9499 ;; (replace 'check
9500 ;; (lambda _
9501 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9502 (replace 'install
9503 (install-jars "build/artifacts/jdk1.5/jars")))))
9504 (inputs
9505 `(("java-javax-mail" ,java-javax-mail)))
9506 (native-inputs
9507 `(("unzip" ,unzip)
9508 ("junit" ,java-junit)
9509 ("java-native-access" ,java-native-access)
9510 ("java-native-access-platform" ,java-native-access-platform)))
9511 (home-page "https://www.bouncycastle.org")
9512 (synopsis "Cryptographic library")
9513 (description "Bouncy Castle is a cryptographic library for the Java
9514programming language.")
9515 (license license:expat)))
9516
9517(define-public java-lmax-disruptor
9518 (package
9519 (name "java-lmax-disruptor")
9520 (version "3.3.7")
9521 (source (origin
9522 (method url-fetch)
9523 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9524 "archive/" version ".tar.gz"))
9525 (file-name (string-append name "-" version ".tar.gz"))
9526 (sha256
9527 (base32
9528 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9529 (build-system ant-build-system)
9530 (arguments
9531 `(#:jar-name "java-lmax-disruptor.jar"
9532 #:jdk ,icedtea-8
9533 #:tests? #f)); tests hang
9534 (inputs
9535 `(("junit" ,java-junit)
9536 ("java-hdrhistogram" ,java-hdrhistogram)
9537 ("java-jmock" ,java-jmock)
9538 ("java-jmock-legacy" ,java-jmock-legacy)
9539 ("java-jmock-junit4" ,java-jmock-junit4)
9540 ("java-hamcrest-all" ,java-hamcrest-all)))
9541 (native-inputs
9542 `(("cglib" ,java-cglib)
9543 ("objenesis" ,java-objenesis)
9544 ("asm" ,java-asm)))
9545 (home-page "https://www.lmax.com/disruptor")
9546 (synopsis "High performance inter-thread communication")
9547 (description "LMAX Disruptor is a software pattern and software component
9548for high performance inter-thread communication that avoids the need for
9549message queues or resource locking.")
9550 (license license:asl2.0)))
9551
9552(define-public java-commons-bcel
9553 (package
9554 (name "java-commons-bcel")
9555 (version "6.1")
9556 (source (origin
9557 (method url-fetch)
9558 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9559 version "-src.tar.gz"))
9560 (sha256
9561 (base32
9562 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9563 (build-system ant-build-system)
9564 (arguments
9565 `(#:jar-name "bcel.jar"
9566 #:jdk ,icedtea-8
9567 #:source-dir "src/main/java"
9568 #:test-dir "src/test/java"
9569 ;; FIXME: Tests require the unpackaged jna.
9570 #:tests? #f))
9571 (home-page "https://commons.apache.org/proper/commons-bcel/")
9572 (synopsis "Byte code engineering library")
9573 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9574intended to give users a convenient way to analyze, create, and
9575manipulate (binary) Java class files. Classes are represented by objects
9576which contain all the symbolic information of the given class: methods, fields
9577and byte code instructions, in particular.
9578
9579Such objects can be read from an existing file, be transformed by a
9580program (e.g. a class loader at run-time) and written to a file again. An
9581even more interesting application is the creation of classes from scratch at
9582run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9583if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9584of Java @code{.class} files.")
9585 (license license:asl2.0)))
9586
9587(define-public java-xerial-core
9588 (package
9589 (name "java-xerial-core")
9590 (version "2.1")
9591 (source (origin
9592 (method url-fetch)
9593 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9594 version ".tar.gz"))
9595 (file-name (string-append name "-" version ".tar.gz"))
9596 (sha256
9597 (base32
9598 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9599 (build-system ant-build-system)
9600 (arguments
9601 `(#:jar-name "xerial-core.jar"
9602 #:source-dir "xerial-core/src/main/java"
9603 #:test-dir "xerial-core/src/test"
9604 #:phases
9605 (modify-phases %standard-phases
9606 (add-before 'build 'copy-resources
9607 (lambda _
9608 (copy-recursively "xerial-core/src/main/resources"
9609 "build/classes")
9610 #t)))))
9611 (native-inputs
9612 `(("junit" ,java-junit)
9613 ("hamcrest" ,java-hamcrest-core)))
9614 (home-page "https://github.com/xerial/xerial-java")
9615 (synopsis "Data management libraries for Java")
9616 (description "Xerial is a set of data management libraries for the Java
9617programming language. The ultimate goal of the Xerial project is to manage
9618everything as database, including class objects, text format data, data
9619streams, etc.")
9620 (license license:asl2.0)))
9621
9622(define-public java-powermock-reflect
9623 (package
9624 (name "java-powermock-reflect")
9625 (version "1.7.3")
9626 (source (origin
9627 (method url-fetch)
9628 (uri (string-append "https://github.com/powermock/powermock/"
9629 "archive/powermock-" version ".tar.gz"))
9630 (file-name (string-append name "-" version ".tar.gz"))
9631 (sha256
9632 (base32
9633 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9634 (patches
9635 (search-patches "java-powermock-fix-java-files.patch"))))
9636 (build-system ant-build-system)
9637 (arguments
9638 `(#:jar-name "java-powermock-reflect.jar"
9639 #:jdk ,icedtea-8
9640 #:source-dir "powermock-reflect/src/main/java"
9641 #:test-dir "powermock-reflect/src/test"))
9642 (inputs
9643 `(("java-objenesis" ,java-objenesis)))
9644 (native-inputs
9645 `(("junit" ,java-junit)
9646 ("cglib" ,java-cglib)
9647 ("asm" ,java-asm)
9648 ("hamcrest" ,java-hamcrest-core)
9649 ("assertj" ,java-assertj)))
9650 (home-page "https://github.com/powermock/powermock")
9651 (synopsis "Mock library extension framework")
9652 (description "PowerMock is a framework that extends other mock libraries
9653such as EasyMock with more powerful capabilities. PowerMock uses a custom
9654classloader and bytecode manipulation to enable mocking of static methods,
9655constructors, final classes and methods, private methods, removal of static
9656initializers and more. By using a custom classloader no changes need to be
9657done to the IDE or continuous integration servers which simplifies adoption.")
9658 (license license:asl2.0)))
9659
9660(define-public java-powermock-core
9661 (package
9662 (inherit java-powermock-reflect)
9663 (name "java-powermock-core")
9664 (arguments
9665 `(#:jar-name "java-powermock-core.jar"
9666 #:source-dir "powermock-core/src/main/java"
9667 #:test-dir "powermock-core/src/test"
9668 #:tests? #f; requires powermock-api
9669 #:jdk ,icedtea-8
9670 #:phases
9671 (modify-phases %standard-phases
9672 (add-before 'build 'copy-resources
9673 (lambda _
9674 (copy-recursively "powermock-core/src/main/resources"
9675 "build/classes")
9676 #t)))))
9677 (inputs
9678 `(("reflect" ,java-powermock-reflect)
9679 ("javassist" ,java-jboss-javassist)))
9680 (native-inputs
9681 `(("junit" ,java-junit)
9682 ("assertj" ,java-assertj)
9683 ("mockito" ,java-mockito-1)))))
9684
9685(define-public java-powermock-api-support
9686 (package
9687 (inherit java-powermock-reflect)
9688 (name "java-powermock-api-support")
9689 (build-system ant-build-system)
9690 (arguments
9691 `(#:jar-name "java-powermock-api-support.jar"
9692 #:jdk ,icedtea-8
9693 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9694 #:tests? #f)); no tests
9695 (inputs
9696 `(("core" ,java-powermock-core)
9697 ("reflect" ,java-powermock-reflect)))))
9698
9699(define-public java-powermock-modules-junit4-common
9700 (package
9701 (inherit java-powermock-reflect)
9702 (name "java-powermock-modules-junit4-common")
9703 (build-system ant-build-system)
9704 (arguments
9705 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9706 #:jdk ,icedtea-8
9707 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9708 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9709 (inputs
9710 `(("core" ,java-powermock-core)
9711 ("easymock" ,java-easymock)
9712 ("reflect" ,java-powermock-reflect)
9713 ("hamcrest" ,java-hamcrest-core)
9714 ("cglib" ,java-cglib)))))
9715
9716(define-public java-powermock-modules-junit4
9717 (package
9718 (inherit java-powermock-reflect)
9719 (name "java-powermock-modules-junit4")
9720 (build-system ant-build-system)
9721 (arguments
9722 `(#:jar-name "java-powermock-modules-junit4.jar"
9723 #:jdk ,icedtea-8
9724 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9725 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9726 #:phases
9727 (modify-phases %standard-phases
9728 (add-before 'build 'fix-junit-detection
9729 (lambda _
9730 ;; Our junit version is 4.12-SNAPSHOT
9731 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9732 "PowerMockJUnit4MethodValidator.java")
9733 (("4.12") "4.12-SNAPSHOT"))
9734 #t)))))
9735 (inputs
9736 `(("core" ,java-powermock-core)
9737 ("reflect" ,java-powermock-reflect)
9738 ("common" ,java-powermock-modules-junit4-common)
9739 ("cglib" ,java-cglib)))
9740 (native-inputs
9741 `(("easymock" ,java-easymock)
9742 ("hamcrest" ,java-hamcrest-core)
9743 ("objenesis" ,java-objenesis)
9744 ("asm" ,java-asm)
9745 ("junit" ,java-junit)))))
9746
9747(define-public java-powermock-api-easymock
9748 (package
9749 (inherit java-powermock-reflect)
9750 (name "java-powermock-api-easymock")
9751 (build-system ant-build-system)
9752 (arguments
9753 `(#:jar-name "java-powermock-api-easymock.jar"
9754 #:jdk ,icedtea-8
9755 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9756 #:tests? #f; no tests
9757 #:phases
9758 (modify-phases %standard-phases
9759 (add-before 'build 'fix-file
9760 (lambda _
9761 ;; FIXME: This looks wrong, but it fixes a build error.
9762 (with-directory-excursion "powermock-api/powermock-api-easymock"
9763 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9764 (("classLoader instanceof MockClassLoader") "false")
9765 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9766 #t)))))
9767 (inputs
9768 `(("core" ,java-powermock-core)
9769 ("easymock" ,java-easymock)
9770 ("reflect" ,java-powermock-reflect)
9771 ("support" ,java-powermock-api-support)
9772 ("cglib" ,java-cglib)))))
9773
9774(define-public java-jboss-jms-api-spec
9775 (package
9776 (name "java-jboss-jms-api-spec")
9777 (version "2.0")
9778 (source (origin
9779 (method url-fetch)
9780 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9781 "archive/jboss-jms-api_" version
9782 "_spec-1.0.1.Final.tar.gz"))
9783 (sha256
9784 (base32
9785 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9786 (build-system ant-build-system)
9787 (arguments
9788 `(#:jar-name "java-jboss-jms-api_spec.jar"
9789 #:jdk ,icedtea-8
9790 #:source-dir "."
9791 #:tests? #f)); no tests
9792 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9793 (synopsis "Java Message Service API specification")
9794 (description "Java Message Service (JMS) API is used to send messages
9795messages between two or more clients. It is a messaging standard that allows
9796application components to create, send, receive, and read messages.")
9797 ; either gpl2 only with GPL Classpath Exception, or cddl.
9798 (license (list license:gpl2 license:cddl1.0))))
9799
9800(define-public java-mail
9801 (package
9802 (name "java-mail")
9803 (version "1.6.0")
9804 (source (origin
9805 (method url-fetch)
9806 (uri (string-append "https://github.com/javaee/javamail/archive/"
9807 "JAVAMAIL-1_6_0.tar.gz"))
9808 (sha256
9809 (base32
9810 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9811 (build-system ant-build-system)
9812 (arguments
9813 `(#:jar-name "java-mail.jar"
9814 #:jdk ,icedtea-8
9815 #:source-dir "mail/src/main/java"
9816 #:test-dir "mail/src/test"
9817 #:test-exclude
9818 (list "**/CollectorFormatterTest.java"
9819 "**/CompactFormatterTest.java"
9820 "**/DurationFilterTest.java"
9821 "**/MailHandlerTest.java"
9822 "**/GetLocalAddressTest.java"
9823 ;; FIXME: both end with:
9824 ;; java.lang.ClassNotFoundException:
9825 ;; javax.mail.internet.MimeMultipartParseTest
9826 "**/MimeMultipartParseTest.java"
9827 "**/SearchTermSerializationTest.java")
9828 #:phases
9829 (modify-phases %standard-phases
9830 (add-before 'configure 'move-version.java
9831 (lambda _
9832 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9833 "mail/src/main/java/javax/mail/Version.java")
9834 #t))
9835 (add-before 'build 'copy-resources
9836 (lambda _
9837 (copy-recursively "mail/src/main/resources/META-INF"
9838 "build/classes/META-INF")
9839 #t)))))
9840 (native-inputs
9841 `(("junit" ,java-junit)
9842 ("hamcrest" ,java-hamcrest-core)))
9843 (home-page "https://javaee.github.io/javamail/")
9844 (synopsis "Mail-related functionnalities in Java")
9845 (description "The JavaMail API provides a platform-independent and
9846protocol-independent framework to build mail and messaging applications.")
9847 ;; General Public License Version 2 only ("GPL") or the Common Development
9848 ;; and Distribution License("CDDL")
9849 (license (list license:cddl1.1
9850 license:gpl2)))); with classpath exception
9851
9852(define-public java-jeromq
9853 (package
9854 (name "java-jeromq")
9855 (version "0.4.3")
9856 (source (origin
9857 (method git-fetch)
9858 (uri (git-reference
9859 (url "https://github.com/zeromq/jeromq.git")
9860 (commit (string-append "v" version))))
9861 (file-name (string-append name "-" version "-checkout"))
9862 (sha256
9863 (base32
9864 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9865 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9866 (build-system ant-build-system)
9867 (arguments
9868 `(#:jar-name "java-jeromq.jar"
9869 #:source-dir "src/main/java"
9870 #:jdk ,icedtea-8
9871 #:test-exclude
9872 (list
9873 "**/Abstract*.java"
9874 ;; Requires network
9875 "**/ZBeaconTest.java"
9876 ;; Failures
9877 "**/DealerSpecTest.java"
9878 "**/CustomDecoderTest.java"
9879 "**/CustomEncoderTest.java"
9880 "**/ConnectRidTest.java"
9881 "**/ReqSpecTest.java"
9882 "**/PushPullSpecTest.java"
9883 "**/PubSubHwmTest.java"
9884 "**/RouterSpecTest.java"
9885 "**/ProxyTest.java")))
9886 (inputs
9887 `(("java-jnacl" ,java-jnacl)))
9888 (native-inputs
9889 `(("java-hamcrest-core" ,java-hamcrest-core)
9890 ("junit" ,java-junit)))
9891 (home-page "http://zeromq.org/bindings:java")
9892 (synopsis "Java binding for 0MQ")
9893 (description "Jeromq provides the java bindings for 0MQ.")
9894 (license license:mpl2.0)))
9895
9896(define-public java-kafka-clients
9897 (package
9898 (name "java-kafka-clients")
9899 (version "1.0.0")
9900 (source (origin
9901 (method url-fetch)
9902 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9903 version "-src.tgz"))
9904 (sha256
9905 (base32
9906 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9907 (build-system ant-build-system)
9908 (arguments
9909 `(#:jar-name "java-kafka-clients.jar"
9910 #:jdk ,icedtea-8
9911 #:source-dir "clients/src/main/java"
9912 #:test-dir "clients/src/test"
9913 #:test-exclude
9914 (list
9915 ;; This file does not contain a class
9916 "**/IntegrationTest.java"
9917 ;; Requires network
9918 "**/ClientUtilsTest.java"
9919 ;; End with errors that seem related to our powermock
9920 "**/KafkaProducerTest.java"
9921 "**/BufferPoolTest.java")))
9922 (inputs
9923 `(("java-slf4j-api" ,java-slf4j-api)
9924 ("java-lz4" ,java-lz4)))
9925 (native-inputs
9926 `(("junit" ,java-junit)
9927 ("hamcrest" ,java-hamcrest-all)
9928 ("objenesis" ,java-objenesis)
9929 ("asm" ,java-asm)
9930 ("cglib" ,java-cglib)
9931 ("javassist" ,java-jboss-javassist)
9932 ("snappy" ,java-snappy)
9933 ("easymock" ,java-easymock)
9934 ("powermock" ,java-powermock-core)
9935 ("powermock-easymock" ,java-powermock-api-easymock)
9936 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9937 ("powermock-junit4" ,java-powermock-modules-junit4)
9938 ("powermock-support" ,java-powermock-api-support)
9939 ("java-bouncycastle" ,java-bouncycastle)))
9940 (home-page "https://kafka.apache.org")
9941 (synopsis "Distributed streaming platform")
9942 (description "Kafka is a distributed streaming platform, which means:
9943@itemize
9944@item it can publish and subscribe to streams of records;
9945@item it can store streams of records in a fault-tolerant way;
9946@item it can process streams of records as they occur.
9947@end itemize")
9948 ;; Either cddl or gpl2 only.
9949 (license (list license:cddl1.1; actually cddl1.1
9950 license:gpl2)))); with classpath exception
9951
9952(define-public java-jdom
9953 (package
9954 (name "java-jdom")
9955 (version "1.1.3")
9956 (source (origin
9957 (method url-fetch)
9958 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9959 version ".tar.gz"))
9960 (sha256
9961 (base32
9962 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9963 (build-system ant-build-system)
9964 (arguments
9965 `(#:build-target "package"
9966 #:tests? #f; tests are run as part of the build process
9967 #:phases
9968 (modify-phases %standard-phases
9969 (replace 'install
9970 (install-jars "build")))))
9971 (home-page "http://jdom.org/")
9972 (synopsis "Access, manipulate, and output XML data")
9973 (description "Java-based solution for accessing, manipulating, and
9974outputting XML data from Java code.")
9975 (license license:bsd-4)))
9976
9977(define-public java-geronimo-xbean-reflect
9978 (package
9979 (name "java-geronimo-xbean-reflect")
9980 (version "4.5")
9981 (source (origin
9982 (method svn-fetch)
9983 (uri (svn-reference
9984 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9985 (revision 1807396)))
9986 (file-name (string-append name "-" version))
9987 (sha256
9988 (base32
9989 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9990 (build-system ant-build-system)
9991 (arguments
9992 `(#:jar-name "geronimo-xbean-reflect.jar"
9993 #:source-dir "xbean-reflect/src/main/java"
9994 #:test-dir "xbean-reflect/src/test"
9995 #:jdk ,icedtea-8
9996 #:test-exclude
9997 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9998 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9999 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
10000 #:phases
10001 (modify-phases %standard-phases
10002 (add-before 'build 'fix-source
10003 (lambda _
10004 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
10005 ;; org.apache.xbean.asm6 is actually repackaged java-asm
10006 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
10007 (("org.apache.xbean.asm5") "org.objectweb.asm"))
10008 #t))))))
10009 (inputs
10010 `(("asm" ,java-asm)
10011 ("log4j" ,java-log4j-api)
10012 ("log4j-1.2" ,java-log4j-1.2-api)
10013 ("log4j-core" ,java-log4j-core)
10014 ("logging" ,java-commons-logging-minimal)))
10015 (native-inputs
10016 `(("junit" ,java-junit)))
10017 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
10018 (synopsis "Dependency injection helper")
10019 (description "Xbean-reflect provides very flexible ways to create objects
10020and graphs of objects for dependency injection frameworks")
10021 (license license:asl2.0)))
10022
10023(define-public java-geronimo-xbean-bundleutils
10024 (package
10025 (inherit java-geronimo-xbean-reflect)
10026 (name "java-geronimo-xbean-bundleutils")
10027 (arguments
10028 `(#:jar-name "geronimo-xbean-bundleutils.jar"
10029 #:source-dir "xbean-bundleutils/src/main/java"
10030 #:test-dir "xbean-bundleutils/src/test"
10031 #:phases
10032 (modify-phases %standard-phases
10033 (add-before 'build 'fix-java
10034 (lambda _
10035 ;; We use a more recent version of osgi, so this file requires
10036 ;; more interface method implementations.
10037 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
10038 (("import org.osgi.framework.ServiceRegistration;")
10039 "import org.osgi.framework.ServiceRegistration;
10040import org.osgi.framework.ServiceFactory;
10041import java.util.Collection;
10042import org.osgi.framework.ServiceObjects;")
10043 (("public Bundle getBundle\\(\\)")
10044 "@Override
10045public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
10046 throw new UnsupportedOperationException();
10047}
10048@Override
10049public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10050 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10051 throw new UnsupportedOperationException();
10052}
10053public Bundle getBundle()"))
10054 #t)))))
10055 (inputs
10056 `(("java-slf4j" ,java-slf4j-api)
10057 ("java-asm" ,java-asm)
10058 ("java-osgi-framework" ,java-osgi-framework)
10059 ("java-eclipse-osgi" ,java-eclipse-osgi)
10060 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
10061
10062(define-public java-geronimo-xbean-asm-util
10063 (package
10064 (inherit java-geronimo-xbean-reflect)
10065 (name "java-geronimo-xbean-asm-util")
10066 (arguments
10067 `(#:jar-name "geronimo-xbean-asm-util.jar"
10068 #:source-dir "xbean-asm-util/src/main/java"
10069 #:tests? #f)); no tests
10070 (inputs
10071 `(("java-asm" ,java-asm)))
10072 (native-inputs '())))
10073
10074(define-public java-geronimo-xbean-finder
10075 (package
10076 (inherit java-geronimo-xbean-reflect)
10077 (name "java-geronimo-xbean-finder")
10078 (arguments
10079 `(#:jar-name "geronimo-xbean-finder.jar"
10080 #:source-dir "xbean-finder/src/main/java"
10081 #:test-dir "xbean-finder/src/test"))
10082 (inputs
10083 `(("java-slf4j-api" ,java-slf4j-api)
10084 ("java-asm" ,java-asm)
10085 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10086 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10087 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10088 ("java-osgi-framework" ,java-osgi-framework)))
10089 (native-inputs
10090 `(("java-junit" ,java-junit)
10091 ("java-hamcrest-core" ,java-hamcrest-core)))))
10092
10093(define-public java-gson
10094 (package
10095 (name "java-gson")
10096 (version "2.8.2")
10097 (source (origin
10098 (method url-fetch)
10099 (uri (string-append "https://github.com/google/gson/archive/"
10100 "gson-parent-" version ".tar.gz"))
10101 (sha256
10102 (base32
10103 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10104 (build-system ant-build-system)
10105 (arguments
10106 `(#:jar-name "gson.jar"
10107 #:source-dir "gson/src/main/java"
10108 #:test-dir "gson/src/test"))
10109 (native-inputs
10110 `(("java-junit" ,java-junit)
10111 ("java-hamcrest-core" ,java-hamcrest-core)))
10112 (home-page "https://github.com/google/gson")
10113 (synopsis "Java serialization/deserialization library from/to JSON")
10114 (description "Gson is a Java library that can be used to convert Java
10115Objects into their JSON representation. It can also be used to convert a JSON
10116string to an equivalent Java object. Gson can work with arbitrary Java objects
10117including pre-existing objects that you do not have source-code of.")
10118 (license license:asl2.0)))
10119
10120(define-public java-hawtjni
10121 (package
10122 (name "java-hawtjni")
10123 (version "1.15")
10124 (source (origin
10125 (method url-fetch)
10126 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10127 "hawtjni-project-" version ".tar.gz"))
10128 (sha256
10129 (base32
10130 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10131 (build-system ant-build-system)
10132 (arguments
10133 `(#:jar-name "hawtjni.jar"
10134 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10135 #:tests? #f; no tests
10136 #:phases
10137 (modify-phases %standard-phases
10138 (add-before 'build 'build-native
10139 (lambda* (#:key inputs #:allow-other-keys)
10140 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10141 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10142 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10143 "-fPIC" "-O2" include)
10144 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10145 "-fPIC" "-O2" include)
10146 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10147 "hawtjni.o" "hawtjni-callback.o")))
10148 #t))
10149 (add-after 'install 'install-native
10150 (lambda* (#:key outputs #:allow-other-keys)
10151 (let* ((out (assoc-ref outputs "out"))
10152 (lib (string-append out "/lib"))
10153 (inc (string-append out "/include")))
10154 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10155 (install-file "libhawtjni.so" lib)
10156 (install-file "hawtjni.h" inc)))
10157 #t)))))
10158 (inputs
10159 `(("java-commons-cli" ,java-commons-cli)
10160 ("java-asm" ,java-asm)
10161 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10162 (home-page "https://fusesource.github.io/hawtjni/")
10163 (synopsis "JNI code generator")
10164 (description "HawtJNI is a code generator that produces the JNI code needed
10165to implement Java native methods. It is based on the jnigen code generator
10166that is part of the SWT Tools project.")
10167 (license license:asl2.0)))
10168
10169(define-public java-jansi-native
10170 (package
10171 (name "java-jansi-native")
10172 (version "1.7")
10173 (source (origin
10174 (method url-fetch)
10175 (uri (string-append "https://github.com/fusesource/jansi-native/"
10176 "archive/jansi-native-" version ".tar.gz"))
10177 (sha256
10178 (base32
10179 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10180 (build-system ant-build-system)
10181 (arguments
10182 `(#:jar-name "jansi-native.jar"
10183 #:source-dir "src/main/java"
10184 #:tests? #f; no tests
10185 #:phases
10186 (modify-phases %standard-phases
10187 (add-before 'build 'build-native
10188 (lambda* (#:key inputs #:allow-other-keys)
10189 ;; there are more required files for windows in windows/
10190 (with-directory-excursion "src/main/native-package/src"
10191 (substitute* "jansi_ttyname.c"
10192 (("#include \"jansi_.*") ""))
10193 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10194 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10195 "/include")
10196 (string-append "-I" (assoc-ref inputs "jdk")
10197 "/include/linux")
10198 "-fPIC" "-O2")
10199 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
10200 (add-before 'build 'install-native
10201 (lambda _
10202 (let ((dir (string-append "build/classes/META-INF/native/"
10203 ,(match (%current-system)
10204 ((or "i686-linux" "armhf-linux")
10205 "linux32")
10206 ((or "x86_64-linux" "aarch64-linux"
10207 "mips64el-linux")
10208 "linux64")))))
10209 (install-file "src/main/native-package/src/libjansi.so" dir))
10210 #t))
10211 (add-after 'install 'install-native
10212 (lambda* (#:key outputs #:allow-other-keys)
10213 (install-file "src/main/native-package/src/jansi.h"
10214 (string-append (assoc-ref outputs "out") "/include"))
10215 #t)))))
10216 (inputs
10217 `(("java-hawtjni" ,java-hawtjni)))
10218 (home-page "https://fusesource.github.io/jansi/")
10219 (synopsis "Native library for jansi")
10220 (description "This package provides the native library for jansi, a small
10221Java library that allows you to use ANSI escape sequences to format your
10222console output.")
10223 (license license:asl2.0)))
10224
10225(define-public java-jansi
10226 (package
10227 (name "java-jansi")
10228 (version "1.16")
10229 (source (origin
10230 (method url-fetch)
10231 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10232 "jansi-project-" version ".tar.gz"))
10233 (sha256
10234 (base32
10235 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10236 (build-system ant-build-system)
10237 (arguments
10238 `(#:jar-name "jansi.jar"
10239 #:source-dir "jansi/src/main/java"
10240 #:test-dir "jansi/src/test"
10241 #:phases
10242 (modify-phases %standard-phases
10243 (add-after 'check 'clear-term
10244 (lambda _
10245 (invoke "echo" "-e" "\\e[0m"))))))
10246 (inputs
10247 `(("java-jansi-native" ,java-jansi-native)))
10248 (native-inputs
10249 `(("java-junit" ,java-junit)
10250 ("java-hamcrest-core" ,java-hamcrest-core)))
10251 (home-page "https://fusesource.github.io/jansi/")
10252 (synopsis "Portable ANSI escape sequences")
10253 (description "Jansi is a Java library that allows you to use ANSI escape
10254sequences to format your console output which works on every platform.")
10255 (license license:asl2.0)))
10256
10257(define-public java-jboss-el-api-spec
10258 (package
10259 (name "java-jboss-el-api-spec")
10260 (version "3.0")
10261 (source (origin
10262 (method url-fetch)
10263 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10264 "archive/jboss-el-api_" version
10265 "_spec-1.0.7.Final.tar.gz"))
10266 (sha256
10267 (base32
10268 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10269 (build-system ant-build-system)
10270 (arguments
10271 `(#:jar-name "java-jboss-el-api_spec.jar"
10272 #:jdk ,icedtea-8))
10273 (inputs
10274 `(("java-junit" ,java-junit)))
10275 (home-page "https://github.com/jboss/jboss-el-api_spec")
10276 (synopsis "JSR-341 expression language 3.0 API")
10277 (description "This package contains an implementation of the JSR-341
10278specification for the expression language 3.0. It implements an expression
10279language inspired by ECMAScript and XPath. This language is used with
10280JavaServer Pages (JSP).")
10281 ;; Either GPL2 only or CDDL.
10282 (license (list license:gpl2 license:cddl1.1))))
10283
10284(define-public java-jboss-interceptors-api-spec
10285 (package
10286 (name "java-jboss-interceptors-api-spec")
10287 (version "1.2")
10288 (source (origin
10289 (method url-fetch)
10290 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10291 "archive/jboss-interceptors-api_" version
10292 "_spec-1.0.0.Final.tar.gz"))
10293 (sha256
10294 (base32
10295 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10296 (build-system ant-build-system)
10297 (arguments
10298 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10299 #:jdk ,icedtea-8
10300 #:source-dir "."
10301 #:tests? #f)); no tests
10302 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10303 (synopsis "Interceptors 1.2 API classes from JSR 318")
10304 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10305API. Interceptors are used to interpose on business method invocations and
10306specific events.")
10307 ;; Either GPL2 only or CDDL.
10308 (license (list license:gpl2 license:cddl1.1))))
10309
10310(define-public java-cdi-api
10311 (package
10312 (name "java-cdi-api")
10313 (version "2.0")
10314 (source (origin
10315 (method url-fetch)
10316 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10317 version ".tar.gz"))
10318 (file-name (string-append name "-" version ".tar.gz"))
10319 (sha256
10320 (base32
10321 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10322 (build-system ant-build-system)
10323 (arguments
10324 `(#:source-dir "api/src/main/java"
10325 #:jar-name "java-cdi-api.jar"
10326 #:test-dir "api/src/test"
10327 #:jdk ,icedtea-8
10328 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10329 (inputs
10330 `(("java-javax-inject" ,java-javax-inject)
10331 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10332 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10333 (native-inputs
10334 `(("java-testng" ,java-testng)
10335 ("java-hamcrest-core" ,java-hamcrest-core)))
10336 (home-page "http://cdi-spec.org/")
10337 (synopsis "Contexts and Dependency Injection APIs")
10338 (description "Java-cdi-api contains the required APIs for Contexts and
10339Dependency Injection (CDI).")
10340 (license license:asl2.0)))
10341
10342(define-public java-joda-convert
10343 (package
10344 (name "java-joda-convert")
10345 (version "1.9.2")
10346 (source (origin
10347 (method url-fetch)
10348 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10349 version ".tar.gz"))
10350 (file-name (string-append name "-" version ".tar.gz"))
10351 (sha256
10352 (base32
10353 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10354 (build-system ant-build-system)
10355 (arguments
10356 `(#:jar-name (string-append ,name "-" ,version ".jar")
10357 #:source-dir "src/main/java"
10358 #:test-include (list "**/Test*.java")
10359 ;; Contains only interfaces and base classes (no test)
10360 #:test-exclude (list "**/test*/**.java")))
10361 (inputs
10362 `(("java-guava" ,java-guava)))
10363 (native-inputs
10364 `(("java-junit" ,java-junit)
10365 ("java-hamcrest-core" ,java-hamcrest-core)))
10366 (home-page "https://www.joda.org/joda-convert/")
10367 (synopsis "Conversion between Objects and Strings")
10368 (description "Joda-Convert provides a small set of classes to aid
10369conversion between Objects and Strings. It is not intended to tackle the
10370wider problem of Object to Object transformation.")
10371 (license license:asl2.0)))
10372
10373(define-public java-joda-time
10374 (package
10375 (name "java-joda-time")
10376 (version "2.9.9")
10377 (source (origin
10378 (method url-fetch)
10379 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10380 version ".tar.gz"))
10381 (file-name (string-append name "-" version ".tar.gz"))
10382 (sha256
10383 (base32
10384 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10385 (build-system ant-build-system)
10386 (arguments
10387 `(#:jar-name "java-joda-time.jar"
10388 #:source-dir "src/main/java"
10389 #:test-include (list "**/Test*.java")
10390 ;; There is no runnable test in these files
10391 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10392 #:phases
10393 (modify-phases %standard-phases
10394 (add-after 'build 'build-resources
10395 (lambda _
10396 (mkdir-p "build/classes/org/joda/time/tz/data")
10397 (mkdir-p "build/classes/org/joda/time/format")
10398 ;; This will produce the following exception:
10399 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10400 ;; which is normal, because it doesn't exist yet. It still generates
10401 ;; the same file as in the binary one can find on maven.
10402 (invoke "java" "-cp"
10403 (string-append "build/classes:" (getenv "CLASSPATH"))
10404 "org.joda.time.tz.ZoneInfoCompiler"
10405 "-src" "src/main/java/org/joda/time/tz/src"
10406 "-dst" "build/classes/org/joda/time/tz/data"
10407 "africa" "antarctica" "asia" "australasia"
10408 "europe" "northamerica" "southamerica"
10409 "pacificnew" "etcetera" "backward" "systemv")
10410 (for-each (lambda (f)
10411 (copy-file f (string-append
10412 "build/classes/org/joda/time/format/"
10413 (basename f))))
10414 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10415 #t))
10416 (add-before 'install 'regenerate-jar
10417 (lambda _
10418 ;; We need to regenerate the jar file to add generated data.
10419 (delete-file "build/jar/java-joda-time.jar")
10420 (invoke "ant" "jar")))
10421 (add-before 'check 'copy-test-resources
10422 (lambda _
10423 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10424 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10425 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10426 (copy-recursively "src/test/resources" "build/test-classes")
10427 #t)))))
10428 (inputs
10429 `(("java-joda-convert" ,java-joda-convert)))
10430 (native-inputs
10431 `(("java-junit" ,java-junit)
10432 ("java-hamcrest-core" ,java-hamcrest-core)
10433 ("tzdata" ,tzdata)))
10434 (home-page "https://www.joda.org/joda-time/")
10435 (synopsis "Replacement for the Java date and time classes")
10436 (description "Joda-Time is a replacement for the Java date and time
10437classes prior to Java SE 8.")
10438 (license license:asl2.0)))
10439
10440(define-public java-xerces
10441 (package
10442 (name "java-xerces")
10443 (version "2.11.0")
10444 (source
10445 (origin
10446 (method url-fetch)
10447 (uri (string-append "mirror://apache/xerces/j/source/"
10448 "Xerces-J-src." version ".tar.gz"))
10449 (sha256
10450 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10451 (patches (search-patches
10452 "java-xerces-xjavac_taskdef.patch"
10453 "java-xerces-build_dont_unzip.patch"
10454 "java-xerces-bootclasspath.patch"))))
10455 (build-system ant-build-system)
10456 (arguments
10457 `(#:tests? #f;; Test files are not present
10458 #:test-target "test"
10459 #:jdk ,icedtea-8
10460 #:phases
10461 (modify-phases %standard-phases
10462 (add-after 'unpack 'create-build.properties
10463 (lambda* (#:key inputs #:allow-other-keys)
10464 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10465 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10466 (with-output-to-file "build.properties"
10467 (lambda _
10468 (format #t
10469 "jar.jaxp = ~a/share/java/jaxp.jar~@
10470 jar.apis-ext = ~a/share/java/jaxp.jar~@
10471 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10472 jaxp jaxp resolver)))
10473 ;; Make xerces use our version of jaxp in tests
10474 (substitute* "build.xml"
10475 (("xml-apis.jar")
10476 (string-append jaxp "/share/java/jaxp.jar"))
10477 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10478 "${jar.apis}")))
10479 #t))
10480 (replace 'install (install-jars "build")))))
10481 (inputs
10482 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10483 ("java-jaxp" ,java-jaxp)))
10484 (home-page "https://xerces.apache.org/xerces2-j/")
10485 (synopsis "Validating XML parser for Java with DOM level 3 support")
10486 (description "The Xerces2 Java parser is the reference implementation of
10487XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10488processor.
10489
10490Xerces2-J supports the following standards and APIs:
10491
10492@itemize
10493@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10494@item Namespaces in XML Recommendation
10495@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10496 Range Recommendations
10497@item Simple API for XML (SAX) 2.0.1 Core and Extension
10498@item Java APIs for XML Processing (JAXP) 1.2.01
10499@item XML Schema 1.0 Structures and Datatypes Recommendations
10500@item Experimental implementation of the Document Object Model (DOM) Level 3
10501 Core and Load/Save Working Drafts
10502@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10503 Candidate Recommendation
10504@end itemize
10505
10506Xerces is now able to parse documents written according to the XML 1.1
10507Candidate Recommendation, except that it does not yet provide an option to
10508enable normalization checking as described in section 2.13 of this
10509specification. It also handles namespaces according to the XML Namespaces 1.1
10510Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10511the DOM level 3 load/save API's are in use.")
10512 (license license:asl2.0)))
10513
10514(define-public java-jakarta-regexp
10515 (package
10516 (name "java-jakarta-regexp")
10517 (version "1.5")
10518 (source
10519 (origin
10520 (method url-fetch)
10521 (uri (string-append
10522 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10523 version ".tar.gz"))
10524 (sha256
10525 (base32
10526 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10527 (build-system ant-build-system)
10528 (arguments
10529 `(#:test-target "test"
10530 #:phases
10531 (modify-phases %standard-phases
10532 (replace 'install
10533 (lambda* (#:key outputs #:allow-other-keys)
10534 (let* ((out (assoc-ref outputs "out"))
10535 (out-share (string-append out "/share/java")))
10536 (mkdir-p out-share)
10537 (for-each (lambda (name)
10538 (install-file name out-share))
10539 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10540 #t))))))
10541 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10542 (synopsis "Regular expression parser generator for Java.")
10543 (description "@code{jakarta-regexp} is an old regular expression parser
10544generator for Java.")
10545 (license license:asl2.0)))
10546
10547(define-public java-jline
10548 (package
10549 (name "java-jline")
10550 (version "1.0")
10551 (source (origin
10552 (method url-fetch)
10553 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10554 version ".tar.gz"))
10555 (sha256
10556 (base32
10557 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10558 (build-system ant-build-system)
10559 (arguments
10560 `(#:jar-name "jline.jar"
10561 #:source-dir "src/main/java"
10562 #:test-dir "src/test"
10563 #:phases
10564 (modify-phases %standard-phases
10565 (add-before 'build 'copy-resources
10566 (lambda _
10567 (copy-recursively "src/main/resources" "build/classes")
10568 #t)))))
10569 (native-inputs
10570 `(("java-junit" ,java-junit)))
10571 (home-page "https://jline.github.io")
10572 (synopsis "Console input handling library")
10573 (description "JLine is a Java library for handling console input. It is
10574similar in functionality to BSD editline and GNU readline but with additional
10575features that bring it on par with the Z shell line editor.")
10576 (license license:bsd-3)))
10577
10578(define-public java-jline-2
10579 (package
10580 (inherit java-jline)
10581 (version "2.14.5")
10582 (source (origin
10583 (method url-fetch)
10584 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10585 version ".tar.gz"))
10586 (sha256
10587 (base32
10588 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10589 (arguments
10590 `(#:jdk ,icedtea-8
10591 ,@(package-arguments java-jline)))
10592 (inputs
10593 `(("java-jansi" ,java-jansi)
10594 ("java-jansi-native" ,java-jansi-native)))
10595 (native-inputs
10596 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10597 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10598 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10599 ("java-powermock-api-support" ,java-powermock-api-support)
10600 ("java-powermock-core" ,java-powermock-core)
10601 ("java-powermock-reflect" ,java-powermock-reflect)
10602 ("java-easymock" ,java-easymock)
10603 ("java-jboss-javassist" ,java-jboss-javassist)
10604 ("java-objenesis" ,java-objenesis)
10605 ("java-asm" ,java-asm)
10606 ("java-hamcrest-core" ,java-hamcrest-core)
10607 ("java-cglib" ,java-cglib)
10608 ("java-junit" ,java-junit)
10609 ("java-hawtjni" ,java-hawtjni)))))
10610
10611(define-public java-xmlunit
10612 (package
10613 (name "java-xmlunit")
10614 (version "2.5.1")
10615 (source (origin
10616 (method url-fetch)
10617 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10618 version ".tar.gz"))
10619 (file-name (string-append name "-" version ".tar.gz"))
10620 (sha256
10621 (base32
10622 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10623 (build-system ant-build-system)
10624 (arguments
10625 `(#:jar-name "java-xmlunit.jar"
10626 #:source-dir "xmlunit-core/src/main/java"
10627 #:test-dir "xmlunit-core/src/test"
10628 #:phases
10629 (modify-phases %standard-phases
10630 (add-before 'check 'copy-test-resources
10631 (lambda* (#:key inputs #:allow-other-keys)
10632 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10633 #t)))))
10634 (native-inputs
10635 `(("java-junit" ,java-junit)
10636 ("java-mockito-1" ,java-mockito-1)
10637 ("java-hamcrest-all" ,java-hamcrest-all)
10638 ("java-objenesis" ,java-objenesis)
10639 ("java-asm" ,java-asm)
10640 ("java-cglib" ,java-cglib)
10641 ("resources"
10642 ,(origin
10643 (method git-fetch)
10644 (uri (git-reference
10645 (url "https://github.com/xmlunit/test-resources.git")
10646 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10647 (file-name "java-xmlunit-test-resources")
10648 (sha256
10649 (base32
10650 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10651 (home-page "http://www.xmlunit.org/")
10652 (synopsis "XML output testing")
10653 (description "XMLUnit provides you with the tools to verify the XML you
10654emit is the one you want to create. It provides helpers to validate against
10655an XML Schema, assert the values of XPath queries or compare XML documents
10656against expected outcomes.")
10657 (license license:asl2.0)))
10658
10659(define-public java-xmlunit-legacy
10660 (package
10661 (inherit java-xmlunit)
10662 (name "java-xmlunit-legacy")
10663 (arguments
10664 `(#:jar-name "java-xmlunit-legacy.jar"
10665 #:source-dir "xmlunit-legacy/src/main/java"
10666 #:test-dir "xmlunit-legacy/src/test"))
10667 (inputs
10668 `(("java-xmlunit" ,java-xmlunit)
10669 ("java-junit" ,java-junit)))
10670 (native-inputs
10671 `(("java-mockito-1" ,java-mockito-1)))))
10672
10673(define-public java-xmlunit-matchers
10674 (package
10675 (inherit java-xmlunit)
10676 (name "java-xmlunit-matchers")
10677 (arguments
10678 `(#:jar-name "java-xmlunit-matchers.jar"
10679 #:source-dir "xmlunit-matchers/src/main/java"
10680 #:test-dir "xmlunit-matchers/src/test"
10681 #:test-exclude
10682 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10683 (list "**/ValidationMatcherTest.java")
10684 #:phases
10685 (modify-phases %standard-phases
10686 (add-before 'build 'copy-test-class
10687 (lambda _
10688 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10689 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10690 #t))
10691 (add-before 'build 'fix-test-resources-path
10692 (lambda _
10693 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10694 (("../test-resources") "test-resources"))
10695 #t))
10696 (add-before 'check 'copy-test-resources
10697 (lambda* (#:key inputs #:allow-other-keys)
10698 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10699 #t)))))
10700 (inputs
10701 `(("java-xmlunit" ,java-xmlunit)
10702 ("java-junit" ,java-junit)))))
10703
10704(define-public java-openchart2
10705 (package
10706 (name "java-openchart2")
10707 (version "1.4.3")
10708 (source (origin
10709 (method url-fetch)
10710 (uri (string-append "http://download.approximatrix.com/openchart2/"
10711 "openchart2-" version ".source.zip"))
10712 (sha256
10713 (base32
10714 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10715 (build-system ant-build-system)
10716 (arguments
10717 `(#:test-target "test"
10718 #:phases
10719 (modify-phases %standard-phases
10720 (add-after 'unpack 'fix-junit-errors
10721 (lambda _
10722 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10723 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10724 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10725 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10726 "model/DefaultChartDataModelConstraintsTest.java"
10727 "model/MultiScatterDataModelConstraintsTest.java"
10728 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10729 (("(assertEquals[^;]+);" before _)
10730 (string-append (string-drop-right before 2) ", 1E-6);"))))
10731 #t))
10732 (replace 'install (install-jars ".")))))
10733 (native-inputs
10734 `(("unzip" ,unzip)
10735 ("java-junit" ,java-junit)
10736 ("java-hamcrest-core" ,java-hamcrest-core)))
10737 (home-page "https://approximatrix.com/products/openchart2/")
10738 (synopsis "Simple plotting for Java")
10739 (description "Openchart2 provides a simple, yet powerful, interface for
10740Java programmers to create two-dimensional charts and plots. The library
10741features an assortment of graph styles, including advanced scatter plots, bar
10742graphs, and pie charts.")
10743 (license license:lgpl2.1+)))
10744
10745(define-public java-commons-httpclient
10746 (package
10747 (name "java-commons-httpclient")
10748 (version "3.1")
10749 (source (origin
10750 (method url-fetch)
10751 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10752 "commons-httpclient/source/commons-httpclient-"
10753 version "-src.tar.gz"))
10754 (sha256
10755 (base32
10756 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10757 (build-system ant-build-system)
10758 (arguments
10759 `(#:build-target "compile"
10760 #:test-target "test"
10761 #:tests? #f; requires junit-textui (junit 3)
10762 #:phases
10763 (modify-phases %standard-phases
10764 (add-before 'build 'fix-accent
10765 (lambda _
10766 (for-each (lambda (file)
10767 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10768 (substitute* file
10769 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10770 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10771 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10772 "src/test/org/apache/commons/httpclient/TestHttps.java"
10773 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10774 #t))
10775 (replace 'install
10776 (lambda* (#:key outputs #:allow-other-keys)
10777 (invoke "ant" "dist"
10778 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10779 "/share/java"))
10780 #t)))))
10781 (propagated-inputs
10782 `(("java-commons-logging" ,java-commons-logging-minimal)
10783 ("java-commons-codec" ,java-commons-codec)))
10784 (home-page "https://hc.apache.org")
10785 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10786 (description "This package contains an HTTP/1.1 compliant HTTP agent
10787implementation. It also provides reusable components for client-side
10788authentication, HTTP state management, and HTTP connection management.")
10789 (license license:asl2.0)))
10790
10791(define-public java-commons-vfs
10792 (package
10793 (name "java-commons-vfs")
10794 (version "2.2")
10795 (source (origin
10796 (method url-fetch)
10797 (uri (string-append "mirror://apache/commons/vfs/source/"
10798 "commons-vfs2-distribution-" version "-src.tar.gz"))
10799 (file-name (string-append name "-" version ".tar.gz"))
10800 (sha256
10801 (base32
10802 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10803 (modules '((guix build utils)))
10804 (snippet
10805 '(begin
10806 (for-each delete-file
10807 (find-files "." "\\.jar$"))
10808 #t))))
10809 (build-system ant-build-system)
10810 (arguments
10811 `(#:jar-name "commons-vfs.jar"
10812 #:source-dir "commons-vfs2/src/main/java"
10813 #:test-dir "commons-vfs2/src/test"
10814 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10815 #:tests? #f
10816 #:phases
10817 (modify-phases %standard-phases
10818 (add-before 'build 'remove-hadoop-and-webdav
10819 ; Remove these files as they are not required and depend on difficult
10820 ; packages.
10821 (lambda _
10822 (for-each delete-file-recursively
10823 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10824 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10825 #t)))))
10826 (inputs
10827 `(("java-commons-collections4" ,java-commons-collections4)
10828 ("java-commons-compress" ,java-commons-compress)
10829 ("java-commons-httpclient" ,java-commons-httpclient)
10830 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10831 ("java-commons-net" ,java-commons-net)
10832 ("java-jsch" ,java-jsch)))
10833 (home-page "https://commons.apache.org/proper/commons-vfs/")
10834 (synopsis "Java file system library")
10835 (description "Commons VFS provides a single API for accessing various
10836different file systems. It presents a uniform view of the files from various
10837different sources, such as the files on local disk, on an HTTP server, or
10838inside a Zip archive.")
10839 (license license:asl2.0)))
10840
10841(define-public java-jakarta-oro
10842 (package
10843 (name "java-jakarta-oro")
10844 (version "2.0.8")
10845 (source (origin
10846 (method url-fetch)
10847 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10848 "jakarta-oro-" version ".tar.gz"))
10849 (sha256
10850 (base32
10851 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10852 (modules '((guix build utils)))
10853 (snippet
10854 `(begin
10855 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10856 #t))))
10857 (build-system ant-build-system)
10858 (arguments
10859 `(#:build-target "package"
10860 #:tests? #f; tests are run as part of the build process
10861 #:phases
10862 (modify-phases %standard-phases
10863 (replace 'install
10864 (install-jars ,(string-append "jakarta-oro-" version))))))
10865 (home-page "https://jakarta.apache.org/oro/")
10866 (synopsis "Text-processing for Java")
10867 (description "The Jakarta-ORO Java classes are a set of text-processing
10868Java classes that provide Perl5 compatible regular expressions, AWK-like
10869regular expressions, glob expressions, and utility classes for performing
10870substitutions, splits, filtering filenames, etc. This library is the successor
10871of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10872from ORO, Inc.")
10873 (license license:asl1.1)))
10874
10875(define-public java-native-access
10876 (package
10877 (name "java-native-access")
10878 (version "4.5.1")
10879 (source (origin
10880 (method url-fetch)
10881 (uri (string-append "https://github.com/java-native-access/jna/"
10882 "archive/" version ".tar.gz"))
10883 (file-name (string-append name "-" version ".tar.gz"))
10884 (sha256
10885 (base32
10886 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10887 (modules '((guix build utils)))
10888 (snippet
10889 `(begin
10890 (for-each delete-file (find-files "." ".*.jar"))
10891 (delete-file-recursively "native/libffi")
10892 (delete-file-recursively "dist")
10893 #t))))
10894 (build-system ant-build-system)
10895 (arguments
10896 `(#:tests? #f; FIXME: tests require reflections.jar
10897 #:test-target "test"
10898 #:make-flags (list "-Ddynlink.native=true")
10899 #:phases
10900 (modify-phases %standard-phases
10901 (add-before 'build 'fix-build.xml
10902 (lambda* (#:key inputs #:allow-other-keys)
10903 (substitute* "build.xml"
10904 ;; Since we removed the bundled ant.jar, give the correct path
10905 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10906 ;; We removed generated native libraries. We can only rebuild one
10907 ;; so don't fail if we can't find a native library for another architecture.
10908 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10909 ;; Copy test dependencies
10910 (copy-file (string-append (assoc-ref inputs "java-junit")
10911 "/share/java/junit.jar")
10912 "lib/junit.jar")
10913 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10914 "/share/java/hamcrest-core.jar")
10915 "lib/hamcrest-core.jar")
10916 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10917 #t))
10918 (add-before 'build 'build-native
10919 (lambda _
10920 (invoke "ant" "-Ddynlink.native=true" "native")
10921 #t))
10922 (replace 'install
10923 (install-jars "build")))))
10924 (inputs
10925 `(("libffi" ,libffi)
10926 ("libx11" ,libx11)
10927 ("libxt" ,libxt)))
10928 (native-inputs
10929 `(("java-junit" ,java-junit)
10930 ("java-hamcrest-core" ,java-hamcrest-core)))
10931 (home-page "https://github.com/java-native-access/jna")
10932 (synopsis "Access to native shared libraries from Java")
10933 (description "JNA provides Java programs easy access to native shared
10934libraries without writing anything but Java code - no JNI or native code is
10935required. JNA allows you to call directly into native functions using natural
10936Java method invocation.")
10937 ;; Java Native Access project (JNA) is dual-licensed under 2
10938 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10939 (license (list
10940 license:asl2.0
10941 license:lgpl2.1+))))
10942
10943(define-public java-native-access-platform
10944 (package
10945 (inherit java-native-access)
10946 (name "java-native-access-platform")
10947 (arguments
10948 `(#:test-target "test"
10949 #:tests? #f; require jna-test.jar
10950 #:phases
10951 (modify-phases %standard-phases
10952 (add-before 'build 'chdir
10953 (lambda _
10954 (chdir "contrib/platform")
10955 #t))
10956 (add-after 'chdir 'fix-ant
10957 (lambda* (#:key inputs #:allow-other-keys)
10958 (substitute* "nbproject/project.properties"
10959 (("../../build/jna.jar")
10960 (string-append (assoc-ref inputs "java-native-access")
10961 "/share/java/jna.jar"))
10962 (("../../lib/hamcrest-core-.*.jar")
10963 (string-append (assoc-ref inputs "java-hamcrest-core")
10964 "/share/java/hamcrest-core.jar"))
10965 (("../../lib/junit.jar")
10966 (string-append (assoc-ref inputs "java-junit")
10967 "/share/java/junit.jar")))
10968 #t))
10969 (replace 'install
10970 (install-jars "dist")))))
10971 (inputs
10972 `(("java-native-access" ,java-native-access)))
10973 (synopsis "Cross-platform mappings for jna")
10974 (description "java-native-access-platfrom has cross-platform mappings
10975and mappings for a number of commonly used platform functions, including a
10976large number of Win32 mappings as well as a set of utility classes that
10977simplify native access.")))
10978
10979(define-public java-jsch-agentproxy-core
10980 (package
10981 (name "java-jsch-agentproxy-core")
10982 (version "0.0.8")
10983 (source (origin
10984 (method url-fetch)
10985 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10986 version ".tar.gz"))
10987 (file-name (string-append name "-" version ".tar.gz"))
10988 (sha256
10989 (base32
10990 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10991 (build-system ant-build-system)
10992 (arguments
10993 `(#:jar-name "jsch-agentproxy-core.jar"
10994 #:source-dir "jsch-agent-proxy-core/src/main/java"
10995 #:tests? #f)); no tests
10996 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10997 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10998 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10999and Pageant included Putty. It will be easily integrated into JSch, and users
11000will be allowed to use these programs for authentication.")
11001 (license license:bsd-3)))
11002
11003(define-public java-jsch-agentproxy-sshagent
11004 (package
11005 (inherit java-jsch-agentproxy-core)
11006 (name "java-jsch-agentproxy-sshagent")
11007 (arguments
11008 `(#:jar-name "jsch-agentproxy-sshagent.jar"
11009 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
11010 #:tests? #f)); no tests
11011 (inputs
11012 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11013 (synopsis "Proxy to ssh-agent")
11014 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11015and Pageant included in Putty. This component contains the code for a proxy to
11016ssh-agent.")))
11017
11018(define-public java-jsch-agentproxy-usocket-jna
11019 (package
11020 (inherit java-jsch-agentproxy-core)
11021 (name "java-jsch-agentproxy-usocket-jna")
11022 (arguments
11023 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
11024 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
11025 #:tests? #f)); no tests
11026 (inputs
11027 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11028 ("java-native-access" ,java-native-access)))
11029 (synopsis "USocketFactory implementation using JNA")
11030 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11031and Pageant included in Putty. This component contains an implementation of
11032USocketFactory using @dfn{JNA} (Java Native Access).")))
11033
11034(define-public java-jsch-agentproxy-pageant
11035 (package
11036 (inherit java-jsch-agentproxy-core)
11037 (name "java-jsch-agentproxy-pageant")
11038 (arguments
11039 `(#:jar-name "jsch-agentproxy-pageant.jar"
11040 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
11041 #:tests? #f)); no tests
11042 (inputs
11043 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11044 ("java-native-access" ,java-native-access)
11045 ("java-native-access-platform" ,java-native-access-platform)))
11046 (synopsis "Proxy to pageant")
11047 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11048and Pageant included in Putty. This component contains the code for a proxy to
11049pageant.")))
11050
11051(define-public java-jsch-agentproxy-usocket-nc
11052 (package
11053 (inherit java-jsch-agentproxy-core)
11054 (name "java-jsch-agentproxy-usocket-nc")
11055 (arguments
11056 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
11057 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
11058 #:tests? #f)); no tests
11059 (inputs
11060 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11061 (synopsis "USocketFactory implementation using netcat")
11062 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11063and Pageant included in Putty. This component contains an implementation of
11064USocketFactory using netcat.")))
11065
11066(define-public java-jsch-agentproxy-connector-factory
11067 (package
11068 (inherit java-jsch-agentproxy-core)
11069 (name "java-jsch-agentproxy-connector-factory")
11070 (arguments
11071 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11072 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11073 #:tests? #f)); no tests
11074 (inputs
11075 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11076 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11077 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11078 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11079 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11080 (synopsis "Connector factory for jsch agent proxy")
11081 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11082and Pageant included in Putty. This component contains a connector factory.")))
11083
11084(define-public java-jsch-agentproxy-jsch
11085 (package
11086 (inherit java-jsch-agentproxy-core)
11087 (name "java-jsch-agentproxy-jsch")
11088 (arguments
11089 `(#:jar-name "jsch-agentproxy-jsch.jar"
11090 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11091 #:tests? #f)); no tests
11092 (inputs
11093 `(("java-jsch" ,java-jsch)
11094 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11095 (synopsis "JSch integration library for agentproxy")
11096 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11097and Pageant included in Putty. This component contains a library to use
11098jsch-agent-proxy with JSch.")))
11099
11100(define-public java-apache-ivy
11101 (package
11102 (name "java-apache-ivy")
11103 (version "2.4.0")
11104 (source (origin
11105 (method url-fetch)
11106 (uri (string-append "mirror://apache//ant/ivy/" version
11107 "/apache-ivy-" version "-src.tar.gz"))
11108 (sha256
11109 (base32
11110 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11111 (patches
11112 (search-patches
11113 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11114 (build-system ant-build-system)
11115 (arguments
11116 `(#:jar-name "ivy.jar"
11117 #:tests? #f
11118 #:phases
11119 (modify-phases %standard-phases
11120 (add-before 'build 'remove-example
11121 (lambda _
11122 (delete-file-recursively "src/example")
11123 #t))
11124 (add-before 'build 'copy-resources
11125 (lambda _
11126 (with-directory-excursion "src/java"
11127 (for-each (lambda (file)
11128 (install-file file (string-append "../../build/classes/" (dirname file))))
11129 (append
11130 (find-files "." ".*.css")
11131 (find-files "." ".*.ent")
11132 (find-files "." ".*.html")
11133 (find-files "." ".*.properties")
11134 (find-files "." ".*.xsd")
11135 (find-files "." ".*.xsl")
11136 (find-files "." ".*.xml"))))
11137 #t))
11138 (add-before 'build 'fix-vfs
11139 (lambda _
11140 (substitute*
11141 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11142 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11143 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11144 #t))
11145 (add-before 'install 'copy-manifest
11146 (lambda _
11147 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11148 #t))
11149 (add-before 'install 'repack
11150 (lambda _
11151 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
11152 "-C" "build/classes" ".")))
11153 (add-after 'install 'install-bin
11154 (lambda* (#:key outputs #:allow-other-keys)
11155 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11156 (ivy (string-append bin "/ivy"))
11157 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11158 (mkdir-p bin)
11159 (with-output-to-file ivy
11160 (lambda _
11161 (display (string-append
11162 "#!" (which "sh") "\n"
11163 "if [[ -z $CLASSPATH ]]; then\n"
11164 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11165 "else\n"
11166 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11167 "fi\n"
11168 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11169 (chmod ivy #o755)
11170 #t))))))
11171 (inputs
11172 `(("java-bouncycastle" ,java-bouncycastle)
11173 ("java-commons-cli" ,java-commons-cli)
11174 ("java-commons-collections" ,java-commons-collections)
11175 ("java-commons-httpclient" ,java-commons-httpclient)
11176 ("java-commons-lang" ,java-commons-lang)
11177 ("java-commons-vfs" ,java-commons-vfs)
11178 ("java-jakarta-oro" ,java-jakarta-oro)
11179 ("java-jsch" ,java-jsch)
11180 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11181 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11182 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11183 ("java-junit" ,java-junit)))
11184 (home-page "https://ant.apache.org/ivy")
11185 (synopsis "Dependency manager for the Java programming language")
11186 (description "Ivy is a tool for managing (recording, tracking, resolving
11187and reporting) project dependencies. It is characterized by the following:
11188
11189@itemize
11190@item flexibility and configurability - Ivy is essentially process agnostic
11191 and is not tied to any methodology or structure. Instead it provides the
11192 necessary flexibility and configurability to be adapted to a broad range
11193 of dependency management and build processes.
11194@item tight integration with Apache Ant - while available as a standalone tool,
11195 Ivy works particularly well with Apache Ant providing a number of
11196 powerful Ant tasks ranging from dependency resolution to dependency
11197 reporting and publication.
11198@end itemize")
11199 (license license:asl2.0)))
11200
11201(define-public java-eclipse-sisu-inject
11202 (package
11203 (name "java-eclipse-sisu-inject")
11204 (version "0.3.3")
11205 (source (origin
11206 (method git-fetch)
11207 (uri (git-reference
11208 (url "https://github.com/eclipse/sisu.inject/")
11209 (commit "releases/0.3.3")))
11210 (file-name (git-file-name name version))
11211 (sha256
11212 (base32
11213 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
11214 (build-system ant-build-system)
11215 (arguments
11216 `(#:jar-name "eclipse-sisu-inject.jar"
11217 #:source-dir "org.eclipse.sisu.inject/src"
11218 #:jdk ,icedtea-8
11219 #:tests? #f)); no tests
11220 (inputs
11221 `(("java-guice" ,java-guice)
11222 ("java-guice-servlet" ,java-guice-servlet)
11223 ("java-javax-inject" ,java-javax-inject)
11224 ("java-javaee-servletapi" ,java-javaee-servletapi)
11225 ("java-junit" ,java-junit)
11226 ("java-slf4j-api" ,java-slf4j-api)
11227 ("java-jsr305" ,java-jsr305)
11228 ("java-jsr250" ,java-jsr250)
11229 ("java-cdi-api" ,java-cdi-api)
11230 ("java-osgi-framework" ,java-osgi-framework)
11231 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11232 ("java-testng" ,java-testng)))
11233 (home-page "https://www.eclipse.org/sisu/")
11234 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11235 (description "Sisu is a modular JSR330-based container that supports
11236classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11237Google-Guice to perform dependency injection and provide the core JSR330
11238support, but removes the need to write explicit bindings in Guice modules.
11239Integration with other containers via the Eclipse Extension Registry and the
11240OSGi Service Registry is a goal of this project.")
11241 (license license:epl1.0)))
11242
11243(define-public java-eclipse-sisu-plexus
11244 (package
11245 (name "java-eclipse-sisu-plexus")
11246 (version "0.3.4")
11247 (source (origin
11248 (method git-fetch)
11249 (uri (git-reference
11250 (url "https://github.com/eclipse/sisu.plexus.git")
11251 (commit (string-append "releases/" version))))
11252 (file-name (git-file-name name version))
11253 (sha256
11254 (base32
11255 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
11256 (modules '((guix build utils)))
11257 (snippet
11258 '(begin
11259 (for-each delete-file (find-files "." ".*.jar"))
11260 (rename-file "org.eclipse.sisu.plexus.tests/src"
11261 "org.eclipse.sisu.plexus.tests/java")
11262 #t))))
11263 (build-system ant-build-system)
11264 (arguments
11265 `(#:jar-name "eclipse-sisu-plexus.jar"
11266 #:source-dir "org.eclipse.sisu.plexus/src"
11267 #:test-dir "org.eclipse.sisu.plexus.tests"
11268 #:test-exclude
11269 (list
11270 ;; This test fails probably because we can't generate the necessary
11271 ;; meta-inf files.
11272 "**/PlexusLoggingTest.*"
11273 ;; FIXME: This test fails because of some injection error
11274 "**/PlexusRequirementTest.*")
11275 #:jdk ,icedtea-8
11276 #:phases
11277 (modify-phases %standard-phases
11278 (add-before 'build 'copy-resources
11279 (lambda _
11280 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11281 "build/classes/META-INF/plexus")
11282 #t))
11283 (add-before 'check 'build-test-jar
11284 (lambda _
11285 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11286 (mkdir "build")
11287 (with-directory-excursion "java"
11288 (apply invoke "javac" "-cp"
11289 (string-append (getenv "CLASSPATH")
11290 ":../../../../../build/classes")
11291 (find-files "." ".*.java"))
11292 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11293 (find-files "." ".*.jar")))
11294 (mkdir-p "build/META-INF/plexus")
11295 (copy-file "resources/META-INF/plexus/components.xml"
11296 "build/META-INF/plexus/components.xml")
11297 (with-directory-excursion "build"
11298 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11299 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11300 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11301 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11302 (("resources/component-jar")
11303 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11304 #t)))))
11305 (inputs
11306 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11307 ("java-plexus-util" ,java-plexus-utils)
11308 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11309 ("java-osgi-framework" ,java-osgi-framework)
11310 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11311 ("java-guice" ,java-guice)
11312 ("java-javax-inject" ,java-javax-inject)
11313 ("java-slf4j-api" ,java-slf4j-api)
11314 ("java-junit" ,java-junit)))
11315 (native-inputs
11316 `(("java-guava" ,java-guava)
11317 ("java-aopalliance" ,java-aopalliance)
11318 ("java-cglib" ,java-cglib)
11319 ("java-asm" ,java-asm)))
11320 (home-page "https://www.eclipse.org/sisu/")
11321 (synopsis "Plexus support for the sisu container")
11322 (description "Sisu is a modular JSR330-based container that supports
11323classpath scanning, auto-binding, and dynamic auto-wiring. This package
11324adds Plexus support to the Sisu-Inject container.")
11325 (license license:epl1.0)))
11326
11327(define-public java-commons-compiler
11328 (package
11329 (name "java-commons-compiler")
11330 (version "3.0.8")
11331 (source (origin
11332 (method git-fetch)
11333 (uri (git-reference
11334 (url "https://github.com/janino-compiler/janino")
11335 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11336 (file-name (string-append name "-" version))
11337 (sha256
11338 (base32
11339 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11340 (modules '((guix build utils)))
11341 (snippet
11342 '(begin
11343 (for-each delete-file
11344 (find-files "." "\\.jar$"))
11345 #t))))
11346 (build-system ant-build-system)
11347 (arguments
11348 `(#:jar-name "commons-compiler.jar"
11349 #:source-dir "commons-compiler/src/main"
11350 #:tests? #f)); no tests
11351 (home-page "https://github.com/janino-compiler/janino")
11352 (synopsis "Java compiler")
11353 (description "Commons-compiler contains an API for janino, including the
11354@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11355and @code{ISimpleCompiler} interfaces.")
11356 (license license:bsd-3)))
11357
11358(define-public java-janino
11359 (package
11360 (inherit java-commons-compiler)
11361 (name "java-janino")
11362 (arguments
11363 `(#:jar-name "janino.jar"
11364 #:source-dir "src/main/java"
11365 #:phases
11366 (modify-phases %standard-phases
11367 (add-before 'configure 'chdir
11368 (lambda _
11369 (chdir "janino")
11370 #t)))))
11371 (inputs
11372 `(("java-commons-compiler" ,java-commons-compiler)))
11373 (native-inputs
11374 `(("java-junit" ,java-junit)
11375 ("java-hamcrest-core" ,java-hamcrest-core)))
11376 (description "Janino is a Java compiler. Janino can compile a set of
11377source files to a set of class files like @code{javac}, but also compile a
11378Java expression, block, class body or source file in memory, load the bytecode
11379and execute it directly in the same JVM. @code{janino} can also be used for
11380static code analysis or code manipulation.")))
11381
11382(define-public java-logback-core
11383 (package
11384 (name "java-logback-core")
11385 (version "1.2.3")
11386 (source (origin
11387 (method url-fetch)
11388 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11389 version ".tar.gz"))
11390 (file-name (string-append name "-" version ".tar.gz"))
11391 (sha256
11392 (base32
11393 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11394 (modules '((guix build utils)))
11395 (snippet
11396 '(begin
11397 (delete-file-recursively "logback-access/lib")
11398 #t))))
11399 (build-system ant-build-system)
11400 (arguments
11401 `(#:jar-name "logback.jar"
11402 #:source-dir "src/main/java"
11403 #:test-dir "src/test"
11404 #:test-exclude
11405 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11406 ;; which creates FastClasses
11407 (list "**/AllCoreTest.*"
11408 "**/AutoFlushingObjectWriterTest.*"
11409 "**/PackageTest.*"
11410 "**/ResilientOutputStreamTest.*"
11411 ;; And we still don't want to run abstract classes
11412 "**/Abstract*.*")
11413 #:phases
11414 (modify-phases %standard-phases
11415 (add-before 'configure 'chdir
11416 (lambda _
11417 (chdir "logback-core")
11418 #t)))))
11419 (inputs
11420 `(("java-javax-mail" ,java-javax-mail)
11421 ("servlet" ,java-javaee-servletapi)
11422 ("java-commons-compiler" ,java-commons-compiler)
11423 ("java-janino" ,java-janino)))
11424 (native-inputs
11425 `(("java-junit" ,java-junit)
11426 ("java-hamcrest-core" ,java-hamcrest-core)
11427 ("java-mockito-1" ,java-mockito-1)
11428 ("java-cglib" ,java-cglib)
11429 ("java-asm" ,java-asm)
11430 ("java-objenesis" ,java-objenesis)
11431 ("java-joda-time" ,java-joda-time)))
11432 (home-page "https://logback.qos.ch")
11433 (synopsis "Logging for java")
11434 (description "Logback is intended as a successor to the popular log4j project.
11435This module lays the groundwork for the other two modules.")
11436 ;; Either epl1.0 or lgpl2.1
11437 (license (list license:epl1.0
11438 license:lgpl2.1))))
11439
11440(define-public java-logback-classic
11441 (package
11442 (inherit java-logback-core)
11443 (name "java-logback-classic")
11444 (arguments
11445 `(#:jar-name "logback-classic.jar"
11446 #:source-dir "src/main/java"
11447 #:test-dir "src/test"
11448 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11449 #:jdk ,icedtea-8
11450 #:phases
11451 (modify-phases %standard-phases
11452 (add-before 'configure 'chdir
11453 (lambda _
11454 (chdir "logback-classic")
11455 #t))
11456 (replace 'build
11457 (lambda* (#:key inputs #:allow-other-keys)
11458 (mkdir-p "build/classes")
11459 (setenv "CLASSPATH"
11460 (string-join
11461 (apply append (map (lambda (input)
11462 (find-files (assoc-ref inputs input)
11463 ".*.jar"))
11464 '("java-logback-core" "java-slf4j-api"
11465 "java-commons-compiler" "servlet"
11466 "groovy")))
11467 ":"))
11468 (apply invoke "groovyc" "-d" "build/classes" "-j"
11469 (find-files "src/main/" ".*\\.(groovy|java)$"))
11470 (invoke "ant" "jar")
11471 #t)))))
11472 (inputs
11473 `(("java-logback-core" ,java-logback-core)
11474 ("java-slf4j-api" ,java-slf4j-api)
11475 ,@(package-inputs java-logback-core)))
11476 (native-inputs
11477 `(("groovy" ,groovy)))
11478 (description "Logback is intended as a successor to the popular log4j project.
11479This module can be assimilated to a significantly improved version of log4j.
11480Moreover, @code{logback-classic} natively implements the slf4j API so that you
11481can readily switch back and forth between logback and other logging frameworks
11482such as log4j or @code{java.util.logging} (JUL).")))
11483
11484(define-public java-jgit
11485 (package
11486 (name "java-jgit")
11487 (version "4.7.0.201704051617-r")
11488 (source (origin
11489 (method url-fetch)
11490 (uri (string-append "https://repo1.maven.org/maven2/"
11491 "org/eclipse/jgit/org.eclipse.jgit/"
11492 version "/org.eclipse.jgit-"
11493 version "-sources.jar"))
11494 (sha256
11495 (base32
11496 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11497 (build-system ant-build-system)
11498 (arguments
11499 `(#:tests? #f ; There are no tests to run.
11500 #:jar-name "jgit.jar"
11501 ;; JGit must be built with a JDK supporting Java 8.
11502 #:jdk ,icedtea-8
11503 ;; Target our older default JDK.
11504 #:make-flags (list "-Dtarget=1.7")
11505 #:phases
11506 (modify-phases %standard-phases
11507 ;; The jar file generated by the default build.xml does not include
11508 ;; the text properties files, so we need to add them.
11509 (add-after 'build 'add-properties
11510 (lambda* (#:key jar-name #:allow-other-keys)
11511 (with-directory-excursion "src"
11512 (apply invoke "jar" "-uf"
11513 (string-append "../build/jar/" jar-name)
11514 (find-files "." "\\.properties$")))
11515 #t)))))
11516 (inputs
11517 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11518 ("java-javaewah" ,java-javaewah)
11519 ("java-jsch" ,java-jsch)
11520 ("java-slf4j-api" ,java-slf4j-api)))
11521 (home-page "https://eclipse.org/jgit/")
11522 (synopsis "Java library implementing the Git version control system")
11523 (description "JGit is a lightweight, pure Java library implementing the
11524Git version control system, providing repository access routines, support for
11525network protocols, and core version control algorithms.")
11526 (license license:edl1.0)))
11527
11528;; For axoloti. This package can still be built with icedtea-7, which is
11529;; currently used as the default JDK.
11530(define-public java-jgit-4.2
11531 (package (inherit java-jgit)
11532 (version "4.2.0.201601211800-r")
11533 (source (origin
11534 (method url-fetch)
11535 (uri (string-append "https://repo1.maven.org/maven2/"
11536 "org/eclipse/jgit/org.eclipse.jgit/"
11537 version "/org.eclipse.jgit-"
11538 version "-sources.jar"))
11539 (sha256
11540 (base32
11541 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11542 (build-system ant-build-system)
11543 (arguments
11544 (substitute-keyword-arguments (package-arguments java-jgit)
11545 ;; Build for default JDK.
11546 ((#:jdk _) icedtea-7)
11547 ((#:phases phases)
11548 `(modify-phases ,phases
11549 (add-after 'unpack 'use-latest-javaewah-API
11550 (lambda _
11551 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11552 (("wordinbits") "WORD_IN_BITS"))
11553 #t))))))
11554 (inputs
11555 `(("java-javaewah" ,java-javaewah)
11556 ("java-jsch" ,java-jsch)
11557 ("java-slf4j-api" ,java-slf4j-api)))))
11558
11559(define-public abcl
11560 (package
11561 (name "abcl")
11562 (version "1.6.0")
11563 (source
11564 (origin
11565 (method url-fetch)
11566 (uri (string-append "https://abcl.org/releases/"
11567 version "/abcl-src-" version ".tar.gz"))
11568 (sha256
11569 (base32
11570 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
11571 (patches
11572 (search-patches
11573 "abcl-fix-build-xml.patch"))))
11574 (build-system ant-build-system)
11575 (native-inputs
11576 `(("java-junit" ,java-junit)))
11577 (arguments
11578 `(#:build-target "abcl.jar"
11579 #:test-target "abcl.test"
11580 #:phases
11581 (modify-phases %standard-phases
11582 (replace 'install
11583 (lambda* (#:key outputs #:allow-other-keys)
11584 (let ((share (string-append (assoc-ref outputs "out")
11585 "/share/java/"))
11586 (bin (string-append (assoc-ref outputs "out")
11587 "/bin/")))
11588 (mkdir-p share)
11589 (install-file "dist/abcl.jar" share)
11590 (install-file "dist/abcl-contrib.jar" share)
11591 (mkdir-p bin)
11592 (with-output-to-file (string-append bin "abcl")
11593 (lambda _
11594 (let ((classpath (string-append
11595 share "abcl.jar"
11596 ":"
11597 share "abcl-contrib.jar")))
11598 (display (string-append
11599 "#!" (which "sh") "\n"
11600 "if [[ -z $CLASSPATH ]]; then\n"
11601 " cp=\"" classpath "\"\n"
11602 "else\n"
11603 " cp=\"" classpath ":$CLASSPATH\"\n"
11604 "fi\n"
11605 "exec " (which "java")
11606 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11607 (chmod (string-append bin "abcl") #o755)
11608 #t))))))
11609 (home-page "https://abcl.org/")
11610 (synopsis "Common Lisp Implementation on the JVM")
11611 (description
11612 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11613Lisp language featuring both an interpreter and a compiler, running in the
11614JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11615in any Java application. Additionally, it can be used to implement (parts of)
11616the application using Java to Lisp integration APIs.")
11617 (license (list license:gpl2+
11618 ;; named-readtables is released under 3 clause BSD
11619 license:bsd-3
11620 ;; jfli is released under CPL 1.0
11621 license:cpl1.0))))
11622
11623(define-public java-jsonp-api
11624 (package
11625 (name "java-jsonp-api")
11626 (version "1.1.6")
11627 (source (origin
11628 (method git-fetch)
11629 (uri (git-reference
11630 (url "https://github.com/eclipse-ee4j/jsonp")
11631 (commit (string-append "1.1-" version "-RELEASE"))))
11632 (file-name (git-file-name name version))
11633 (sha256
11634 (base32
11635 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
11636 (build-system ant-build-system)
11637 (arguments
11638 `(#:jar-name "jsonp-api.jar"
11639 #:tests? #f
11640 #:source-dir "api/src/main/java"
11641 #:test-dir "api/src/test"))
11642 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11643 (synopsis "JSON Processing in Java")
11644 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11645parse, generate, transform and query) JSON messages. It produces and
11646consumes JSON text in a streaming fashion (similar to StAX API for XML)
11647and allows to build a Java object model for JSON text using API classes
11648(similar to DOM API for XML).")
11649 ;; either gpl2 only with classpath exception, or epl2.0.
11650 (license (list license:gpl2
11651 license:epl2.0))))
11652
11653(define-public java-jsonp-impl
11654 (package
11655 (inherit java-jsonp-api)
11656 (name "java-jsonp-impl")
11657 (arguments
11658 `(#:jar-name "jsonp-impl.jar"
11659 #:tests? #f
11660 #:source-dir "impl/src/main/java"
11661 #:test-dir "impl/src/test"
11662 #:phases
11663 (modify-phases %standard-phases
11664 (add-before 'build 'copy-resources
11665 (lambda _
11666 (copy-recursively
11667 "impl/src/main/resources/"
11668 "build/classes")
11669 #t)))))
11670 (propagated-inputs
11671 `(("java-jsonp-api" ,java-jsonp-api)))
11672 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11673parse, generate, transform and query) JSON messages. This package contains
11674a reference implementation of that API.")))
11675
11676(define-public java-xmp
11677 (package
11678 (name "java-xmp")
11679 (version "5.1.3")
11680 (source (origin
11681 (method url-fetch)
11682 (uri (string-append "http://download.macromedia.com/pub/developer"
11683 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11684 (sha256
11685 (base32
11686 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11687 (build-system ant-build-system)
11688 (arguments
11689 `(#:build-target "build"
11690 #:tests? #f; no tests
11691 #:phases
11692 (modify-phases %standard-phases
11693 (add-after 'unpack 'chdir
11694 (lambda _
11695 (chdir "XMPCore")
11696 #t))
11697 (add-before 'build 'fix-timestamp
11698 (lambda _
11699 (substitute* "build.xml"
11700 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11701 #t))
11702 (replace 'install
11703 (install-jars "."))
11704 (add-after 'install 'install-doc
11705 (lambda* (#:key outputs #:allow-other-keys)
11706 (copy-recursively
11707 "docs"
11708 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11709 #t)))))
11710 (native-inputs
11711 `(("unzip" ,unzip)))
11712 (home-page "https://www.adobe.com/devnet/xmp.html")
11713 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11714 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11715technology that allows you to embed data about a file, known as metadata,
11716into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11717library and the API is similar.")
11718 (license license:bsd-3)))
11719
11720(define-public java-metadata-extractor
11721 (package
11722 (name "java-metadata-extractor")
11723 (version "2.11.0")
11724 (source (origin
11725 (method git-fetch)
11726 (uri (git-reference
11727 (url "https://github.com/drewnoakes/metadata-extractor")
11728 (commit version)))
11729 (file-name (git-file-name name version))
11730 (sha256
11731 (base32
11732 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11733 (build-system ant-build-system)
11734 (arguments
11735 `(#:jar-name "metadata-extractor.jar"
11736 #:source-dir "Source"
11737 #:test-dir "Tests"
11738 #:phases
11739 (modify-phases %standard-phases
11740 (add-before 'check 'fix-test-dir
11741 (lambda _
11742 (substitute* "build.xml"
11743 (("/java\">") "\">"))
11744 #t)))))
11745 (propagated-inputs
11746 `(("java-xmp" ,java-xmp)))
11747 (native-inputs
11748 `(("java-hamcrest-core" ,java-hamcrest-core)
11749 ("java-junit" ,java-junit)))
11750 (home-page "https://github.com/drewnoakes/metadata-extractor")
11751 (synopsis "Extract metadata from image and video files")
11752 (description "Metadata-extractor is a straightforward Java library for
11753reading metadata from image files. It is able to read metadata in Exif,
11754IPTC, XMP, ICC and more formats.")
11755 (license license:asl2.0)))
11756
11757(define-public java-svg-salamander
11758 (package
11759 (name "java-svg-salamander")
11760 (version "1.1.2")
11761 (source (origin
11762 (method git-fetch)
11763 (uri (git-reference
11764 (url "https://github.com/blackears/svgSalamander")
11765 (commit (string-append "v" version))))
11766 (file-name (git-file-name name version))
11767 (sha256
11768 (base32
11769 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11770 (modules '((guix build utils)))
11771 (snippet
11772 '(begin
11773 (for-each delete-file (find-files "." ".*.jar"))
11774 #t))
11775 (patches
11776 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11777 (build-system ant-build-system)
11778 (arguments
11779 `(#:tests? #f; no tests
11780 #:phases
11781 (modify-phases %standard-phases
11782 (add-after 'unpack 'chdir
11783 (lambda _
11784 (chdir "svg-core")
11785 #t))
11786 (add-before 'build 'copy-jars
11787 (lambda* (#:key inputs #:allow-other-keys)
11788 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11789 "../libraries/javacc.jar")
11790 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11791 "../libraries/ant.jar")
11792 #t))
11793 (replace 'install
11794 (install-jars "dist")))))
11795 (native-inputs
11796 `(("javacc" ,javacc)))
11797 (home-page "https://github.com/blackears/svgSalamander")
11798 (synopsis "SVG engine for Java")
11799 (description "SVG Salamander is an SVG engine for Java that's designed
11800to be small, fast, and allow programmers to use it with a minimum of fuss.
11801It's in particular targeted for making it easy to integrate SVG into Java
11802games and making it much easier for artists to design 2D game content - from
11803rich interactive menus to charts and graphcs to complex animations.")
11804 (license license:bsd-2)))
11805
11806(define-public java-jboss-transaction-api-spec
11807 (package
11808 (name "java-jboss-transaction-api-spec")
11809 (version "1.2+1.1.1")
11810 (source (origin
11811 (method git-fetch)
11812 (uri (git-reference
11813 (url "https://github.com/jboss/jboss-transaction-api_spec")
11814 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11815 (file-name (git-file-name name version))
11816 (sha256
11817 (base32
11818 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11819 (build-system ant-build-system)
11820 (arguments
11821 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11822 #:source-dir "src/main/java"
11823 #:tests? #f)); no tests
11824 (inputs
11825 `(("java-cdi-api" ,java-cdi-api)
11826 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11827 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11828 (synopsis "Generic transaction management API in Java")
11829 (description "Java-jboss-transaction-api-spec implements the Transactions
11830API. A transaction is a unit of work containing one or more operations
11831involving one or more shared resources having ACID (Atomicity, Consistency,
11832Isolation and Durability) properties.")
11833 ;; either gpl2 only with classpath exception or cddl.
11834 (license (list license:gpl2 license:cddl1.0))))