gnu: tzdata: Update to 2020a.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017, 2018, 2019 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;;
15 ;;; This file is part of GNU Guix.
16 ;;;
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
21 ;;;
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
26 ;;;
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30 (define-module (gnu packages java)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix hg-download)
35 #:use-module (guix git-download)
36 #:use-module (guix svn-download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system ant)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system trivial)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages attr)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages certs)
47 #:use-module (gnu packages cpio)
48 #:use-module (gnu packages cups)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages ghostscript) ;lcms
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages groovy)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages icu4c)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages java-compression)
64 #:use-module (gnu packages libffi)
65 #:use-module (gnu packages linux) ;alsa
66 #:use-module (gnu packages maths)
67 #:use-module (gnu packages nss)
68 #:use-module (gnu packages onc-rpc)
69 #:use-module (gnu packages web)
70 #:use-module (gnu packages wget)
71 #:use-module (gnu packages pkg-config)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages popt)
74 #:use-module (gnu packages kerberos)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xorg)
77 #:use-module (gnu packages texinfo)
78 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
79 #:use-module (srfi srfi-11)
80 #:use-module (ice-9 match))
81
82 \f
83 ;;;
84 ;;; Java bootstrap toolchain.
85 ;;;
86
87 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
88 ;; use it to build a simple version of GNU Classpath, the Java standard
89 ;; library. We chose version 0.93 because it is the last version that can be
90 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
91 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
92 ;; the last version of JamVM that works with a version of GNU classpath that
93 ;; does not require ECJ. These three packages make up the bootstrap JDK.
94
95 ;; This is sufficient to build an older version of Ant, which is needed to
96 ;; build an older version of ECJ, an incremental Java compiler, both of which
97 ;; are written in Java.
98 ;;
99 ;; ECJ is needed to build the latest release (0.99) and the development
100 ;; version of GNU Classpath. The development version of GNU Classpath has
101 ;; much more support for Java 1.6 than the latest release, but we need to
102 ;; build 0.99 first to get a working version of javah. ECJ, the development
103 ;; version of GNU Classpath, and the latest version of JamVM make up the
104 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
105 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
106 ;; Icedtea 3.x.
107
108 (define jikes
109 (package
110 (name "jikes")
111 (version "1.22")
112 (source (origin
113 (method url-fetch)
114 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
115 version "/jikes-" version ".tar.bz2"))
116 (sha256
117 (base32
118 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
119 (build-system gnu-build-system)
120 (home-page "http://jikes.sourceforge.net/")
121 (synopsis "Compiler for the Java language")
122 (description "Jikes is a compiler that translates Java source files as
123 defined in The Java Language Specification into the bytecoded instruction set
124 and binary format defined in The Java Virtual Machine Specification.")
125 (license license:ibmpl1.0)))
126
127 ;; This is the last version of GNU Classpath that can be built without ECJ.
128 (define classpath-bootstrap
129 (package
130 (name "classpath")
131 (version "0.93")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append "mirror://gnu/classpath/classpath-"
135 version ".tar.gz"))
136 (sha256
137 (base32
138 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
139 (patches (search-patches "classpath-aarch64-support.patch"))))
140 (build-system gnu-build-system)
141 (arguments
142 `(#:configure-flags
143 (list (string-append "JAVAC="
144 (assoc-ref %build-inputs "jikes")
145 "/bin/jikes")
146 "--disable-Werror"
147 "--disable-gmp"
148 "--disable-gtk-peer"
149 "--disable-gconf-peer"
150 "--disable-plugin"
151 "--disable-dssi"
152 "--disable-alsa"
153 "--disable-gjdoc")
154 #:phases
155 (modify-phases %standard-phases
156 ;; XXX: This introduces a memory leak as we remove a call to free up
157 ;; memory for the file name string. This was necessary because of a
158 ;; runtime error that would have prevented us from building
159 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
160 ;; for the gnarly details.
161 (add-after 'unpack 'remove-call-to-free
162 (lambda _
163 (substitute* "native/jni/java-io/java_io_VMFile.c"
164 (("result = cpio_isFileExists.*" m)
165 (string-append m "\n//")))
166 #t))
167 (add-after 'install 'install-data
168 (lambda _ (invoke "make" "install-data"))))))
169 (native-inputs
170 `(("jikes" ,jikes)
171 ("fastjar" ,fastjar)
172 ("libltdl" ,libltdl)
173 ("pkg-config" ,pkg-config)))
174 (home-page "https://www.gnu.org/software/classpath/")
175 (synopsis "Essential libraries for Java")
176 (description "GNU Classpath is a project to create core class libraries
177 for use with runtimes, compilers and tools for the Java programming
178 language.")
179 ;; GPLv2 or later, with special linking exception.
180 (license license:gpl2+)))
181
182 ;; This is the last version of JamVM that works with a version of GNU
183 ;; classpath that does not require ECJ.
184 (define jamvm-1-bootstrap
185 (package
186 (name "jamvm")
187 (version "1.5.1")
188 (source (origin
189 (method url-fetch)
190 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
191 "JamVM%20" version "/jamvm-"
192 version ".tar.gz"))
193 (patches (search-patches "jamvm-arm.patch"))
194 (sha256
195 (base32
196 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
197 (snippet
198 '(begin
199 ;; Remove precompiled software.
200 (delete-file "lib/classes.zip")
201 #t))))
202 (build-system gnu-build-system)
203 (arguments
204 `(#:configure-flags
205 (list (string-append "--with-classpath-install-dir="
206 (assoc-ref %build-inputs "classpath"))
207 "--disable-int-caching"
208 "--enable-runtime-reloc-checks"
209 "--enable-ffi")))
210 (inputs
211 `(("classpath" ,classpath-bootstrap)
212 ("jikes" ,jikes)
213 ("libffi" ,libffi)
214 ("zip" ,zip)
215 ("zlib" ,zlib)))
216 ;; When built with a recent GCC and glibc the configure step of icedtea-6
217 ;; fails with an invalid instruction error.
218 (native-inputs
219 `(("gcc" ,gcc-5)
220 ("libc" ,glibc-2.28)))
221 (home-page "http://jamvm.sourceforge.net/")
222 (synopsis "Small Java Virtual Machine")
223 (description "JamVM is a Java Virtual Machine conforming to the JVM
224 specification edition 2 (blue book). It is extremely small. However, unlike
225 other small VMs it supports the full spec, including object finalisation and
226 JNI.")
227 (license license:gpl2+)))
228
229 (define ant-bootstrap
230 (package
231 (name "ant-bootstrap")
232 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
233 ;; are not supported. The 1.8.x series is the last to use only features
234 ;; supported by Jikes.
235 (version "1.8.4")
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "http://archive.apache.org/dist/"
239 "ant/source/apache-ant-"
240 version "-src.tar.bz2"))
241 (sha256
242 (base32
243 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
244 (build-system gnu-build-system)
245 (arguments
246 `(#:imported-modules ((guix build syscalls)
247 ,@%gnu-build-system-modules)
248 #:modules ((srfi srfi-1)
249 (guix build gnu-build-system)
250 (guix build utils)
251 (guix build syscalls))
252 #:tests? #f ; no "check" target
253 #:phases
254 (modify-phases %standard-phases
255 (delete 'bootstrap)
256 (delete 'configure)
257 (replace 'build
258 (lambda* (#:key inputs #:allow-other-keys)
259 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
260 (setenv "JAVACMD"
261 (string-append (assoc-ref inputs "jamvm")
262 "/bin/jamvm"))
263 (setenv "JAVAC"
264 (string-append (assoc-ref inputs "jikes")
265 "/bin/jikes"))
266 (setenv "CLASSPATH"
267 (string-append (assoc-ref inputs "jamvm")
268 "/lib/rt.jar"))
269
270 ;; Ant complains if this file doesn't exist.
271 (setenv "HOME" "/tmp")
272 (with-output-to-file "/tmp/.ant.properties"
273 (lambda _ (display "")))
274
275 ;; Use jikes instead of javac for <javac ...> tags in build.xml
276 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
277
278 ;; jikes produces lots of warnings, but they are not very
279 ;; interesting, so we silence them.
280 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
281
282 ;; Without these JamVM options the build may freeze.
283 (substitute* "bootstrap.sh"
284 (("^\"\\$\\{JAVACMD\\}\" " m)
285 ,@(if (string-prefix? "armhf" (or (%current-system)
286 (%current-target-system)))
287 `((string-append m "-Xnocompact "))
288 `((string-append m "-Xnocompact -Xnoinlining ")))))
289
290 ;; Disable tests because we are bootstrapping and thus don't have
291 ;; any of the dependencies required to build and run the tests.
292 (substitute* "build.xml"
293 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
294 (invoke "bash" "bootstrap.sh"
295 (string-append "-Ddist.dir="
296 (assoc-ref %outputs "out")))))
297 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
298 (lambda* (#:key outputs #:allow-other-keys)
299 (define (repack-archive jar)
300 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
301 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
302 (with-directory-excursion dir
303 (invoke "unzip" jar))
304 (delete-file jar)
305 ;; XXX: copied from (gnu build install)
306 (for-each (lambda (file)
307 (let ((s (lstat file)))
308 (unless (eq? (stat:type s) 'symlink)
309 (utime file 0 0 0 0))))
310 (find-files dir #:directories? #t))
311 ;; It is important that the manifest appears first.
312 (with-directory-excursion dir
313 (let* ((files (find-files "." ".*" #:directories? #t))
314 ;; To ensure that the reference scanner can
315 ;; detect all store references in the jars
316 ;; we disable compression with the "-0" option.
317 (command (if (file-exists? manifest)
318 `("zip" "-0" "-X" ,jar ,manifest
319 ,@files)
320 `("zip" "-0" "-X" ,jar ,@files))))
321 (apply invoke command)))))
322 (for-each repack-archive
323 (find-files
324 (string-append (assoc-ref %outputs "out") "/lib")
325 "\\.jar$"))
326 #t))
327 (delete 'install))))
328 (native-inputs
329 `(("jikes" ,jikes)
330 ("jamvm" ,jamvm-1-bootstrap)
331 ("unzip" ,unzip)
332 ("zip" ,zip)))
333 (home-page "https://ant.apache.org")
334 (synopsis "Build tool for Java")
335 (description
336 "Ant is a platform-independent build tool for Java. It is similar to
337 make but is implemented using the Java language, requires the Java platform,
338 and is best suited to building Java projects. Ant uses XML to describe the
339 build process and its dependencies, whereas Make uses Makefile format.")
340 (license license:asl2.0)))
341
342 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
343 ;; compiler for Java 1.5.
344 (define ecj-bootstrap
345 (package
346 (name "ecj-bootstrap")
347 (version "3.2.2")
348 (source (origin
349 (method url-fetch)
350 (uri (string-append "http://archive.eclipse.org/eclipse/"
351 "downloads/drops/R-" version
352 "-200702121330/ecjsrc.zip"))
353 (sha256
354 (base32
355 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
356 ;; It would be so much easier if we could use the ant-build-system, but we
357 ;; cannot as we don't have ant at this point. We use ecj for
358 ;; bootstrapping the JDK.
359 (build-system gnu-build-system)
360 (arguments
361 `(#:modules ((guix build gnu-build-system)
362 (guix build utils)
363 (srfi srfi-1))
364 #:tests? #f ; there are no tests
365 #:phases
366 (modify-phases %standard-phases
367 (replace 'configure
368 (lambda* (#:key inputs #:allow-other-keys)
369 (setenv "CLASSPATH"
370 (string-join
371 (cons (string-append (assoc-ref inputs "jamvm")
372 "/lib/rt.jar")
373 (find-files (string-append
374 (assoc-ref inputs "ant-bootstrap")
375 "/lib")
376 "\\.jar$"))
377 ":"))
378 #t))
379 (replace 'build
380 (lambda* (#:key inputs #:allow-other-keys)
381 ;; The unpack phase enters the "org" directory by mistake.
382 (chdir "..")
383
384 ;; Create a simple manifest to make ecj executable.
385 (with-output-to-file "manifest"
386 (lambda _
387 (display "Manifest-Version: 1.0
388 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
389
390 ;; Compile it all!
391 (and (apply invoke "jikes"
392 (find-files "." "\\.java$"))
393 (invoke "fastjar" "cvfm"
394 "ecj-bootstrap.jar" "manifest" "."))))
395 (replace 'install
396 (lambda* (#:key outputs #:allow-other-keys)
397 (let ((share (string-append (assoc-ref outputs "out")
398 "/share/java/")))
399 (mkdir-p share)
400 (install-file "ecj-bootstrap.jar" share)
401 #t))))))
402 (native-inputs
403 `(("ant-bootstrap" ,ant-bootstrap)
404 ("unzip" ,unzip)
405 ("jikes" ,jikes)
406 ("jamvm" ,jamvm-1-bootstrap)
407 ("fastjar" ,fastjar)))
408 (home-page "https://eclipse.org")
409 (synopsis "Eclipse Java development tools core batch compiler")
410 (description "This package provides the Eclipse Java core batch compiler
411 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
412 requirement for all GNU Classpath releases after version 0.93.")
413 (license license:epl1.0)))
414
415 (define ecj-javac-wrapper
416 (package (inherit ecj-bootstrap)
417 (name "ecj-javac-wrapper")
418 (source #f)
419 (build-system trivial-build-system)
420 (arguments
421 `(#:modules ((guix build utils))
422 #:builder
423 (begin
424 (use-modules (guix build utils))
425 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
426 (target (string-append bin "/javac"))
427 (guile (string-append (assoc-ref %build-inputs "guile")
428 "/bin/guile"))
429 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
430 "/share/java/ecj-bootstrap.jar"))
431 (java (string-append (assoc-ref %build-inputs "jamvm")
432 "/bin/jamvm"))
433 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
434 "/share/classpath")))
435 (string-append jvmlib "/glibj.zip:"
436 jvmlib "/tools.zip"))))
437 (mkdir-p bin)
438 (with-output-to-file target
439 (lambda _
440 (format #t "#!~a --no-auto-compile\n!#\n" guile)
441 (write
442 `(begin (use-modules (ice-9 match)
443 (ice-9 receive)
444 (ice-9 hash-table)
445 (srfi srfi-1)
446 (srfi srfi-26))
447 (define defaults
448 '(("-bootclasspath" ,bootcp)
449 ("-source" "1.5")
450 ("-target" "1.5")
451 ("-cp" ".")))
452 (define (main args)
453 (let ((classpath (getenv "CLASSPATH")))
454 (setenv "CLASSPATH"
455 (string-join (list ,ecj
456 ,(string-append (assoc-ref %build-inputs "jamvm")
457 "/lib/rt.jar")
458 (or classpath ""))
459 ":")))
460 (receive (vm-args other-args)
461 ;; Separate VM arguments from arguments to ECJ.
462 (partition (cut string-prefix? "-J" <>)
463 (fold (lambda (default acc)
464 (if (member (first default) acc)
465 acc (append default acc)))
466 args defaults))
467 (apply system* ,java
468 (append
469 ;; Remove "-J" prefix
470 (map (cut string-drop <> 2) vm-args)
471 '("org.eclipse.jdt.internal.compiler.batch.Main")
472 (cons "-nowarn" other-args)))))
473 ;; Entry point
474 (let ((args (cdr (command-line))))
475 (if (null? args)
476 (format (current-error-port) "javac: no arguments given!\n")
477 (main args)))))))
478 (chmod target #o755)
479 #t))))
480 (native-inputs
481 `(("guile" ,guile-2.2)
482 ("ecj-bootstrap" ,ecj-bootstrap)
483 ("jamvm" ,jamvm-1-bootstrap)
484 ("classpath" ,classpath-bootstrap)))
485 (description "This package provides a wrapper around the @dfn{Eclipse
486 compiler for Java} (ecj) with a command line interface that is compatible with
487 the standard javac executable.")))
488
489 ;; The classpath-bootstrap was built without a virtual machine, so it does not
490 ;; provide a wrapper for javah. We cannot build the development version of
491 ;; Classpath without javah.
492 (define classpath-0.99
493 (package (inherit classpath-bootstrap)
494 (version "0.99")
495 (source (origin
496 (method url-fetch)
497 (uri (string-append "mirror://gnu/classpath/classpath-"
498 version ".tar.gz"))
499 (sha256
500 (base32
501 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
502 (patches (search-patches "classpath-aarch64-support.patch"))))
503 (arguments
504 `(#:configure-flags
505 (list (string-append "--with-ecj-jar="
506 (assoc-ref %build-inputs "ecj-bootstrap")
507 "/share/java/ecj-bootstrap.jar")
508 (string-append "JAVAC="
509 (assoc-ref %build-inputs "ecj-javac-wrapper")
510 "/bin/javac")
511 (string-append "JAVA="
512 (assoc-ref %build-inputs "jamvm")
513 "/bin/jamvm")
514 "GCJ_JAVAC_TRUE=no"
515 "ac_cv_prog_java_works=yes" ; trust me
516 "--disable-Werror"
517 "--disable-gmp"
518 "--disable-gtk-peer"
519 "--disable-gconf-peer"
520 "--disable-plugin"
521 "--disable-dssi"
522 "--disable-alsa"
523 "--disable-gjdoc")
524 #:phases
525 (modify-phases %standard-phases
526 (add-after 'install 'install-data
527 (lambda _ (invoke "make" "install-data"))))))
528 (native-inputs
529 `(("ecj-bootstrap" ,ecj-bootstrap)
530 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
531 ("fastjar" ,fastjar)
532 ("jamvm" ,jamvm-1-bootstrap)
533 ("classpath" ,classpath-bootstrap)
534 ("libltdl" ,libltdl)
535 ("pkg-config" ,pkg-config)))))
536
537 ;; We need this because classpath-bootstrap does not provide all of the tools
538 ;; we need to build classpath-devel.
539 (define classpath-jamvm-wrappers
540 (package (inherit classpath-0.99)
541 (name "classpath-jamvm-wrappers")
542 (source #f)
543 (build-system trivial-build-system)
544 (arguments
545 `(#:modules ((guix build utils))
546 #:builder
547 (begin
548 (use-modules (guix build utils))
549 (let* ((bash (assoc-ref %build-inputs "bash"))
550 (jamvm (assoc-ref %build-inputs "jamvm"))
551 (classpath (assoc-ref %build-inputs "classpath"))
552 (bin (string-append (assoc-ref %outputs "out")
553 "/bin/")))
554 (mkdir-p bin)
555 (for-each (lambda (tool)
556 (with-output-to-file (string-append bin tool)
557 (lambda _
558 ,@(if (string-prefix? "armhf" (or (%current-system)
559 (%current-target-system)))
560 `((format #t "#!~a/bin/sh
561 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
562 gnu.classpath.tools.~a.~a $@"
563 bash jamvm classpath tool
564 (if (string=? "native2ascii" tool)
565 "Native2ASCII" "Main")))
566 `((format #t "#!~a/bin/sh
567 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
568 gnu.classpath.tools.~a.~a $@"
569 bash jamvm classpath tool
570 (if (string=? "native2ascii" tool)
571 "Native2ASCII" "Main"))))))
572 (chmod (string-append bin tool) #o755))
573 (list "javah"
574 "rmic"
575 "rmid"
576 "orbd"
577 "rmiregistry"
578 "native2ascii"))
579 #t))))
580 (native-inputs
581 `(("bash" ,bash)
582 ("jamvm" ,jamvm-1-bootstrap)
583 ("classpath" ,classpath-0.99)))
584 (inputs '())
585 (synopsis "Executables from GNU Classpath")
586 (description "This package provides wrappers around the tools provided by
587 the GNU Classpath library. They are executed by the JamVM virtual
588 machine.")))
589
590 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
591 ;; then Classpath has gained much more support for Java 1.6.
592 (define-public classpath-devel
593 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
594 (revision "1"))
595 (package (inherit classpath-bootstrap)
596 (version (string-append "0.99-" revision "." (string-take commit 9)))
597 (source (origin
598 (method git-fetch)
599 (uri (git-reference
600 (url "https://git.savannah.gnu.org/git/classpath.git")
601 (commit commit)))
602 (file-name (string-append "classpath-" version "-checkout"))
603 (sha256
604 (base32
605 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
606 (arguments
607 `(#:make-flags
608 ;; Ensure that the initial heap size is smaller than the maximum
609 ;; size. By default only Xmx is set, which can lead to invalid
610 ;; memory settings on some machines with a lot of memory.
611 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
612 #:configure-flags
613 (list (string-append "--with-ecj-jar="
614 (assoc-ref %build-inputs "ecj-bootstrap")
615 "/share/java/ecj-bootstrap.jar")
616 (string-append "--with-javac="
617 (assoc-ref %build-inputs "ecj-javac-wrapper")
618 "/bin/javac")
619 (string-append "JAVA="
620 (assoc-ref %build-inputs "jamvm")
621 "/bin/jamvm")
622 "GCJ_JAVAC_TRUE=no"
623 "ac_cv_prog_java_works=yes" ; trust me
624 "--disable-Werror"
625 "--disable-gmp"
626 "--disable-gtk-peer"
627 "--disable-gconf-peer"
628 "--disable-plugin"
629 "--disable-dssi"
630 "--disable-alsa"
631 "--disable-gjdoc")
632 #:phases
633 (modify-phases %standard-phases
634 ;; XXX The bootstrap phase executes autogen.sh, which fails after
635 ;; complaining about the lack of gettext.
636 (replace 'bootstrap
637 (lambda _ (invoke "autoreconf" "-vif")))
638 (add-after 'unpack 'remove-unsupported-annotations
639 (lambda _
640 (substitute* (find-files "java" "\\.java$")
641 (("@Override") ""))
642 #t))
643 (add-after 'install 'install-data
644 (lambda _ (invoke "make" "install-data"))))))
645 (native-inputs
646 `(("autoconf" ,autoconf)
647 ("automake" ,automake)
648 ("libtool" ,libtool)
649 ("gettext" ,gettext-minimal)
650 ("texinfo" ,texinfo)
651 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
652 ("ecj-bootstrap" ,ecj-bootstrap)
653 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
654 ("fastjar" ,fastjar)
655 ("jamvm" ,jamvm-1-bootstrap)
656 ("libltdl" ,libltdl)
657 ("pkg-config" ,pkg-config))))))
658
659 (define jamvm
660 (package (inherit jamvm-1-bootstrap)
661 (version "2.0.0")
662 (source (origin
663 (method url-fetch)
664 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
665 "JamVM%20" version "/jamvm-"
666 version ".tar.gz"))
667 (sha256
668 (base32
669 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
670 (snippet
671 '(begin
672 ;; Remove precompiled software.
673 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
674 #t))))
675 (build-system gnu-build-system)
676 (arguments
677 `(#:configure-flags
678 (list (string-append "--with-classpath-install-dir="
679 (assoc-ref %build-inputs "classpath")))))
680 (inputs
681 `(("classpath" ,classpath-devel)
682 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
683 ("zip" ,zip)
684 ("zlib" ,zlib)))))
685
686 (define ecj-javac-wrapper-final
687 (package (inherit ecj-javac-wrapper)
688 (native-inputs
689 `(("guile" ,guile-2.2)
690 ("ecj-bootstrap" ,ecj-bootstrap)
691 ("jamvm" ,jamvm)
692 ("classpath" ,classpath-devel)))))
693
694 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
695 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
696 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
697 ;; which uses Java 6 only.
698 (define-public icedtea-6
699 (package
700 (name "icedtea")
701 (version "1.13.13")
702 (source (origin
703 (method url-fetch)
704 (uri (string-append
705 "http://icedtea.wildebeest.org/download/source/icedtea6-"
706 version ".tar.xz"))
707 (sha256
708 (base32
709 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
710 (modules '((guix build utils)))
711 (snippet
712 '(begin
713 (substitute* "Makefile.in"
714 ;; do not leak information about the build host
715 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
716 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
717 #t))))
718 (build-system gnu-build-system)
719 (outputs '("out" ; Java Runtime Environment
720 "jdk" ; Java Development Kit
721 "doc")) ; all documentation
722 (arguments
723 `(;; There are many failing tests and many are known to fail upstream.
724 #:tests? #f
725
726 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
727 ;; gremlin) doesn't support it yet, so skip this phase.
728 #:validate-runpath? #f
729
730 #:modules ((guix build utils)
731 (guix build gnu-build-system)
732 (srfi srfi-19))
733
734 #:configure-flags
735 `("--enable-bootstrap"
736 "--enable-nss"
737 "--without-rhino"
738 "--with-parallel-jobs"
739 "--disable-downloading"
740 "--disable-tests"
741 ,(string-append "--with-ecj="
742 (assoc-ref %build-inputs "ecj")
743 "/share/java/ecj-bootstrap.jar")
744 ,(string-append "--with-jar="
745 (assoc-ref %build-inputs "fastjar")
746 "/bin/fastjar")
747 ,(string-append "--with-jdk-home="
748 (assoc-ref %build-inputs "classpath"))
749 ,(string-append "--with-java="
750 (assoc-ref %build-inputs "jamvm")
751 "/bin/jamvm"))
752 #:phases
753 (modify-phases %standard-phases
754 (replace 'unpack
755 (lambda* (#:key source inputs #:allow-other-keys)
756 (invoke "tar" "xvf" source)
757 (chdir (string-append "icedtea6-" ,version))
758 (mkdir "openjdk")
759 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
760 ;; The convenient OpenJDK source bundle is no longer
761 ;; available for download, so we have to take the sources
762 ;; from the Mercurial repositories and change the Makefile
763 ;; to avoid tests for the OpenJDK zip archive.
764 (with-directory-excursion "openjdk"
765 (for-each (lambda (part)
766 (mkdir part)
767 (copy-recursively
768 (assoc-ref inputs
769 (string-append part "-src"))
770 part))
771 '("jdk" "corba"
772 "langtools" "jaxp" "jaxws")))
773 (with-directory-excursion "openjdk"
774 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
775 (rename-file "hg-checkout" "hotspot"))
776 (substitute* "patches/freetypeversion.patch"
777 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
778 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
779 (substitute* "Makefile.in"
780 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
781 "echo \"trust me\";")
782 ;; The contents of the bootstrap directory must be
783 ;; writeable but when copying from the store they are
784 ;; not.
785 (("mkdir -p lib/rt" line)
786 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
787 (invoke "chmod" "-R" "u+w" "openjdk")))
788 (add-after 'unpack 'use-classpath
789 (lambda* (#:key inputs #:allow-other-keys)
790 (let ((jvmlib (assoc-ref inputs "classpath"))
791 (jamvm (assoc-ref inputs "jamvm")))
792 ;; Classpath does not provide rt.jar.
793 (substitute* "Makefile.in"
794 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
795 (string-append jvmlib "/share/classpath/glibj.zip")))
796 ;; Make sure we can find all classes.
797 (setenv "CLASSPATH"
798 (string-append jvmlib "/share/classpath/glibj.zip:"
799 jvmlib "/share/classpath/tools.zip:"
800 jamvm "/lib/rt.jar"))
801 (setenv "JAVACFLAGS"
802 (string-append "-cp "
803 jvmlib "/share/classpath/glibj.zip:"
804 jvmlib "/share/classpath/tools.zip")))
805 #t))
806 (add-after 'unpack 'patch-patches
807 (lambda _
808 ;; shebang in patches so that they apply cleanly
809 (substitute* '("patches/jtreg-jrunscript.patch"
810 "patches/hotspot/hs23/drop_unlicensed_test.patch")
811 (("#!/bin/sh") (string-append "#!" (which "sh"))))
812 #t))
813 (add-after 'unpack 'patch-paths
814 (lambda* (#:key inputs #:allow-other-keys)
815 ;; buildtree.make generates shell scripts, so we need to replace
816 ;; the generated shebang
817 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
818 (("/bin/sh") (which "bash")))
819
820 (let ((corebin (string-append
821 (assoc-ref inputs "coreutils") "/bin/"))
822 (binbin (string-append
823 (assoc-ref inputs "binutils") "/bin/"))
824 (grepbin (string-append
825 (assoc-ref inputs "grep") "/bin/")))
826 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
827 "openjdk/corba/make/common/shared/Defs-linux.gmk")
828 (("UNIXCOMMAND_PATH = /bin/")
829 (string-append "UNIXCOMMAND_PATH = " corebin))
830 (("USRBIN_PATH = /usr/bin/")
831 (string-append "USRBIN_PATH = " corebin))
832 (("DEVTOOLS_PATH *= */usr/bin/")
833 (string-append "DEVTOOLS_PATH = " corebin))
834 (("COMPILER_PATH *= */usr/bin/")
835 (string-append "COMPILER_PATH = "
836 (assoc-ref inputs "gcc") "/bin/"))
837 (("DEF_OBJCOPY *=.*objcopy")
838 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
839
840 ;; fix path to alsa header
841 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
842 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
843 (string-append "ALSA_INCLUDE="
844 (assoc-ref inputs "alsa-lib")
845 "/include/alsa/version.h")))
846
847 ;; fix hard-coded utility paths
848 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
849 "openjdk/corba/make/common/shared/Defs-utils.gmk")
850 (("ECHO *=.*echo")
851 (string-append "ECHO = " (which "echo")))
852 (("^GREP *=.*grep")
853 (string-append "GREP = " (which "grep")))
854 (("EGREP *=.*egrep")
855 (string-append "EGREP = " (which "egrep")))
856 (("CPIO *=.*cpio")
857 (string-append "CPIO = " (which "cpio")))
858 (("READELF *=.*readelf")
859 (string-append "READELF = " (which "readelf")))
860 (("^ *AR *=.*ar")
861 (string-append "AR = " (which "ar")))
862 (("^ *TAR *=.*tar")
863 (string-append "TAR = " (which "tar")))
864 (("AS *=.*as")
865 (string-append "AS = " (which "as")))
866 (("LD *=.*ld")
867 (string-append "LD = " (which "ld")))
868 (("STRIP *=.*strip")
869 (string-append "STRIP = " (which "strip")))
870 (("NM *=.*nm")
871 (string-append "NM = " (which "nm")))
872 (("^SH *=.*sh")
873 (string-append "SH = " (which "bash")))
874 (("^FIND *=.*find")
875 (string-append "FIND = " (which "find")))
876 (("LDD *=.*ldd")
877 (string-append "LDD = " (which "ldd")))
878 (("NAWK *=.*(n|g)awk")
879 (string-append "NAWK = " (which "gawk")))
880 (("XARGS *=.*xargs")
881 (string-append "XARGS = " (which "xargs")))
882 (("UNZIP *=.*unzip")
883 (string-append "UNZIP = " (which "unzip")))
884 (("ZIPEXE *=.*zip")
885 (string-append "ZIPEXE = " (which "zip")))
886 (("SED *=.*sed")
887 (string-append "SED = " (which "sed"))))
888
889 ;; Some of these timestamps cause problems as they are more than
890 ;; 10 years ago, failing the build process.
891 (substitute*
892 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
893 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
894 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
895 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
896 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
897 #t)))
898 (add-before 'configure 'set-additional-paths
899 (lambda* (#:key inputs #:allow-other-keys)
900 (setenv "CPATH"
901 (string-append (assoc-ref inputs "libxrender")
902 "/include/X11/extensions" ":"
903 (assoc-ref inputs "libxtst")
904 "/include/X11/extensions" ":"
905 (assoc-ref inputs "libxinerama")
906 "/include/X11/extensions" ":"
907 (or (getenv "CPATH") "")))
908 (setenv "ALT_CUPS_HEADERS_PATH"
909 (string-append (assoc-ref inputs "cups")
910 "/include"))
911 (setenv "ALT_FREETYPE_HEADERS_PATH"
912 (string-append (assoc-ref inputs "freetype")
913 "/include"))
914 (setenv "ALT_FREETYPE_LIB_PATH"
915 (string-append (assoc-ref inputs "freetype")
916 "/lib"))
917 #t))
918 (add-before 'build 'disable-os-version-check
919 ;; allow build on linux major version change
920 (lambda _
921 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
922 #t))
923 (replace 'install
924 (lambda* (#:key outputs #:allow-other-keys)
925 (let ((doc (string-append (assoc-ref outputs "doc")
926 "/share/doc/icedtea"))
927 (jre (assoc-ref outputs "out"))
928 (jdk (assoc-ref outputs "jdk")))
929 (copy-recursively "openjdk.build/docs" doc)
930 (copy-recursively "openjdk.build/j2re-image" jre)
931 (copy-recursively "openjdk.build/j2sdk-image" jdk))
932 #t)))))
933 (native-inputs
934 `(("ant" ,ant-bootstrap)
935 ("alsa-lib" ,alsa-lib)
936 ("attr" ,attr)
937 ("classpath" ,classpath-devel)
938 ("coreutils" ,coreutils)
939 ("cpio" ,cpio)
940 ("cups" ,cups)
941 ("ecj" ,ecj-bootstrap)
942 ("ecj-javac" ,ecj-javac-wrapper-final)
943 ("fastjar" ,fastjar)
944 ("fontconfig" ,fontconfig)
945 ("freetype" ,freetype)
946 ("gtk" ,gtk+-2)
947 ("gawk" ,gawk)
948 ("giflib" ,giflib)
949 ("grep" ,grep)
950 ("jamvm" ,jamvm)
951 ("lcms" ,lcms)
952 ("libjpeg" ,libjpeg)
953 ("libnsl" ,libnsl)
954 ("libpng" ,libpng)
955 ("libtool" ,libtool)
956 ("libx11" ,libx11)
957 ("libxcomposite" ,libxcomposite)
958 ("libxi" ,libxi)
959 ("libxinerama" ,libxinerama)
960 ("libxrender" ,libxrender)
961 ("libxslt" ,libxslt) ;for xsltproc
962 ("libxt" ,libxt)
963 ("libxtst" ,libxtst)
964 ("mit-krb5" ,mit-krb5)
965 ("nss" ,nss)
966 ("nss-certs" ,nss-certs)
967 ("perl" ,perl)
968 ("pkg-config" ,pkg-config)
969 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
970 ("unzip" ,unzip)
971 ("wget" ,wget)
972 ("which" ,which)
973 ("zip" ,zip)
974 ("zlib" ,zlib)
975 ("openjdk-src"
976 ,(origin
977 (method hg-fetch)
978 (uri (hg-reference
979 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
980 (changeset "jdk6-b41")))
981 (sha256
982 (base32
983 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
984 ("jdk-src"
985 ,(origin
986 (method hg-fetch)
987 (uri (hg-reference
988 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
989 (changeset "jdk6-b41")))
990 (sha256
991 (base32
992 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
993 ("hotspot-src"
994 ,(origin
995 (method hg-fetch)
996 (uri (hg-reference
997 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
998 (changeset "jdk6-b41")))
999 (sha256
1000 (base32
1001 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1002 (patches
1003 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1004 ("corba-src"
1005 ,(origin
1006 (method hg-fetch)
1007 (uri (hg-reference
1008 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1009 (changeset "jdk6-b41")))
1010 (sha256
1011 (base32
1012 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1013 ("langtools-src"
1014 ,(origin
1015 (method hg-fetch)
1016 (uri (hg-reference
1017 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1018 (changeset "jdk6-b41")))
1019 (sha256
1020 (base32
1021 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1022 ("jaxp-src"
1023 ,(origin
1024 (method hg-fetch)
1025 (uri (hg-reference
1026 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1027 (changeset "jdk6-b41")))
1028 (sha256
1029 (base32
1030 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1031 ("jaxws-src"
1032 ,(origin
1033 (method hg-fetch)
1034 (uri (hg-reference
1035 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1036 (changeset "jdk6-b41")))
1037 (sha256
1038 (base32
1039 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1040 (home-page "http://icedtea.classpath.org")
1041 (synopsis "Java development kit")
1042 (description
1043 "This package provides the OpenJDK built with the IcedTea build harness.
1044 This version of the OpenJDK is no longer maintained and is only used for
1045 bootstrapping purposes.")
1046 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1047 ;; same license as both GNU Classpath and OpenJDK.
1048 (license license:gpl2+)))
1049
1050 (define-public icedtea-7
1051 (let* ((version "2.6.13")
1052 (drop (lambda (name hash)
1053 (origin
1054 (method url-fetch)
1055 (uri (string-append
1056 "http://icedtea.classpath.org/download/drops"
1057 "/icedtea7/" version "/" name ".tar.bz2"))
1058 (sha256 (base32 hash))))))
1059 (package
1060 (name "icedtea")
1061 (version version)
1062 (source (origin
1063 (method url-fetch)
1064 (uri (string-append
1065 "http://icedtea.wildebeest.org/download/source/icedtea-"
1066 version ".tar.xz"))
1067 (sha256
1068 (base32
1069 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1070 (modules '((guix build utils)))
1071 (snippet
1072 '(begin
1073 (substitute* "Makefile.in"
1074 ;; do not leak information about the build host
1075 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1076 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1077 #t))))
1078 (build-system gnu-build-system)
1079 (outputs '("out" ; Java Runtime Environment
1080 "jdk" ; Java Development Kit
1081 "doc")) ; all documentation
1082 (arguments
1083 `(;; There are many test failures. Some are known to
1084 ;; fail upstream, others relate to not having an X
1085 ;; server running at test time, yet others are a
1086 ;; complete mystery to me.
1087
1088 ;; hotspot: passed: 241; failed: 45; error: 2
1089 ;; langtools: passed: 1,934; failed: 26
1090 ;; jdk: unknown
1091 #:tests? #f
1092
1093 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1094 ;; gremlin) doesn't support it yet, so skip this phase.
1095 #:validate-runpath? #f
1096
1097 ;; Apparently, the C locale is needed for some of the tests.
1098 #:locale "C"
1099
1100 #:modules ((guix build utils)
1101 (guix build gnu-build-system)
1102 (ice-9 match)
1103 (ice-9 popen)
1104 (srfi srfi-19)
1105 (srfi srfi-26))
1106
1107 #:configure-flags
1108 ;; TODO: package pcsc and sctp, and add to inputs
1109 `("--disable-system-pcsc"
1110 "--disable-system-sctp"
1111 "--enable-bootstrap"
1112 "--enable-nss"
1113 "--without-rhino"
1114 "--disable-downloading"
1115 "--disable-tests" ;they are run in the check phase instead
1116 "--with-openjdk-src-dir=./openjdk.src"
1117 ,(string-append "--with-jdk-home="
1118 (assoc-ref %build-inputs "jdk")))
1119
1120 #:phases
1121 (modify-phases %standard-phases
1122 (replace 'unpack
1123 (lambda* (#:key source inputs #:allow-other-keys)
1124 (let ((target (string-append "icedtea-" ,version))
1125 (unpack (lambda* (name #:optional dir)
1126 (let ((dir (or dir
1127 (string-drop-right name 5))))
1128 (mkdir dir)
1129 (invoke "tar" "xvf"
1130 (assoc-ref inputs name)
1131 "-C" dir
1132 "--strip-components=1")))))
1133 (mkdir target)
1134 (invoke "tar" "xvf" source
1135 "-C" target "--strip-components=1")
1136 (chdir target)
1137 (unpack "openjdk-src" "openjdk.src")
1138 (with-directory-excursion "openjdk.src"
1139 (for-each unpack
1140 (filter (cut string-suffix? "-drop" <>)
1141 (map (match-lambda
1142 ((name . _) name))
1143 inputs))))
1144 #t)))
1145 (add-after 'unpack 'patch-bitrot
1146 (lambda _
1147 (substitute* '("patches/boot/revert-6973616.patch"
1148 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1149 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1150 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1151 ;; As of attr 2.4.48 this header is no longer
1152 ;; included. It is provided by the libc instead.
1153 (substitute* '("configure"
1154 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1155 (("attr/xattr.h") "sys/xattr.h"))
1156 #t))
1157 (add-after 'unpack 'fix-x11-extension-include-path
1158 (lambda* (#:key inputs #:allow-other-keys)
1159 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1160 (((string-append "\\$\\(firstword \\$\\(wildcard "
1161 "\\$\\(OPENWIN_HOME\\)"
1162 "/include/X11/extensions\\).*$"))
1163 (string-append (assoc-ref inputs "libxrender")
1164 "/include/X11/extensions"
1165 " -I" (assoc-ref inputs "libxtst")
1166 "/include/X11/extensions"
1167 " -I" (assoc-ref inputs "libxinerama")
1168 "/include/X11/extensions"))
1169 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1170 #t))
1171 (add-after 'unpack 'patch-paths
1172 (lambda _
1173 ;; buildtree.make generates shell scripts, so we need to replace
1174 ;; the generated shebang
1175 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1176 (("/bin/sh") (which "bash")))
1177
1178 (let ((corebin (string-append
1179 (assoc-ref %build-inputs "coreutils") "/bin/"))
1180 (binbin (string-append
1181 (assoc-ref %build-inputs "binutils") "/bin/"))
1182 (grepbin (string-append
1183 (assoc-ref %build-inputs "grep") "/bin/")))
1184 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1185 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1186 (("UNIXCOMMAND_PATH = /bin/")
1187 (string-append "UNIXCOMMAND_PATH = " corebin))
1188 (("USRBIN_PATH = /usr/bin/")
1189 (string-append "USRBIN_PATH = " corebin))
1190 (("DEVTOOLS_PATH *= */usr/bin/")
1191 (string-append "DEVTOOLS_PATH = " corebin))
1192 (("COMPILER_PATH *= */usr/bin/")
1193 (string-append "COMPILER_PATH = "
1194 (assoc-ref %build-inputs "gcc") "/bin/"))
1195 (("DEF_OBJCOPY *=.*objcopy")
1196 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1197
1198 ;; fix path to alsa header
1199 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1200 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1201 (string-append "ALSA_INCLUDE="
1202 (assoc-ref %build-inputs "alsa-lib")
1203 "/include/alsa/version.h")))
1204
1205 ;; fix hard-coded utility paths
1206 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1207 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1208 (("ECHO *=.*echo")
1209 (string-append "ECHO = " (which "echo")))
1210 (("^GREP *=.*grep")
1211 (string-append "GREP = " (which "grep")))
1212 (("EGREP *=.*egrep")
1213 (string-append "EGREP = " (which "egrep")))
1214 (("CPIO *=.*cpio")
1215 (string-append "CPIO = " (which "cpio")))
1216 (("READELF *=.*readelf")
1217 (string-append "READELF = " (which "readelf")))
1218 (("^ *AR *=.*ar")
1219 (string-append "AR = " (which "ar")))
1220 (("^ *TAR *=.*tar")
1221 (string-append "TAR = " (which "tar")))
1222 (("AS *=.*as")
1223 (string-append "AS = " (which "as")))
1224 (("LD *=.*ld")
1225 (string-append "LD = " (which "ld")))
1226 (("STRIP *=.*strip")
1227 (string-append "STRIP = " (which "strip")))
1228 (("NM *=.*nm")
1229 (string-append "NM = " (which "nm")))
1230 (("^SH *=.*sh")
1231 (string-append "SH = " (which "bash")))
1232 (("^FIND *=.*find")
1233 (string-append "FIND = " (which "find")))
1234 (("LDD *=.*ldd")
1235 (string-append "LDD = " (which "ldd")))
1236 (("NAWK *=.*(n|g)awk")
1237 (string-append "NAWK = " (which "gawk")))
1238 (("XARGS *=.*xargs")
1239 (string-append "XARGS = " (which "xargs")))
1240 (("UNZIP *=.*unzip")
1241 (string-append "UNZIP = " (which "unzip")))
1242 (("ZIPEXE *=.*zip")
1243 (string-append "ZIPEXE = " (which "zip")))
1244 (("SED *=.*sed")
1245 (string-append "SED = " (which "sed"))))
1246
1247 ;; Some of these timestamps cause problems as they are more than
1248 ;; 10 years ago, failing the build process.
1249 (substitute*
1250 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1251 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1252 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1253 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1254 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1255 #t))
1256 (add-before 'configure 'set-additional-paths
1257 (lambda* (#:key inputs #:allow-other-keys)
1258 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1259 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1260 (string-append "ALSA_INCLUDE="
1261 (assoc-ref inputs "alsa-lib")
1262 "/include/alsa/version.h")))
1263 (setenv "CC" "gcc")
1264 (setenv "CPATH"
1265 (string-append (assoc-ref inputs "libxcomposite")
1266 "/include/X11/extensions" ":"
1267 (assoc-ref inputs "libxrender")
1268 "/include/X11/extensions" ":"
1269 (assoc-ref inputs "libxtst")
1270 "/include/X11/extensions" ":"
1271 (assoc-ref inputs "libxinerama")
1272 "/include/X11/extensions" ":"
1273 (or (getenv "CPATH") "")))
1274 (setenv "ALT_OBJCOPY" (which "objcopy"))
1275 (setenv "ALT_CUPS_HEADERS_PATH"
1276 (string-append (assoc-ref inputs "cups")
1277 "/include"))
1278 (setenv "ALT_FREETYPE_HEADERS_PATH"
1279 (string-append (assoc-ref inputs "freetype")
1280 "/include"))
1281 (setenv "ALT_FREETYPE_LIB_PATH"
1282 (string-append (assoc-ref inputs "freetype")
1283 "/lib"))
1284 #t))
1285 (add-before 'build 'disable-os-version-check
1286 ;; allow build on linux major version change
1287 (lambda _
1288 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1289 #t))
1290 (add-before 'check 'fix-test-framework
1291 (lambda _
1292 ;; Fix PATH in test environment
1293 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1294 (("PATH=/bin:/usr/bin")
1295 (string-append "PATH=" (getenv "PATH"))))
1296 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1297 (("/usr/bin/env") (which "env")))
1298 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1299 (("/bin/rm") (which "rm"))
1300 (("/bin/cp") (which "cp"))
1301 (("/bin/mv") (which "mv")))
1302 #t))
1303 (add-before 'check 'fix-hotspot-tests
1304 (lambda _
1305 (with-directory-excursion "openjdk.src/hotspot/test/"
1306 (substitute* "jprt.config"
1307 (("PATH=\"\\$\\{path4sdk\\}\"")
1308 (string-append "PATH=" (getenv "PATH")))
1309 (("make=/usr/bin/make")
1310 (string-append "make=" (which "make"))))
1311 (substitute* '("runtime/6626217/Test6626217.sh"
1312 "runtime/7110720/Test7110720.sh")
1313 (("/bin/rm") (which "rm"))
1314 (("/bin/cp") (which "cp"))
1315 (("/bin/mv") (which "mv"))))
1316 #t))
1317 (add-before 'check 'fix-jdk-tests
1318 (lambda _
1319 (with-directory-excursion "openjdk.src/jdk/test/"
1320 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1321 (("/bin/pwd") (which "pwd")))
1322 (substitute* "com/sun/jdi/ShellScaffold.sh"
1323 (("/bin/kill") (which "kill")))
1324 (substitute* "start-Xvfb.sh"
1325 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1326 (("/usr/bin/nohup") (which "nohup")))
1327 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1328 (("/bin/rm") (which "rm")))
1329 (substitute* "tools/launcher/MultipleJRE.sh"
1330 (("echo \"#!/bin/sh\"")
1331 (string-append "echo \"#!" (which "rm") "\""))
1332 (("/usr/bin/zip") (which "zip")))
1333 (substitute* "com/sun/jdi/OnThrowTest.java"
1334 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1335 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1336 (("/usr/bin/uptime") (which "uptime")))
1337 (substitute* "java/lang/ProcessBuilder/Basic.java"
1338 (("/usr/bin/env") (which "env"))
1339 (("/bin/false") (which "false"))
1340 (("/bin/true") (which "true"))
1341 (("/bin/cp") (which "cp"))
1342 (("/bin/sh") (which "sh")))
1343 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1344 (("/bin/sh") (which "sh")))
1345 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1346 (("/usr/bin/perl") (which "perl"))
1347 (("/bin/ps") (which "ps"))
1348 (("/bin/true") (which "true")))
1349 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1350 (("/usr/bin/tee") (which "tee")))
1351 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1352 (("/bin/true") (which "true")))
1353 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1354 (("/bin/cat") (which "cat")))
1355 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1356 (("/bin/sh") (which "sh"))
1357 (("/bin/true") (which "true"))
1358 (("/bin/kill") (which "kill")))
1359 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1360 (("/usr/bin/echo") (which "echo")))
1361 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1362 (("/usr/bin/cat") (which "cat")))
1363 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1364 (("/bin/cat") (which "cat"))
1365 (("/bin/sleep") (which "sleep"))
1366 (("/bin/sh") (which "sh")))
1367 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1368 (("/bin/cat") (which "cat")))
1369 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1370 (("/bin/chmod") (which "chmod")))
1371 (substitute* "java/util/zip/ZipFile/Assortment.java"
1372 (("/bin/sh") (which "sh"))))
1373 #t))
1374 (replace 'check
1375 (lambda _
1376 ;; The "make check-*" targets always return zero, so we need to
1377 ;; check for errors in the associated log files to determine
1378 ;; whether any tests have failed.
1379 (use-modules (ice-9 rdelim))
1380 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1381 (checker (lambda (port)
1382 (let loop ()
1383 (let ((line (read-line port)))
1384 (cond
1385 ((eof-object? line) #t)
1386 ((regexp-exec error-pattern line)
1387 (error "test failed"))
1388 (else (loop)))))))
1389 (run-test (lambda (test)
1390 (invoke "make" test)
1391 (call-with-input-file
1392 (string-append "test/" test ".log")
1393 checker))))
1394 (when #f ; skip tests
1395 (run-test "check-hotspot")
1396 (run-test "check-langtools")
1397 (run-test "check-jdk"))
1398 #t)))
1399 (replace 'install
1400 (lambda* (#:key outputs #:allow-other-keys)
1401 (let ((doc (string-append (assoc-ref outputs "doc")
1402 "/share/doc/icedtea"))
1403 (jre (assoc-ref outputs "out"))
1404 (jdk (assoc-ref outputs "jdk")))
1405 (copy-recursively "openjdk.build/docs" doc)
1406 (copy-recursively "openjdk.build/j2re-image" jre)
1407 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1408 #t))
1409 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1410 ;; But that shared object is located in the server/ folder, so it
1411 ;; cannot be found. This phase creates a symbolic link in the
1412 ;; lib/amd64 folder so that the other libraries can find it.
1413 ;;
1414 ;; See:
1415 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1416 ;;
1417 ;; FIXME: Find the bug in the build system, so that this symlink is
1418 ;; not needed.
1419 (add-after 'install 'install-libjvm
1420 (lambda* (#:key inputs outputs #:allow-other-keys)
1421 (let* ((lib-path (string-append (assoc-ref outputs "out")
1422 ;; See 'INSTALL_ARCH_DIR' in
1423 ;; 'configure'.
1424 ,(match (%current-system)
1425 ("i686-linux"
1426 "/lib/i386")
1427 ("x86_64-linux"
1428 "/lib/amd64")
1429 ("armhf-linux"
1430 "/lib/arm")
1431 ("aarch64-linux"
1432 "/lib/aarch64")
1433 ;; We need a catch-all, dropping
1434 ;; '-linux' works in most cases.
1435 (_
1436 (string-append
1437 "/lib/"
1438 (string-drop-right
1439 (%current-system) 6)))))))
1440 (symlink (string-append lib-path "/server/libjvm.so")
1441 (string-append lib-path "/libjvm.so")))
1442 #t))
1443 ;; By default IcedTea only generates an empty keystore. In order to
1444 ;; be able to use certificates in Java programs we need to generate a
1445 ;; keystore from a set of certificates. For convenience we use the
1446 ;; certificates from the nss-certs package.
1447 (add-after 'install 'install-keystore
1448 (lambda* (#:key inputs outputs #:allow-other-keys)
1449 (let* ((keystore "cacerts")
1450 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1451 "/etc/ssl/certs"))
1452 (keytool (string-append (assoc-ref outputs "jdk")
1453 "/bin/keytool")))
1454 (define (extract-cert file target)
1455 (call-with-input-file file
1456 (lambda (in)
1457 (call-with-output-file target
1458 (lambda (out)
1459 (let loop ((line (read-line in 'concat))
1460 (copying? #f))
1461 (cond
1462 ((eof-object? line) #t)
1463 ((string-prefix? "-----BEGIN" line)
1464 (display line out)
1465 (loop (read-line in 'concat) #t))
1466 ((string-prefix? "-----END" line)
1467 (display line out)
1468 #t)
1469 (else
1470 (when copying? (display line out))
1471 (loop (read-line in 'concat) copying?)))))))))
1472 (define (import-cert cert)
1473 (format #t "Importing certificate ~a\n" (basename cert))
1474 (let ((temp "tmpcert"))
1475 (extract-cert cert temp)
1476 (let ((port (open-pipe* OPEN_WRITE keytool
1477 "-import"
1478 "-alias" (basename cert)
1479 "-keystore" keystore
1480 "-storepass" "changeit"
1481 "-file" temp)))
1482 (display "yes\n" port)
1483 (when (not (zero? (status:exit-val (close-pipe port))))
1484 (format #t "failed to import ~a\n" cert)))
1485 (delete-file temp)))
1486
1487 ;; This is necessary because the certificate directory contains
1488 ;; files with non-ASCII characters in their names.
1489 (setlocale LC_ALL "en_US.utf8")
1490 (setenv "LC_ALL" "en_US.utf8")
1491
1492 (for-each import-cert (find-files certs-dir "\\.pem$"))
1493 (mkdir-p (string-append (assoc-ref outputs "out")
1494 "/lib/security"))
1495 (mkdir-p (string-append (assoc-ref outputs "jdk")
1496 "/jre/lib/security"))
1497
1498 ;; The cacerts files we are going to overwrite are chmod'ed as
1499 ;; read-only (444) in icedtea-8 (which derives from this
1500 ;; package). We have to change this so we can overwrite them.
1501 (chmod (string-append (assoc-ref outputs "out")
1502 "/lib/security/" keystore) #o644)
1503 (chmod (string-append (assoc-ref outputs "jdk")
1504 "/jre/lib/security/" keystore) #o644)
1505
1506 (install-file keystore
1507 (string-append (assoc-ref outputs "out")
1508 "/lib/security"))
1509 (install-file keystore
1510 (string-append (assoc-ref outputs "jdk")
1511 "/jre/lib/security"))
1512 #t))))))
1513 (native-inputs
1514 `(("openjdk-src"
1515 ,(drop "openjdk"
1516 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1517 ("corba-drop"
1518 ,(drop "corba"
1519 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1520 ("jaxp-drop"
1521 ,(drop "jaxp"
1522 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1523 ("jaxws-drop"
1524 ,(drop "jaxws"
1525 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1526 ("jdk-drop"
1527 ,(drop "jdk"
1528 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1529 ("langtools-drop"
1530 ,(drop "langtools"
1531 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1532 ("hotspot-drop"
1533 ,(origin
1534 (method url-fetch)
1535 (uri (string-append
1536 "http://icedtea.classpath.org/downloads/drops"
1537 "/icedtea7/" version "/hotspot.tar.bz2"))
1538 (sha256
1539 (base32
1540 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1541 (patches (search-patches
1542 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1543 ("ant" ,ant-bootstrap)
1544 ("attr" ,attr)
1545 ("coreutils" ,coreutils)
1546 ("diffutils" ,diffutils) ;for tests
1547 ("gawk" ,gawk)
1548 ("grep" ,grep)
1549 ("libtool" ,libtool)
1550 ("pkg-config" ,pkg-config)
1551 ("wget" ,wget)
1552 ("which" ,which)
1553 ("cpio" ,cpio)
1554 ("zip" ,zip)
1555 ("unzip" ,unzip)
1556 ("fastjar" ,fastjar)
1557 ("libxslt" ,libxslt) ;for xsltproc
1558 ("nss-certs" ,nss-certs)
1559 ("perl" ,perl)
1560 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1561 ("jdk" ,icedtea-6 "jdk")))
1562 (inputs
1563 `(("alsa-lib" ,alsa-lib)
1564 ("cups" ,cups)
1565 ("libx11" ,libx11)
1566 ("libxcomposite" ,libxcomposite)
1567 ("libxt" ,libxt)
1568 ("libxtst" ,libxtst)
1569 ("libxi" ,libxi)
1570 ("libxinerama" ,libxinerama)
1571 ("libxrender" ,libxrender)
1572 ("libjpeg" ,libjpeg)
1573 ("libpng" ,libpng)
1574 ("mit-krb5" ,mit-krb5)
1575 ("nss" ,nss)
1576 ("giflib" ,giflib)
1577 ("fontconfig" ,fontconfig)
1578 ("freetype" ,freetype)
1579 ("lcms" ,lcms)
1580 ("zlib" ,zlib)
1581 ("gtk" ,gtk+-2)))
1582 (home-page "http://icedtea.classpath.org")
1583 (synopsis "Java development kit")
1584 (description
1585 "This package provides the Java development kit OpenJDK built with the
1586 IcedTea build harness.")
1587
1588 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1589 (supported-systems (delete "mips64el-linux" %supported-systems))
1590
1591 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1592 ;; same license as both GNU Classpath and OpenJDK.
1593 (license license:gpl2+))))
1594
1595 (define-public icedtea-8
1596 (let* ((version "3.7.0")
1597 (drop (lambda (name hash)
1598 (origin
1599 (method url-fetch)
1600 (uri (string-append
1601 "http://icedtea.classpath.org/download/drops"
1602 "/icedtea8/" version "/" name ".tar.xz"))
1603 (sha256 (base32 hash))))))
1604 (package (inherit icedtea-7)
1605 (version "3.7.0")
1606 (source (origin
1607 (method url-fetch)
1608 (uri (string-append
1609 "http://icedtea.wildebeest.org/download/source/icedtea-"
1610 version ".tar.xz"))
1611 (sha256
1612 (base32
1613 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1614 (modules '((guix build utils)))
1615 (snippet
1616 '(begin
1617 (substitute* '("configure"
1618 "acinclude.m4")
1619 ;; Do not embed build time
1620 (("(DIST_ID=\"Custom build).*$" _ prefix)
1621 (string-append prefix "\"\n"))
1622 ;; Do not leak information about the build host
1623 (("DIST_NAME=\"\\$build_os\"")
1624 "DIST_NAME=\"guix\""))
1625 #t))))
1626 (arguments
1627 `(#:imported-modules
1628 ((guix build ant-build-system)
1629 (guix build syscalls)
1630 ,@%gnu-build-system-modules)
1631 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1632 ((#:modules modules)
1633 `((guix build utils)
1634 (guix build gnu-build-system)
1635 ((guix build ant-build-system) #:prefix ant:)
1636 (ice-9 match)
1637 (ice-9 popen)
1638 (srfi srfi-19)
1639 (srfi srfi-26)))
1640 ((#:configure-flags flags)
1641 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1642 `( ;;"--disable-bootstrap"
1643 "--enable-bootstrap"
1644 "--enable-nss"
1645 "--disable-downloading"
1646 "--disable-system-pcsc"
1647 "--disable-system-sctp"
1648 "--disable-tests" ;they are run in the check phase instead
1649 "--with-openjdk-src-dir=./openjdk.src"
1650 ,(string-append "--with-jdk-home=" jdk))))
1651 ((#:phases phases)
1652 `(modify-phases ,phases
1653 (delete 'fix-x11-extension-include-path)
1654 (delete 'patch-paths)
1655 (delete 'set-additional-paths)
1656 (delete 'patch-patches)
1657 (delete 'patch-bitrot)
1658 ;; Prevent the keytool from recording the current time when
1659 ;; adding certificates at build time.
1660 (add-after 'unpack 'patch-keystore
1661 (lambda _
1662 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1663 (("date = new Date\\(\\);")
1664 "\
1665 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1666 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1667 new Date();"))
1668 #t))
1669 (add-after 'unpack 'patch-jni-libs
1670 ;; Hardcode dynamically loaded libraries.
1671 (lambda _
1672 (let* ((library-path (search-path-as-string->list
1673 (getenv "LIBRARY_PATH")))
1674 (find-library (lambda (name)
1675 (search-path
1676 library-path
1677 (string-append "lib" name ".so")))))
1678 (for-each
1679 (lambda (file)
1680 (catch 'decoding-error
1681 (lambda ()
1682 (substitute* file
1683 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1684 _ name version)
1685 (format #f "\"~a\"" (find-library name)))
1686 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1687 (format #f "\"~a\"" (find-library name)))))
1688 (lambda _
1689 ;; Those are safe to skip.
1690 (format (current-error-port)
1691 "warning: failed to substitute: ~a~%"
1692 file))))
1693 (find-files "openjdk.src/jdk/src/solaris/native"
1694 "\\.c|\\.h"))
1695 #t)))
1696 (replace 'install
1697 (lambda* (#:key outputs #:allow-other-keys)
1698 (let ((doc (string-append (assoc-ref outputs "doc")
1699 "/share/doc/icedtea"))
1700 (jre (assoc-ref outputs "out"))
1701 (jdk (assoc-ref outputs "jdk")))
1702 (copy-recursively "openjdk.build/docs" doc)
1703 (copy-recursively "openjdk.build/images/j2re-image" jre)
1704 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1705 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1706 ;; support via NSS.
1707 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1708 (string-append jre "/lib/security/nss.cfg"))
1709 #t)))
1710 (add-after 'install 'strip-jar-timestamps
1711 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1712 (native-inputs
1713 `(("jdk" ,icedtea-7 "jdk")
1714 ("openjdk-src"
1715 ,(drop "openjdk"
1716 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1717 ("aarch32-drop"
1718 ,(drop "aarch32"
1719 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1720 ("corba-drop"
1721 ,(drop "corba"
1722 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1723 ("jaxp-drop"
1724 ,(drop "jaxp"
1725 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1726 ("jaxws-drop"
1727 ,(drop "jaxws"
1728 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1729 ("jdk-drop"
1730 ,(drop "jdk"
1731 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1732 ("langtools-drop"
1733 ,(drop "langtools"
1734 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1735 ("hotspot-drop"
1736 ,(origin
1737 (method url-fetch)
1738 (uri (string-append
1739 "http://icedtea.classpath.org/download/drops"
1740 "/icedtea8/" version "/hotspot.tar.xz"))
1741 (sha256
1742 (base32
1743 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1744 (patches (search-patches
1745 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1746 ("nashorn-drop"
1747 ,(drop "nashorn"
1748 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1749 ("shenandoah-drop"
1750 ,(drop "shenandoah"
1751 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1752 ,@(fold alist-delete (package-native-inputs icedtea-7)
1753 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1754 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1755
1756 (define-public openjdk9
1757 (package
1758 (name "openjdk")
1759 (version "9.181")
1760 (source (origin
1761 (method url-fetch)
1762 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1763 (file-name (string-append name "-" version ".tar.bz2"))
1764 (sha256
1765 (base32
1766 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1767 (modules '((guix build utils)))
1768 (snippet
1769 `(begin
1770 (for-each delete-file (find-files "." ".*.bin$"))
1771 (for-each delete-file (find-files "." ".*.exe$"))
1772 (for-each delete-file (find-files "." ".*.jar$"))
1773 #t))))
1774 (build-system gnu-build-system)
1775 (outputs '("out" "jdk" "doc"))
1776 (arguments
1777 `(#:tests? #f; require jtreg
1778 #:imported-modules
1779 ((guix build syscalls)
1780 ,@%gnu-build-system-modules)
1781 #:phases
1782 (modify-phases %standard-phases
1783 (add-after 'patch-source-shebangs 'fix-java-shebangs
1784 (lambda _
1785 ;; This file was "fixed" by patch-source-shebangs, but it requires
1786 ;; this exact first line.
1787 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1788 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1789 #t))
1790 (replace 'configure
1791 (lambda* (#:key inputs outputs #:allow-other-keys)
1792 ;; TODO: unbundle libpng and lcms
1793 (invoke "bash" "./configure"
1794 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1795 "--disable-freetype-bundling"
1796 "--disable-warnings-as-errors"
1797 "--disable-hotspot-gtest"
1798 "--with-giflib=system"
1799 "--with-libjpeg=system"
1800 (string-append "--prefix=" (assoc-ref outputs "out")))
1801 #t))
1802 (replace 'build
1803 (lambda _
1804 (with-output-to-file ".src-rev"
1805 (lambda _
1806 (display ,version)))
1807 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1808 (invoke "make" "all")
1809 #t))
1810 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1811 ;; But that shared object is located in the server/ folder, so it
1812 ;; cannot be found. This phase creates a symbolic link in the
1813 ;; lib/ folder so that the other libraries can find it.
1814 ;;
1815 ;; See:
1816 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1817 ;;
1818 ;; FIXME: Find the bug in the build system, so that this symlink is
1819 ;; not needed.
1820 (add-after 'install 'install-libjvm
1821 (lambda* (#:key inputs outputs #:allow-other-keys)
1822 (let* ((lib-out (string-append (assoc-ref outputs "out")
1823 "/lib"))
1824 (lib-jdk (string-append (assoc-ref outputs "jdk")
1825 "/lib")))
1826 (symlink (string-append lib-jdk "/server/libjvm.so")
1827 (string-append lib-jdk "/libjvm.so"))
1828 (symlink (string-append lib-out "/server/libjvm.so")
1829 (string-append lib-out "/libjvm.so")))
1830 #t))
1831 (replace 'install
1832 (lambda* (#:key outputs #:allow-other-keys)
1833 (let ((out (assoc-ref outputs "out"))
1834 (jdk (assoc-ref outputs "jdk"))
1835 (doc (assoc-ref outputs "doc"))
1836 (images (car (find-files "build" ".*-server-release"
1837 #:directories? #t))))
1838 (copy-recursively (string-append images "/images/jdk") jdk)
1839 (copy-recursively (string-append images "/images/jre") out)
1840 (copy-recursively (string-append images "/images/docs") doc))
1841 #t))
1842 (add-after 'install 'strip-zip-timestamps
1843 (lambda* (#:key outputs #:allow-other-keys)
1844 (use-modules (guix build syscalls))
1845 (for-each (lambda (zip)
1846 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1847 (with-directory-excursion dir
1848 (invoke "unzip" zip))
1849 (delete-file zip)
1850 (for-each (lambda (file)
1851 (let ((s (lstat file)))
1852 (unless (eq? (stat:type s) 'symlink)
1853 (format #t "reset ~a~%" file)
1854 (utime file 0 0 0 0))))
1855 (find-files dir #:directories? #t))
1856 (with-directory-excursion dir
1857 (let ((files (find-files "." ".*" #:directories? #t)))
1858 (apply invoke "zip" "-0" "-X" zip files)))))
1859 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1860 #t)))))
1861 (inputs
1862 `(("alsa-lib" ,alsa-lib)
1863 ("cups" ,cups)
1864 ("fontconfig" ,fontconfig)
1865 ("freetype" ,freetype)
1866 ("giflib" ,giflib)
1867 ("lcms" ,lcms)
1868 ("libelf" ,libelf)
1869 ("libjpeg" ,libjpeg)
1870 ("libice" ,libice)
1871 ("libpng" ,libpng)
1872 ("libx11" ,libx11)
1873 ("libxcomposite" ,libxcomposite)
1874 ("libxi" ,libxi)
1875 ("libxinerama" ,libxinerama)
1876 ("libxrender" ,libxrender)
1877 ("libxt" ,libxt)
1878 ("libxtst" ,libxtst)))
1879 (native-inputs
1880 `(("icedtea-8" ,icedtea-8)
1881 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1882 ("unzip" ,unzip)
1883 ("which" ,which)
1884 ("zip" ,zip)))
1885 (home-page "https://openjdk.java.net/projects/jdk9/")
1886 (synopsis "Java development kit")
1887 (description
1888 "This package provides the Java development kit OpenJDK.")
1889 (license license:gpl2+)))
1890
1891 (define-public openjdk10
1892 (package
1893 (inherit openjdk9)
1894 (name "openjdk")
1895 (version "10.46")
1896 (source (origin
1897 (method url-fetch)
1898 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1899 (file-name (string-append name "-" version ".tar.bz2"))
1900 (sha256
1901 (base32
1902 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1903 (patches (search-patches
1904 "openjdk-10-idlj-reproducibility.patch"))
1905 (modules '((guix build utils)))
1906 (snippet
1907 `(begin
1908 (for-each delete-file (find-files "." ".*.bin$"))
1909 (for-each delete-file (find-files "." ".*.exe$"))
1910 (for-each delete-file (find-files "." ".*.jar$"))
1911 #t))))
1912 (arguments
1913 (substitute-keyword-arguments (package-arguments openjdk9)
1914 ((#:phases phases)
1915 `(modify-phases ,phases
1916 (replace 'fix-java-shebangs
1917 (lambda _
1918 ;; This file was "fixed" by patch-source-shebangs, but it requires
1919 ;; this exact first line.
1920 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1921 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1922 #t))
1923 (replace 'configure
1924 (lambda* (#:key inputs outputs #:allow-other-keys)
1925 (invoke "bash" "./configure"
1926 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1927 "--disable-freetype-bundling"
1928 "--disable-warnings-as-errors"
1929 "--disable-hotspot-gtest"
1930 "--with-giflib=system"
1931 "--with-libjpeg=system"
1932 "--with-native-debug-symbols=zipped"
1933 (string-append "--prefix=" (assoc-ref outputs "out")))
1934 #t))))))
1935 (native-inputs
1936 `(("openjdk9" ,openjdk9)
1937 ("openjdk9:jdk" ,openjdk9 "jdk")
1938 ("unzip" ,unzip)
1939 ("which" ,which)
1940 ("zip" ,zip)))))
1941
1942 (define-public openjdk11
1943 (package
1944 (name "openjdk")
1945 (version "11.28")
1946 (source (origin
1947 (method url-fetch)
1948 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1949 (file-name (string-append name "-" version ".tar.bz2"))
1950 (sha256
1951 (base32
1952 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1953 (modules '((guix build utils)))
1954 (snippet
1955 `(begin
1956 (for-each delete-file (find-files "." ".*.bin$"))
1957 (for-each delete-file (find-files "." ".*.exe$"))
1958 (for-each delete-file (find-files "." ".*.jar$"))
1959 #t))))
1960 (build-system gnu-build-system)
1961 (outputs '("out" "jdk" "doc"))
1962 (arguments
1963 `(#:imported-modules
1964 ((guix build syscalls)
1965 (ice-9 binary-ports)
1966 (rnrs bytevectors)
1967 ,@%gnu-build-system-modules)
1968 #:tests? #f; requires jtreg
1969 ;; TODO package jtreg
1970 ;; disable parallel builds, as the openjdk build system does not like -j
1971 #:parallel-build? #f
1972 #:parallel-tests? #f
1973 ;; reenable parallel builds and tests by adding the flags manually
1974 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1975 #:configure-flags
1976 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1977 "--disable-warnings-as-errors"
1978 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1979 "--with-native-debug-symbols=zipped"
1980 ;; do not use the bundled libraries
1981 "--with-giflib=system"
1982 "--with-lcms=system"
1983 "--with-libjpeg=system"
1984 "--with-libpng=system"
1985 "--with-version-pre="
1986 ;; allow the build system to locate the system freetype
1987 ,(string-append "--with-freetype-include="
1988 (assoc-ref %build-inputs "freetype") "/include")
1989 ,(string-append "--with-freetype-lib="
1990 (assoc-ref %build-inputs "freetype") "/lib"))
1991 ;; TODO
1992 #:phases
1993 (modify-phases %standard-phases
1994 (add-after 'patch-source-shebangs 'fix-java-shebangs
1995 (lambda _
1996 ;; This file was "fixed" by patch-source-shebangs, but it requires
1997 ;; this exact first line.
1998 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1999 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2000 #t))
2001 (replace 'build
2002 (lambda _
2003 (with-output-to-file ".src-rev"
2004 (lambda _
2005 (display ,version)))
2006 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
2007 (invoke "make" "all")
2008 #t))
2009 ;; jdk 11 does not build jre by default any more
2010 ;; building it anyways
2011 ;; for further information see:
2012 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2013 (add-after 'build 'build-jre
2014 (lambda _
2015 (invoke "make" "legacy-jre-image")
2016 #t))
2017 (replace 'install
2018 (lambda* (#:key outputs #:allow-other-keys)
2019 (let ((out (assoc-ref outputs "out"))
2020 (jdk (assoc-ref outputs "jdk"))
2021 (doc (assoc-ref outputs "doc"))
2022 (images (car (find-files "build" ".*-server-release"
2023 #:directories? #t))))
2024 (copy-recursively (string-append images "/images/jdk") jdk)
2025 (copy-recursively (string-append images "/images/jre") out)
2026 (copy-recursively (string-append images "/images/docs") doc))
2027 #t))
2028 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2029 ;; But that shared object is located in the server/ folder, so it
2030 ;; cannot be found. This phase creates a symbolic link in the
2031 ;; lib/ folder so that the other libraries can find it.
2032 ;;
2033 ;; See:
2034 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2035 ;;
2036 ;; FIXME: Find the bug in the build system, so that this symlink is
2037 ;; not needed.
2038 (add-after 'install 'install-libjvm
2039 (lambda* (#:key inputs outputs #:allow-other-keys)
2040 (let* ((lib-out (string-append (assoc-ref outputs "out")
2041 "/lib"))
2042 (lib-jdk (string-append (assoc-ref outputs "jdk")
2043 "/lib")))
2044 (symlink (string-append lib-jdk "/server/libjvm.so")
2045 (string-append lib-jdk "/libjvm.so"))
2046 (symlink (string-append lib-out "/server/libjvm.so")
2047 (string-append lib-out "/libjvm.so")))
2048 #t))
2049 (add-after 'install 'strip-character-data-timestamps
2050 (lambda* (#:key outputs #:allow-other-keys)
2051 (use-modules (guix build syscalls))
2052 (let ((archive (string-append
2053 (assoc-ref outputs "jdk") "/lib/src.zip"))
2054 (dir (mkdtemp! "zip-contents.XXXXXX")))
2055 (with-directory-excursion dir
2056 (invoke "unzip" archive))
2057 (delete-file archive)
2058 (with-directory-excursion dir
2059 (let ((char-data-files (find-files "." "CharacterData.*")))
2060 (for-each (lambda (file)
2061 (substitute* file
2062 (((string-append "This file was generated "
2063 "AUTOMATICALLY from a template "
2064 "file.*"))
2065 (string-append "This file was generated "
2066 "AUTOMATICALLY from a template "
2067 "file"))))
2068 char-data-files)))
2069 (with-directory-excursion dir
2070 (let ((files (find-files "." ".*" #:directories? #t)))
2071 (apply invoke "zip" "-0" "-X" archive files))))))
2072 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2073 (lambda* (#:key outputs #:allow-other-keys)
2074 (use-modules (guix build syscalls)
2075 (ice-9 binary-ports)
2076 (rnrs bytevectors))
2077 (letrec ((repack-archive
2078 (lambda (archive)
2079 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2080 (with-directory-excursion dir
2081 (invoke "unzip" archive))
2082 (delete-file archive)
2083 (for-each (compose repack-archive canonicalize-path)
2084 (find-files dir "(ct.sym|.*.jar)$"))
2085 (let ((reset-file-timestamp
2086 (lambda (file)
2087 (let ((s (lstat file)))
2088 (unless (eq? (stat:type s) 'symlink)
2089 (format #t "reset ~a~%" file)
2090 (utime file 0 0 0 0))))))
2091 (for-each reset-file-timestamp
2092 (find-files dir #:directories? #t)))
2093 (with-directory-excursion dir
2094 (let ((files (find-files "." ".*" #:directories? #t)))
2095 (apply invoke "zip" "-0" "-X" archive files)))))))
2096 (for-each repack-archive
2097 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2098 (for-each repack-archive
2099 (find-files (assoc-ref outputs "jdk")
2100 ".*.(zip|jar|diz)$"))
2101 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2102 (let ((repack-jmod
2103 (lambda (file-name)
2104 (call-with-input-file file-name
2105 (lambda (file)
2106 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2107 (if (equal? (get-bytevector-n
2108 file (bytevector-length header))
2109 header)
2110 (let* ((header-length (bytevector-length header))
2111 (temp-file (mkstemp!
2112 (string-copy
2113 "temp-file.XXXXXX")))
2114 (temp-filename (port-filename temp-file))
2115 (content-length
2116 (- (stat:size (stat file))
2117 header-length)))
2118 (sendfile temp-file file content-length header-length)
2119 (delete-file file-name)
2120 (close-port temp-file)
2121 (repack-archive (canonicalize-path temp-filename))
2122 (call-with-output-file file-name
2123 (lambda (file)
2124 (put-bytevector file header)
2125 (call-with-input-file temp-filename
2126 (lambda (temp-file)
2127 (sendfile
2128 file temp-file
2129 (stat:size (stat temp-file)) 0)))))))))))))
2130 (for-each repack-jmod
2131 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2132 #t)))
2133 (add-after 'install 'remove-timestamp-from-api-summary
2134 (lambda* (#:key outputs #:allow-other-keys)
2135 (substitute* (string-append (assoc-ref outputs "doc")
2136 "/api/overview-summary.html")
2137 (("Generated by javadoc \\(11-internal\\).*$")
2138 "Generated by javadoc (11-internal) -->\n"))
2139 #t)))))
2140 (inputs
2141 `(("alsa-lib" ,alsa-lib)
2142 ("cups" ,cups)
2143 ("fontconfig" ,fontconfig)
2144 ("freetype" ,freetype)
2145 ("giflib" ,giflib)
2146 ("lcms" ,lcms)
2147 ("libjpeg" ,libjpeg)
2148 ("libpng" ,libpng)
2149 ("libx11" ,libx11)
2150 ("libxext" ,libxext)
2151 ("libxrender" ,libxrender)
2152 ("libxt" ,libxt)
2153 ("libxtst" ,libxtst)))
2154 (native-inputs
2155 `(("autoconf" ,autoconf)
2156 ("openjdk10" ,openjdk10)
2157 ("openjdk10:jdk" ,openjdk10 "jdk")
2158 ("pkg-config" ,pkg-config)
2159 ("unzip" ,unzip)
2160 ("which" ,which)
2161 ("zip" ,zip)))
2162 (home-page "https://openjdk.java.net/projects/jdk/11/")
2163 (synopsis "Java development kit")
2164 (description
2165 "This package provides the Java development kit OpenJDK.")
2166 (license license:gpl2+)))
2167
2168 (define-public openjdk12
2169 (package
2170 (inherit openjdk11)
2171 (name "openjdk")
2172 (version "12.33")
2173 (source (origin
2174 (method url-fetch)
2175 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2176 (file-name (string-append name "-" version ".tar.bz2"))
2177 (sha256
2178 (base32
2179 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2180 (modules '((guix build utils)))
2181 (snippet
2182 `(begin
2183 (for-each delete-file (find-files "." ".*.bin$"))
2184 (for-each delete-file (find-files "." ".*.exe$"))
2185 (for-each delete-file (find-files "." ".*.jar$"))
2186 #t))))
2187 (inputs
2188 `(("alsa-lib" ,alsa-lib)
2189 ("cups" ,cups)
2190 ("fontconfig" ,fontconfig)
2191 ("freetype" ,freetype)
2192 ("giflib" ,giflib)
2193 ("lcms" ,lcms)
2194 ("libjpeg" ,libjpeg)
2195 ("libpng" ,libpng)
2196 ("libx11" ,libx11)
2197 ("libxext" ,libxext)
2198 ("libxrandr" ,libxrandr)
2199 ("libxrender" ,libxrender)
2200 ("libxt" ,libxt)
2201 ("libxtst" ,libxtst)))
2202 (native-inputs
2203 `(("autoconf" ,autoconf)
2204 ("openjdk11" ,openjdk11)
2205 ("openjdk11:jdk" ,openjdk11 "jdk")
2206 ("pkg-config" ,pkg-config)
2207 ("unzip" ,unzip)
2208 ("which" ,which)
2209 ("zip" ,zip)))
2210 (home-page "https://openjdk.java.net/projects/jdk/12")))
2211
2212 (define-public icedtea icedtea-8)
2213
2214 \f
2215 (define-public ant/java8
2216 (package (inherit ant-bootstrap)
2217 (name "ant")
2218 (version "1.10.1")
2219 (source (origin
2220 (method url-fetch)
2221 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2222 version "-src.tar.gz"))
2223 (sha256
2224 (base32
2225 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2226 (modules '((guix build utils)))
2227 (snippet
2228 '(begin
2229 (for-each delete-file
2230 (find-files "lib/optional" "\\.jar$"))
2231 #t))))
2232 (arguments
2233 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2234 ((#:phases phases)
2235 `(modify-phases ,phases
2236 (add-after 'unpack 'remove-scripts
2237 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2238 ;; wrappers.
2239 (lambda _
2240 (for-each delete-file
2241 (find-files "src/script"
2242 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2243 #t))
2244 (replace 'build
2245 (lambda* (#:key inputs outputs #:allow-other-keys)
2246 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2247
2248 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2249 ;; Ant to build. This is necessary in addition to disabling the
2250 ;; "check" phase, because the dependency on "test-jar" would always
2251 ;; result in the tests to be run.
2252 (substitute* "build.xml"
2253 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2254 (invoke "bash" "bootstrap.sh"
2255 (string-append "-Ddist.dir="
2256 (assoc-ref outputs "out")))))))))
2257 (native-inputs
2258 `(("jdk" ,icedtea-8 "jdk")
2259 ("zip" ,zip)
2260 ("unzip" ,unzip)))))
2261
2262 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2263 ;; requires Java 8.
2264 (define-public ant
2265 (package (inherit ant/java8)
2266 (version "1.9.9")
2267 (source (origin
2268 (method url-fetch)
2269 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2270 version "-src.tar.gz"))
2271 (sha256
2272 (base32
2273 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2274 (native-inputs
2275 `(("jdk" ,icedtea-7 "jdk")
2276 ("zip" ,zip)
2277 ("unzip" ,unzip)))))
2278
2279 (define-public ant-apache-bcel
2280 (package
2281 (inherit ant/java8)
2282 (name "ant-apache-bcel")
2283 (arguments
2284 (substitute-keyword-arguments (package-arguments ant/java8)
2285 ((#:phases phases)
2286 `(modify-phases ,phases
2287 (add-after 'unpack 'link-bcel
2288 (lambda* (#:key inputs #:allow-other-keys)
2289 (for-each (lambda (file)
2290 (symlink file
2291 (string-append "lib/optional/"
2292 (basename file))))
2293 (find-files (assoc-ref inputs "java-commons-bcel")
2294 "\\.jar$"))
2295 #t))
2296 (add-after 'build 'install
2297 (lambda* (#:key outputs #:allow-other-keys)
2298 (let* ((out (assoc-ref outputs "out"))
2299 (share (string-append out "/share/java"))
2300 (bin (string-append out "/bin"))
2301 (lib (string-append out "/lib")))
2302 (mkdir-p share)
2303 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2304 (delete-file-recursively bin)
2305 (delete-file-recursively lib)
2306 #t)))))))
2307 (inputs
2308 `(("java-commons-bcel" ,java-commons-bcel)
2309 ,@(package-inputs ant/java8)))))
2310
2311 (define-public ant-junit
2312 (package
2313 (inherit ant/java8)
2314 (name "ant-junit")
2315 (arguments
2316 (substitute-keyword-arguments (package-arguments ant/java8)
2317 ((#:phases phases)
2318 `(modify-phases ,phases
2319 (add-after 'unpack 'link-junit
2320 (lambda* (#:key inputs #:allow-other-keys)
2321 (for-each (lambda (file)
2322 (symlink file
2323 (string-append "lib/optional/"
2324 (basename file))))
2325 (find-files (assoc-ref inputs "java-junit")
2326 "\\.jar$"))
2327 #t))
2328 (add-after 'build 'install
2329 (lambda* (#:key outputs #:allow-other-keys)
2330 (let* ((out (assoc-ref outputs "out"))
2331 (share (string-append out "/share/java"))
2332 (bin (string-append out "/bin"))
2333 (lib (string-append out "/lib")))
2334 (mkdir-p share)
2335 (install-file (string-append lib "/ant-junit.jar") share)
2336 (delete-file-recursively bin)
2337 (delete-file-recursively lib)
2338 #t)))))))
2339 (inputs
2340 `(("java-junit" ,java-junit)
2341 ,@(package-inputs ant/java8)))))
2342
2343 (define-public java-openjfx-build
2344 (package
2345 (name "java-openjfx-build")
2346 ;; This is a java-8 version
2347 (version "8.202")
2348 (source (origin
2349 (method hg-fetch)
2350 (uri (hg-reference
2351 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2352 (changeset (string-append
2353 (string-join (string-split version #\.) "u")
2354 "-ga"))))
2355 (file-name (string-append name "-" version "-checkout"))
2356 (modules '((guix build utils)))
2357 (snippet
2358 '(begin
2359 ;; Delete included gradle jar
2360 (delete-file-recursively "gradle/wrapper")
2361 #t))
2362 (sha256
2363 (base32
2364 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2365 (build-system ant-build-system)
2366 (arguments
2367 `(#:jar-name "java-openjfx.jar"
2368 #:source-dir "buildSrc/src/main/java"
2369 #:test-dir "buildSrc/src/test"
2370 #:phases
2371 (modify-phases %standard-phases
2372 (add-before 'configure 'generate-jsl-parser
2373 (lambda _
2374 (invoke "antlr3" "-o"
2375 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2376 "buildSrc/src/main/antlr/JSL.g"))))))
2377 (inputs
2378 `(("antlr3" ,antlr3)
2379 ("java-stringtemplate" ,java-stringtemplate)))
2380 (native-inputs
2381 `(("java-junit" ,java-junit)
2382 ("java-hamcrest-core" ,java-hamcrest-core)))
2383 (home-page "https://openjfx.io")
2384 (synopsis "Graphical application toolkit in Java")
2385 (description "OpenJFX is a client application platform for desktop,
2386 mobile and embedded systems built on Java. Its goal is to produce a
2387 modern, efficient, and fully featured toolkit for developing rich client
2388 applications. This package contains base classes for the OpenJFX
2389 distribution and helper classes for building other parts of the
2390 distribution.")
2391 (license license:gpl2))) ;gpl2 only, with classpath exception
2392
2393 (define-public java-openjfx-base
2394 (package (inherit java-openjfx-build)
2395 (name "java-openjfx-base")
2396 (arguments
2397 `(#:jar-name "java-openjfx-base.jar"
2398 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2399 #:test-dir "modules/base/src/test"
2400 #:phases
2401 (modify-phases %standard-phases
2402 (add-before 'check 'remove-empty-file
2403 (lambda _
2404 (with-directory-excursion "modules/base/src/test/java"
2405 ;; These files are completely commented, but junit expects them to
2406 ;; contain a class, so tests fail.
2407 (delete-file
2408 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2409 (delete-file
2410 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2411 (delete-file "javafx/beans/property/PropertiesTest.java")
2412 (delete-file
2413 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2414 ;; This one fails
2415 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2416 #t)))))
2417 (propagated-inputs
2418 `(("java-openjfx-build" ,java-openjfx-build)))
2419 (description "OpenJFX is a client application platform for desktop,
2420 mobile and embedded systems built on Java. Its goal is to produce a
2421 modern, efficient, and fully featured toolkit for developing rich client
2422 applications. This package contains base classes for the OpenJFX
2423 distribution.")))
2424
2425 (define-public java-openjfx-graphics
2426 (package (inherit java-openjfx-build)
2427 (name "java-openjfx-graphics")
2428 (arguments
2429 `(#:jar-name "java-openjfx-graphics.jar"
2430 #:source-dir "modules/graphics/src/main/java"
2431 #:tests? #f; require X
2432 #:test-dir "modules/graphics/src/test"))
2433 (propagated-inputs
2434 `(("java-openjfx-base" ,java-openjfx-base)
2435 ("java-swt" ,java-swt)))
2436 (description "OpenJFX is a client application platform for desktop,
2437 mobile and embedded systems built on Java. Its goal is to produce a
2438 modern, efficient, and fully featured toolkit for developing rich client
2439 applications. This package contains graphics-related classes for the
2440 OpenJFX distribution.")))
2441
2442 (define-public java-openjfx-media
2443 (package (inherit java-openjfx-build)
2444 (name "java-openjfx-media")
2445 (propagated-inputs
2446 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2447 (arguments
2448 `(#:jar-name "java-openjfx-media.jar"
2449 #:source-dir "modules/media/src/main/java"
2450 #:tests? #f)); no tests
2451 (description "OpenJFX is a client application platform for desktop,
2452 mobile and embedded systems built on Java. Its goal is to produce a
2453 modern, efficient, and fully featured toolkit for developing rich client
2454 applications. This package contains media-related classes for the
2455 OpenJFX distribution.")))
2456
2457 (define-public javacc-4
2458 (package
2459 (name "javacc")
2460 (version "4.1")
2461 (source (origin
2462 (method git-fetch)
2463 (uri (git-reference
2464 (url "https://github.com/javacc/javacc.git")
2465 (commit "release_41")))
2466 (file-name (string-append "javacc-" version "-checkout"))
2467 (sha256
2468 (base32
2469 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2470 (modules '((guix build utils)))
2471 ;; delete bundled jars
2472 (snippet '(begin (delete-file-recursively "lib") #t))))
2473 (build-system ant-build-system)
2474 ;; Tests fail with
2475 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2476 ;; JAVACODE failed
2477 (arguments
2478 `(#:tests? #f
2479 #:phases
2480 (modify-phases %standard-phases
2481 ;; Delete tests to avoid build failure (we don't run them anyway).
2482 (add-after 'unpack 'delete-tests
2483 (lambda _
2484 (for-each delete-file
2485 '("src/org/javacc/JavaCCTestCase.java"
2486 "src/org/javacc/parser/ExpansionTest.java"
2487 "src/org/javacc/parser/OptionsTest.java"
2488 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2489 (for-each delete-file-recursively
2490 '("src/org/javacc/parser/test"
2491 "src/org/javacc/jjdoc/test"))
2492 #t))
2493 (replace 'install (install-jars "bin/lib")))))
2494 (home-page "https://javacc.org/")
2495 (synopsis "Java parser generator")
2496 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2497 generator for use with Java applications. A parser generator is a tool that
2498 reads a grammar specification and converts it to a Java program that can
2499 recognize matches to the grammar. In addition to the parser generator itself,
2500 JavaCC provides other standard capabilities related to parser generation such
2501 as tree building (via a tool called JJTree included with JavaCC), actions,
2502 debugging, etc.")
2503 (license license:bsd-3)))
2504
2505 (define-public javacc
2506 (package
2507 (inherit javacc-4)
2508 (version "7.0.4")
2509 (source
2510 (origin
2511 (method git-fetch)
2512 (uri (git-reference
2513 (url "https://github.com/javacc/javacc.git")
2514 (commit version)))
2515 (file-name (git-file-name "javacc" version))
2516 (sha256
2517 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2518 (modules '((guix build utils)))
2519 ;; Delete bundled jars.
2520 (snippet '(begin (for-each delete-file-recursively
2521 '("bootstrap" "lib"))
2522 #t))))
2523 (arguments
2524 `(#:make-flags ; bootstrap from javacc-4
2525 (list (string-append "-Dbootstrap-jar="
2526 (assoc-ref %build-inputs "javacc")
2527 "/share/java/javacc.jar"))
2528 #:test-target "test"
2529 #:phases
2530 (modify-phases %standard-phases
2531 (replace 'install (install-jars "target"))
2532 (add-after 'install 'install-bin
2533 (lambda* (#:key outputs inputs #:allow-other-keys)
2534 (let* ((out (assoc-ref outputs "out"))
2535 (dir (string-append out "/share/java"))
2536 (bin (string-append out "/bin"))
2537 (javacc (string-append bin "/javacc")))
2538 (mkdir-p bin)
2539 (with-output-to-file javacc
2540 (lambda _
2541 (display
2542 (string-append "#!/bin/sh\n"
2543 (assoc-ref inputs "jdk") "/bin/java"
2544 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2545 (chmod javacc #o755)
2546 ;; symlink to different names to affect the first argument and
2547 ;; change the behavior of the jar file.
2548 (symlink javacc (string-append bin "/jjdoc"))
2549 (symlink javacc (string-append bin "/jjtree"))
2550 #t))))))
2551
2552 (native-inputs
2553 `(("javacc" ,javacc-4)))))
2554
2555 ;; This is the last 3.x release of ECJ
2556 (define-public java-ecj-3
2557 (package
2558 (name "java-ecj")
2559 (version "3.8.2")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (string-append "http://archive.eclipse.org/eclipse/"
2563 "downloads/drops/R-" version
2564 "-201301310800/ecjsrc-" version ".jar"))
2565 (sha256
2566 (base32
2567 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2568 (build-system ant-build-system)
2569 (arguments
2570 `(#:tests? #f ; none included
2571 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2572 #:make-flags (list "-f" "src/build.xml")
2573 #:build-target "build"
2574 #:phases
2575 (modify-phases %standard-phases
2576 (add-after 'unpack 'fix-manifest
2577 (lambda _
2578 ;; Record the main class to make ecj executable.
2579 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2580 (lambda (in out)
2581 (display "Manifest-Version: 1.0
2582 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2583 out)))
2584 #t))
2585 (replace 'install (install-jars ".")))))
2586 (home-page "https://eclipse.org")
2587 (synopsis "Eclipse Java development tools core batch compiler")
2588 (description "This package provides the Eclipse Java core batch compiler.")
2589 (license license:epl1.0)))
2590
2591 ;; This is needed for java-cisd-args4j
2592 (define-public java-ecj-3.5
2593 (package (inherit java-ecj-3)
2594 (version "3.5.1")
2595 (source (origin
2596 (method url-fetch/zipbomb)
2597 (uri (string-append "http://archive.eclipse.org/eclipse/"
2598 "downloads/drops/R-" version
2599 "-200909170800/ecjsrc-" version ".zip"))
2600 (sha256
2601 (base32
2602 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2603 (build-system ant-build-system)
2604 (arguments
2605 `(#:tests? #f ; none included
2606 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2607 #:build-target "build"
2608 #:phases
2609 (modify-phases %standard-phases
2610 (add-after 'unpack 'fix-manifest
2611 (lambda _
2612 ;; Record the main class to make ecj executable.
2613 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2614 (lambda (in out)
2615 (dump-port in out)
2616 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2617 out)))
2618 #t))
2619 (replace 'install (install-jars ".")))))
2620 (native-inputs
2621 `(("unzip" ,unzip)))))
2622
2623 (define-public java-ecj
2624 (package (inherit java-ecj-3)
2625 (version "4.6.3")
2626 (source
2627 (origin
2628 (method url-fetch)
2629 (uri (string-append
2630 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2631 version
2632 "-201703010400/ecjsrc-"
2633 version
2634 ".jar"))
2635 (sha256
2636 (base32
2637 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2638 (arguments
2639 `(#:tests? #f ; none included
2640 #:build-target "build"
2641 #:phases
2642 (modify-phases %standard-phases
2643 (add-after 'unpack 'fix-build.xml
2644 (lambda _
2645 (substitute* "src/build.xml"
2646 (("^.*MANIFEST.*$")
2647 ""))
2648 #t))
2649 (add-after 'unpack 'fix-prop
2650 (lambda _
2651 (substitute* "src/build.xml"
2652 (("^.*properties.*$")
2653 "<include name=\"**/*.properties\"/>
2654 <include name=\"**/*.props\"/>"))
2655 #t))
2656 (add-before 'build 'chdir
2657 (lambda _
2658 (chdir "src")
2659 #t))
2660 (replace 'install (install-jars ".")))))))
2661
2662 (define-public java-cisd-base
2663 (let ((revision 38938)
2664 (base-version "14.12.0"))
2665 (package
2666 (name "java-cisd-base")
2667 (version (string-append base-version "-" (number->string revision)))
2668 (source (origin
2669 (method svn-fetch)
2670 (uri (svn-reference
2671 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2672 "base/tags/release/"
2673 (version-major+minor base-version)
2674 ".x/" base-version "/base/"))
2675 (revision revision)))
2676 (file-name (string-append "java-cisd-base-" version "-checkout"))
2677 (sha256
2678 (base32
2679 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2680 (modules '((guix build utils)))
2681 (snippet
2682 '(begin
2683 ;; Delete included gradle jar
2684 (delete-file-recursively "gradle/wrapper")
2685 ;; Delete pre-built native libraries
2686 (delete-file-recursively "libs")
2687 #t))))
2688 (build-system ant-build-system)
2689 (arguments
2690 `(#:make-flags '("-file" "build/build.xml")
2691 #:test-target "jar-test"
2692 #:jdk ,icedtea-8
2693 #:phases
2694 (modify-phases %standard-phases
2695 (add-after 'unpack 'unpack-build-resources
2696 (lambda* (#:key inputs #:allow-other-keys)
2697 (copy-recursively (assoc-ref inputs "build-resources")
2698 "../build_resources")
2699 #t))
2700 (add-after 'unpack-build-resources 'fix-dependencies
2701 (lambda* (#:key inputs #:allow-other-keys)
2702 (substitute* "build/build.xml"
2703 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2704 (string-append (assoc-ref inputs "java-testng")
2705 "/share/java/java-testng.jar"))
2706 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2707 (string-append (assoc-ref inputs "java-commons-lang")
2708 "/share/java/commons-lang-"
2709 ,(package-version java-commons-lang) ".jar"))
2710 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2711 (string-append (assoc-ref inputs "java-commons-io")
2712 "/share/java/commons-io-"
2713 ,(package-version java-commons-io)
2714 "-SNAPSHOT.jar"))
2715 ;; Remove dependency on svn
2716 (("<build-info.*") "")
2717 (("\\$\\{revision.number\\}")
2718 ,(number->string revision))
2719 (("\\$\\{version.number\\}") ,base-version))
2720 ;; Remove dependency on classycle
2721 (substitute* "../build_resources/ant/build-common.xml"
2722 (("<taskdef name=\"dependency-checker.*") "")
2723 (("classname=\"classycle.*") "")
2724 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2725 #t))
2726 ;; A few tests fail because of the lack of a proper /etc/groups and
2727 ;; /etc/passwd file in the build container.
2728 (add-after 'unpack 'disable-broken-tests
2729 (lambda _
2730 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2731 (("Unix.isOperational\\(\\)") "false"))
2732 #t))
2733 ;; These decorators are almost useless and pull in an unpackaged
2734 ;; dependency.
2735 (add-after 'unpack 'remove-useless-decorators
2736 (lambda _
2737 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2738 (("@Private") "")
2739 (("import ch.rinn.restrictions.Private;") ""))
2740 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2741 (("@Friend.*") "")
2742 (("import ch.rinn.restrictions.Friend;") ""))
2743 #t))
2744 (add-before 'configure 'build-native-code
2745 (lambda* (#:key inputs #:allow-other-keys)
2746 (let ((jdk (assoc-ref inputs "jdk"))
2747 (dir ,(match (%current-system)
2748 ("i686-linux"
2749 "i386-Linux")
2750 ((or "armhf-linux" "aarch64-linux")
2751 "arm-Linux")
2752 ((or "x86_64-linux")
2753 "amd64-Linux")
2754 (_ "unknown-Linux"))))
2755 (with-directory-excursion "source/c"
2756 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2757 (string-append "-I" jdk "/include")
2758 (string-append "-I" jdk "/include/linux")
2759 "-o" "libunix.so")
2760 (invoke "gcc" "-shared" "-O3" "-fPIC"
2761 "-DMACHINE_BYTE_ORDER=1"
2762 "copyCommon.c"
2763 "copyByteChar.c"
2764 "copyByteDouble.c"
2765 "copyByteFloat.c"
2766 "copyByteInt.c"
2767 "copyByteLong.c"
2768 "copyByteShort.c"
2769 (string-append "-I" jdk "/include")
2770 (string-append "-I" jdk "/include/linux")
2771 "-o" "libnativedata.so"))
2772 (install-file "source/c/libunix.so"
2773 (string-append "libs/native/unix/" dir))
2774 (install-file "source/c/libnativedata.so"
2775 (string-append "libs/native/nativedata/" dir))
2776 #t)))
2777 ;; In the "check" phase we only build the test executable.
2778 (add-after 'check 'run-tests
2779 (lambda _
2780 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2781 (delete-file "targets/dist/sis-base-test.jar")
2782 #t))
2783 (replace 'install (install-jars "targets/dist")))))
2784 (native-inputs
2785 `(("jdk" ,icedtea-8)
2786 ("java-commons-lang" ,java-commons-lang)
2787 ("java-commons-io" ,java-commons-io)
2788 ("java-testng" ,java-testng)
2789 ("build-resources"
2790 ,(origin
2791 (method svn-fetch)
2792 (uri (svn-reference
2793 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2794 "base/tags/release/"
2795 (version-major+minor base-version)
2796 ".x/" base-version
2797 "/build_resources/"))
2798 (revision revision)))
2799 (sha256
2800 (base32
2801 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2802 (home-page "http://svnsis.ethz.ch")
2803 (synopsis "Utility classes for libraries from ETH Zurich")
2804 (description "This library supplies some utility classes needed for
2805 libraries from the SIS division at ETH Zurich like jHDF5.")
2806 ;; The C sources are under a non-copyleft license, which looks like a
2807 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2808 (license (list license:asl2.0
2809 (license:non-copyleft "file://source/c/COPYING"))))))
2810
2811 (define-public java-cisd-args4j
2812 (let ((revision 39162)
2813 (base-version "9.11.2"))
2814 (package
2815 (name "java-cisd-args4j")
2816 (version (string-append base-version "-" (number->string revision)))
2817 (source (origin
2818 (method svn-fetch)
2819 (uri (svn-reference
2820 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2821 "args4j/tags/release/"
2822 (version-major+minor base-version)
2823 ".x/" base-version "/args4j/"))
2824 (revision revision)))
2825 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2826 (sha256
2827 (base32
2828 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2829 (build-system ant-build-system)
2830 (arguments
2831 `(#:make-flags '("-file" "build/build.xml")
2832 #:tests? #f ; there are no tests
2833 ;; There are weird build failures with JDK8, such as: "The type
2834 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2835 ;; referenced from required .class files"
2836 #:jdk ,icedtea-7
2837 #:modules ((guix build ant-build-system)
2838 (guix build utils)
2839 (guix build java-utils)
2840 (sxml simple)
2841 (sxml transform)
2842 (sxml xpath))
2843 #:phases
2844 (modify-phases %standard-phases
2845 (add-after 'unpack 'unpack-build-resources
2846 (lambda* (#:key inputs #:allow-other-keys)
2847 (mkdir-p "../build_resources")
2848 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2849 "-C" "../build_resources"
2850 "--strip-components=1")
2851 (mkdir-p "../build_resources/lib")
2852 #t))
2853 (add-after 'unpack-build-resources 'fix-dependencies
2854 (lambda* (#:key inputs #:allow-other-keys)
2855 ;; FIXME: There should be a more convenient abstraction for
2856 ;; editing XML files.
2857 (with-directory-excursion "../build_resources/ant/"
2858 (chmod "build-common.xml" #o664)
2859 (call-with-output-file "build-common.xml.new"
2860 (lambda (port)
2861 (sxml->xml
2862 (pre-post-order
2863 (with-input-from-file "build-common.xml"
2864 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2865 `(;; Remove dependency on classycle and custom ant tasks
2866 (taskdef . ,(lambda (tag . kids)
2867 (let ((name ((sxpath '(name *text*)) kids)))
2868 (if (or (member "build-info" name)
2869 (member "dependency-checker" name)
2870 (member "build-java-subprojects" name)
2871 (member "project-classpath" name))
2872 '() ; skip
2873 `(,tag ,@kids)))))
2874 (typedef . ,(lambda (tag . kids)
2875 (let ((name ((sxpath '(name *text*)) kids)))
2876 (if (member "recursive-jar" name)
2877 '() ; skip
2878 `(,tag ,@kids)))))
2879 (build-java-subprojects . ,(lambda _ '()))
2880 ;; Ignore everything else
2881 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2882 (*text* . ,(lambda (_ txt) txt))))
2883 port)))
2884 (rename-file "build-common.xml.new" "build-common.xml"))
2885 (substitute* "build/build.xml"
2886 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2887 (string-append (assoc-ref inputs "java-cisd-base")
2888 "/share/java/sis-base.jar"))
2889 ;; Remove dependency on svn
2890 (("<build-info.*") "")
2891 (("\\$\\{revision.number\\}")
2892 ,(number->string revision))
2893 (("\\$\\{version.number\\}") ,base-version)
2894 ;; Don't use custom ant tasks.
2895 (("recursive-jar") "jar")
2896 (("<project-classpath.*") ""))
2897 #t))
2898 (replace 'install (install-jars "targets/dist")))))
2899 (inputs
2900 `(("java-cisd-base" ,java-cisd-base)))
2901 (native-inputs
2902 `(("ecj" ,java-ecj-3.5)
2903 ("build-resources"
2904 ,(origin
2905 (method svn-fetch)
2906 (uri (svn-reference
2907 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2908 "args4j/tags/release/"
2909 (version-major+minor base-version)
2910 ".x/" base-version
2911 "/build_resources/"))
2912 (revision revision)))
2913 (sha256
2914 (base32
2915 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2916 (modules '((guix build utils)))
2917 ;; Delete bundled pre-built jars.
2918 (snippet
2919 '(begin (delete-file-recursively "lib/") #t))))))
2920 (home-page "http://svnsis.ethz.ch")
2921 (synopsis "Command line parser library")
2922 (description "This package provides a parser for command line arguments.")
2923 (license license:asl2.0))))
2924
2925 (define-public java-cisd-jhdf5
2926 (let ((revision 39162)
2927 (base-version "14.12.6"))
2928 (package
2929 (name "java-cisd-jhdf5")
2930 (version (string-append base-version "-" (number->string revision)))
2931 (source (origin
2932 (method svn-fetch)
2933 (uri (svn-reference
2934 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2935 "jhdf5/tags/release/"
2936 (version-major+minor base-version)
2937 ".x/" base-version "/jhdf5/"))
2938 (revision revision)))
2939 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2940 (sha256
2941 (base32
2942 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2943 (modules '((guix build utils)))
2944 (snippet
2945 '(begin
2946 ;; Delete included gradle jar
2947 (delete-file-recursively "gradle/wrapper")
2948 ;; Delete pre-built native libraries
2949 (delete-file-recursively "libs")
2950 #t))))
2951 (build-system ant-build-system)
2952 (arguments
2953 `(#:make-flags '("-file" "build/build.xml")
2954 #:build-target "jar-all"
2955 #:test-target "jar-test"
2956 #:jdk ,icedtea-8
2957 #:phases
2958 (modify-phases %standard-phases
2959 ;; FIXME: this build phase fails.
2960 (delete 'generate-jar-indices)
2961 ;; Don't erase results from the build phase when building tests.
2962 (add-after 'unpack 'separate-test-target-from-clean
2963 (lambda _
2964 (substitute* "build/build.xml"
2965 (("\"jar-test\" depends=\"clean, ")
2966 "\"jar-test\" depends=\""))
2967 #t))
2968 (add-after 'unpack 'unpack-build-resources
2969 (lambda* (#:key inputs #:allow-other-keys)
2970 (copy-recursively (assoc-ref inputs "build-resources")
2971 "../build_resources")
2972 (delete-file-recursively "../build_resources/lib/")
2973 (mkdir-p "../build_resources/lib")
2974 ;; Remove dependency on classycle
2975 (substitute* "../build_resources/ant/build-common.xml"
2976 (("<taskdef name=\"dependency-checker.*") "")
2977 (("classname=\"classycle.*") "")
2978 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2979 ;; Remove dependency on svn
2980 (substitute* "build/build.xml"
2981 (("<build-info.*") "")
2982 (("\\$\\{revision.number\\}")
2983 ,(number->string revision))
2984 (("\\$\\{version.number\\}") ,base-version))
2985 #t))
2986 (add-after 'unpack-build-resources 'fix-dependencies
2987 (lambda* (#:key inputs #:allow-other-keys)
2988 (substitute* "../build_resources/ant/build-common.xml"
2989 (("../libraries/testng/testng-jdk15.jar")
2990 (string-append (assoc-ref inputs "java-testng")
2991 "/share/java/java-testng.jar")))
2992 (substitute* "build/build.xml"
2993 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2994 (string-append (assoc-ref inputs "java-cisd-base")
2995 "/share/java/sis-base.jar"))
2996 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2997 (string-append (assoc-ref inputs "java-cisd-args4j")
2998 "/share/java/cisd-args4j.jar"))
2999 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3000 (string-append (assoc-ref inputs "java-commons-lang")
3001 "/share/java/commons-lang-"
3002 ,(package-version java-commons-lang) ".jar"))
3003 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3004 (string-append (assoc-ref inputs "java-commons-io")
3005 "/share/java/commons-io-"
3006 ,(package-version java-commons-io)
3007 "-SNAPSHOT.jar"))
3008 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3009 (string-append (assoc-ref inputs "java-testng")
3010 "/share/java/java-testng.jar"))
3011 (("\\$\\{lib\\}/junit4/junit.jar")
3012 (string-append (assoc-ref inputs "java-junit")
3013 "/share/java/junit.jar"))
3014 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3015 (string-append (assoc-ref inputs "java-hamcrest-core")
3016 "/share/java/hamcrest-core.jar")))
3017 ;; Remove dependency on ch.rinn.restrictions
3018 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3019 (substitute* '("BitSetConversionUtils.java"
3020 "HDF5Utils.java")
3021 (("import ch.rinn.restrictions.Private;") "")
3022 (("@Private") "")))
3023 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3024 (substitute* '("BitSetConversionTest.java"
3025 "h5ar/HDF5ArchiverTest.java")
3026 (("import ch.rinn.restrictions.Friend;") "")
3027 (("@Friend.*") ""))
3028 ;; Remove leftovers from removing @Friend
3029 (substitute* "h5ar/HDF5ArchiverTest.java"
3030 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3031 "")))
3032 #t))
3033 (add-before 'configure 'build-native-library
3034 (lambda* (#:key inputs #:allow-other-keys)
3035 (let ((jdk (assoc-ref inputs "jdk"))
3036 (hdf5 (assoc-ref inputs "hdf5"))
3037 (dir ,(match (%current-system)
3038 ("i686-linux"
3039 "i386-Linux")
3040 ((or "armhf-linux" "aarch64-linux")
3041 "arm-Linux")
3042 ((or "x86_64-linux")
3043 "amd64-Linux")
3044 (_ "unknown-Linux"))))
3045 (with-directory-excursion "source/c"
3046 (apply invoke `("gcc" "-shared" "-O3"
3047 "-fPIC"
3048 "-Wl,--exclude-libs,ALL"
3049 ,@(find-files "jhdf5" "\\.c$")
3050 ,@(find-files "hdf-java" "\\.c$")
3051 ,(string-append "-I" hdf5 "/include")
3052 ,(string-append "-I" jdk "/include")
3053 ,(string-append "-I" jdk "/include/linux")
3054 ,(string-append hdf5 "/lib/libhdf5.a")
3055 "-o" "libjhdf5.so" "-lz")))
3056 (install-file "source/c/libjhdf5.so"
3057 (string-append "libs/native/jhdf5/" dir))
3058 #t)))
3059 ;; In the "check" phase we only build the test executable.
3060 (add-after 'check 'run-tests
3061 (lambda _
3062 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3063 (delete-file "targets/dist/sis-jhdf5-test.jar")
3064 #t))
3065 (replace 'install
3066 (install-jars "targets/dist")))))
3067 (inputs
3068 `(("java-cisd-base" ,java-cisd-base)
3069 ("java-cisd-args4j" ,java-cisd-args4j)
3070 ("java-commons-lang" ,java-commons-lang)
3071 ("java-commons-io" ,java-commons-io)
3072 ("hdf5" ,hdf5)
3073 ("zlib" ,zlib)))
3074 (native-inputs
3075 `(("jdk" ,icedtea-8)
3076 ("java-testng" ,java-testng)
3077 ("java-junit" ,java-junit)
3078 ("java-jmock" ,java-jmock)
3079 ("java-hamcrest-core" ,java-hamcrest-core)
3080 ("build-resources"
3081 ,(origin
3082 (method svn-fetch)
3083 (uri (svn-reference
3084 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3085 "jhdf5/tags/release/"
3086 (version-major+minor base-version)
3087 ".x/" base-version
3088 "/build_resources/"))
3089 (revision revision)))
3090 (sha256
3091 (base32
3092 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3093 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3094 (synopsis "Java binding for HDF5")
3095 (description "JHDF5 is a high-level API in Java for reading and writing
3096 HDF5 files, building on the libraries provided by the HDF Group.")
3097 ;; The C sources are under a non-copyleft license, which looks like a
3098 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3099 (license (list license:asl2.0
3100 (license:non-copyleft "file://source/c/COPYING"))))))
3101
3102 (define-public java-classpathx-servletapi
3103 (package
3104 (name "java-classpathx-servletapi")
3105 (version "3.0.1")
3106 (source (origin
3107 (method url-fetch)
3108 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3109 "servletapi-" version ".tar.gz"))
3110 (sha256
3111 (base32
3112 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3113 (build-system ant-build-system)
3114 (arguments
3115 `(#:tests? #f ; there is no test target
3116 #:build-target "compile"
3117 #:make-flags
3118 (list "-Dbuild.compiler=javac1.8"
3119 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3120 #:phases
3121 (modify-phases %standard-phases
3122 (replace 'install
3123 (lambda* (#:key make-flags #:allow-other-keys)
3124 (apply invoke `("ant" "dist" ,@make-flags)))))))
3125 (home-page "https://www.gnu.org/software/classpathx/")
3126 (synopsis "Java servlet API implementation")
3127 (description "This is the GNU servlet API distribution, part of the
3128 ClasspathX project. It provides implementations of version 3.0 of the servlet
3129 API and version 2.1 of the Java ServerPages API.")
3130 (license license:gpl3+)))
3131
3132 (define-public java-javaee-servletapi
3133 (package
3134 (name "java-javaee-servletapi")
3135 (version "3.1.0")
3136 (source (origin
3137 (method git-fetch)
3138 (uri (git-reference
3139 (url "https://github.com/javaee/servlet-spec.git")
3140 (commit version)))
3141 (file-name (git-file-name name version))
3142 (sha256
3143 (base32
3144 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3145 (build-system ant-build-system)
3146 (arguments
3147 `(#:jar-name "javax-servletapi.jar"
3148 ;; no tests
3149 #:tests? #f
3150 #:source-dir "src/main/java"
3151 #:phases
3152 (modify-phases %standard-phases
3153 (add-before 'build 'copy-resources
3154 (lambda _
3155 (mkdir-p "build/classes/javax/servlet/http")
3156 (let ((from-prefix "src/main/java/javax/servlet/")
3157 (to-prefix "build/classes/javax/servlet/"))
3158 (for-each (lambda (f)
3159 (copy-file (string-append from-prefix f)
3160 (string-append to-prefix f)))
3161 (list "LocalStrings_ja.properties"
3162 "LocalStrings.properties"
3163 "LocalStrings_fr.properties"
3164 "http/LocalStrings_es.properties"
3165 "http/LocalStrings_ja.properties"
3166 "http/LocalStrings.properties"
3167 "http/LocalStrings_fr.properties")))
3168 #t)))))
3169 (native-inputs
3170 `(("unzip" ,unzip)))
3171 (home-page "https://javaee.github.io/servlet-spec/")
3172 (synopsis "Java servlet API")
3173 (description "Java Servlet is the foundation web specification in the
3174 Java Enterprise Platform. Developers can build web applications using the
3175 Servlet API to interact with the request/response workflow. This project
3176 provides information on the continued development of the Java Servlet
3177 specification.")
3178 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3179 ;; Some files are licensed under ASL 2.0.
3180 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3181
3182 (define-public java-swt
3183 (package
3184 (name "java-swt")
3185 (version "4.7.1a")
3186 (source
3187 ;; The types of many variables and procedures differ in the sources
3188 ;; dependent on whether the target architecture is a 32-bit system or a
3189 ;; 64-bit system. Instead of patching the sources on demand in a build
3190 ;; phase we download either the 32-bit archive (which mostly uses "int"
3191 ;; types) or the 64-bit archive (which mostly uses "long" types).
3192 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3193 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3194 (file32 "x86")
3195 (file64 "x86_64"))
3196 (let-values (((hash file)
3197 (match (or (%current-target-system) (%current-system))
3198 ("x86_64-linux" (values hash64 file64))
3199 (_ (values hash32 file32)))))
3200 (origin
3201 (method url-fetch)
3202 (uri (string-append
3203 "http://download.eclipse.org/eclipse/downloads/drops4/"
3204 "R-" version "-201710090410/swt-" version
3205 "-gtk-linux-" file ".zip"))
3206 (sha256 (base32 hash))))))
3207 (build-system ant-build-system)
3208 (arguments
3209 `(#:jar-name "swt.jar"
3210 #:jdk ,icedtea-8
3211 #:tests? #f ; no "check" target
3212 #:phases
3213 (modify-phases %standard-phases
3214 (replace 'unpack
3215 (lambda* (#:key source #:allow-other-keys)
3216 (mkdir "swt")
3217 (invoke "unzip" source "-d" "swt")
3218 (chdir "swt")
3219 (mkdir "src")
3220 (invoke "unzip" "src.zip" "-d" "src")))
3221 ;; The classpath contains invalid icecat jars. Since we don't need
3222 ;; anything other than the JDK on the classpath, we can simply unset
3223 ;; it.
3224 (add-after 'configure 'unset-classpath
3225 (lambda _ (unsetenv "CLASSPATH") #t))
3226 (add-before 'build 'build-native
3227 (lambda* (#:key inputs outputs #:allow-other-keys)
3228 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3229 ;; Build shared libraries. Users of SWT have to set the system
3230 ;; property swt.library.path to the "lib" directory of this
3231 ;; package output.
3232 (mkdir-p lib)
3233 (setenv "OUTPUT_DIR" lib)
3234 (with-directory-excursion "src"
3235 (invoke "bash" "build.sh")))))
3236 (add-after 'install 'install-native
3237 (lambda* (#:key outputs #:allow-other-keys)
3238 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3239 (for-each (lambda (file)
3240 (install-file file lib))
3241 (find-files "." "\\.so$"))
3242 #t))))))
3243 (inputs
3244 `(("gtk" ,gtk+-2)
3245 ("libxtst" ,libxtst)
3246 ("libxt" ,libxt)
3247 ("mesa" ,mesa)
3248 ("glu" ,glu)))
3249 (native-inputs
3250 `(("pkg-config" ,pkg-config)
3251 ("unzip" ,unzip)))
3252 (home-page "https://www.eclipse.org/swt/")
3253 (synopsis "Widget toolkit for Java")
3254 (description
3255 "SWT is a widget toolkit for Java designed to provide efficient, portable
3256 access to the user-interface facilities of the operating systems on which it
3257 is implemented.")
3258 ;; SWT code is licensed under EPL1.0
3259 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3260 ;; Cairo bindings contain code under MPL1.1
3261 ;; XULRunner 1.9 bindings contain code under MPL2.0
3262 (license (list
3263 license:epl1.0
3264 license:mpl1.1
3265 license:mpl2.0
3266 license:lgpl2.1+))))
3267
3268 (define-public java-xz
3269 (package
3270 (name "java-xz")
3271 (version "1.6")
3272 (source (origin
3273 (method url-fetch)
3274 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3275 (sha256
3276 (base32
3277 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3278 (build-system ant-build-system)
3279 (arguments
3280 `(#:tests? #f ; There are no tests to run.
3281 #:jar-name ,(string-append "xz-" version ".jar")
3282 #:phases
3283 (modify-phases %standard-phases
3284 ;; The unpack phase enters the "maven" directory by accident.
3285 (add-after 'unpack 'chdir
3286 (lambda _ (chdir "..") #t)))))
3287 (native-inputs
3288 `(("unzip" ,unzip)))
3289 (home-page "https://tukaani.org/xz/java.html")
3290 (synopsis "Implementation of XZ data compression in pure Java")
3291 (description "This library aims to be a complete implementation of XZ data
3292 compression in pure Java. Single-threaded streamed compression and
3293 decompression and random access decompression have been fully implemented.")
3294 (license license:public-domain)))
3295
3296 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3297 ;; of the latest release.
3298 (define-public java-qdox-1.12
3299 (package
3300 (name "java-qdox")
3301 (version "1.12.1")
3302 (source (origin
3303 (method url-fetch)
3304 (uri (string-append "https://repo1.maven.org/maven2/"
3305 "com/thoughtworks/qdox/qdox/" version
3306 "/qdox-" version "-sources.jar"))
3307 (sha256
3308 (base32
3309 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3310 (build-system ant-build-system)
3311 (arguments
3312 `(;; Tests require junit
3313 #:tests? #f
3314 #:jar-name "qdox.jar"
3315 #:phases
3316 (modify-phases %standard-phases
3317 (replace 'unpack
3318 (lambda* (#:key source #:allow-other-keys)
3319 (mkdir "src")
3320 (with-directory-excursion "src"
3321 (invoke "jar" "-xf" source))))
3322 ;; At this point we don't have junit, so we must remove the API
3323 ;; tests.
3324 (add-after 'unpack 'delete-tests
3325 (lambda _
3326 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3327 #t)))))
3328 (home-page "https://github.com/codehaus/qdox")
3329 (synopsis "Parse definitions from Java source files")
3330 (description
3331 "QDox is a high speed, small footprint parser for extracting
3332 class/interface/method definitions from source files complete with JavaDoc
3333 @code{@@tags}. It is designed to be used by active code generators or
3334 documentation tools.")
3335 (license license:asl2.0)))
3336
3337 (define-public java-qdox
3338 (package
3339 (name "java-qdox")
3340 ; Newer version exists, but this version is required by java-plexus-component-metadata
3341 (version "2.0-M2")
3342 (source (origin
3343 (method url-fetch)
3344 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3345 ;; Older releases at https://github.com/codehaus/qdox/
3346 ;; Note: The release at maven is pre-generated. The release at
3347 ;; github requires jflex.
3348 (uri (string-append "https://repo1.maven.org/maven2/"
3349 "com/thoughtworks/qdox/qdox/" version
3350 "/qdox-" version "-sources.jar"))
3351 (sha256
3352 (base32
3353 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3354 (build-system ant-build-system)
3355 (arguments
3356 `(#:jar-name "qdox.jar"
3357 #:tests? #f)); no tests
3358 (home-page "https://github.com/codehaus/qdox")
3359 (synopsis "Parse definitions from Java source files")
3360 (description "QDox is a high speed, small footprint parser for extracting
3361 class/interface/method definitions from source files complete with JavaDoc
3362 @code{@@tags}. It is designed to be used by active code generators or
3363 documentation tools.")
3364 (license license:asl2.0)))
3365
3366 (define-public java-jarjar
3367 (package
3368 (name "java-jarjar")
3369 (version "1.4")
3370 (source (origin
3371 (method url-fetch)
3372 (uri (string-append
3373 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3374 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3375 (sha256
3376 (base32
3377 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3378 (modules '((guix build utils)))
3379 (snippet
3380 '(begin
3381 ;; Delete bundled thirds-party jar archives.
3382 ;; TODO: unbundle maven-plugin-api.
3383 (delete-file "lib/asm-4.0.jar")
3384 (delete-file "lib/asm-commons-4.0.jar")
3385 (delete-file "lib/junit-4.8.1.jar")
3386 #t))))
3387 (build-system ant-build-system)
3388 (arguments
3389 `(;; Tests require junit, which ultimately depends on this package.
3390 #:tests? #f
3391 #:build-target "jar"
3392 #:phases
3393 (modify-phases %standard-phases
3394 (add-before 'build 'do-not-use-bundled-asm
3395 (lambda* (#:key inputs #:allow-other-keys)
3396 (substitute* "build.xml"
3397 (("<path id=\"path.build\">")
3398 (string-append "<path id=\"path.build\"><fileset dir=\""
3399 (assoc-ref inputs "java-asm-bootstrap")
3400 "/share/java\" includes=\"**/*.jar\"/>"))
3401 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3402 (("lib/asm-commons-4.0.jar")
3403 (string-append (assoc-ref inputs "java-asm-bootstrap")
3404 "/share/java/asm-6.0.jar"))
3405 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3406 (string-append "<include name=\"org/objectweb/asm/"
3407 "commons/Remap*.class\"/>"
3408 "<include name=\"org/objectweb/asm/*.class\"/>"
3409 "<include name=\"org/objectweb/asm/"
3410 "signature/*.class\"/>"
3411 "<include name=\"org/objectweb/asm/"
3412 "commons/SignatureRemapper.class\"/>")))
3413 #t))
3414 (replace 'install
3415 (lambda* (#:key outputs #:allow-other-keys)
3416 (let ((target (string-append (assoc-ref outputs "out")
3417 "/share/java")))
3418 (install-file (string-append "dist/jarjar-" ,version ".jar")
3419 target))
3420 #t)))))
3421 (inputs
3422 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3423 (native-inputs
3424 `(("unzip" ,unzip)))
3425 (home-page "https://code.google.com/archive/p/jarjar/")
3426 (synopsis "Repackage Java libraries")
3427 (description
3428 "Jar Jar Links is a utility that makes it easy to repackage Java
3429 libraries and embed them into your own distribution. Jar Jar Links includes
3430 an Ant task that extends the built-in @code{jar} task.")
3431 (license license:asl2.0)))
3432
3433 (define-public java-hamcrest-core
3434 (package
3435 (name "java-hamcrest-core")
3436 (version "1.3")
3437 (source (origin
3438 (method url-fetch)
3439 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3440 "archive/hamcrest-java-" version ".tar.gz"))
3441 (sha256
3442 (base32
3443 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3444 (modules '((guix build utils)))
3445 (snippet
3446 '(begin
3447 ;; Delete bundled thirds-party jar archives.
3448 (delete-file-recursively "lib")
3449 #t))))
3450 (build-system ant-build-system)
3451 (arguments
3452 `(#:tests? #f ; Tests require junit
3453 #:modules ((guix build ant-build-system)
3454 (guix build utils)
3455 (srfi srfi-1))
3456 #:make-flags (list (string-append "-Dversion=" ,version))
3457 #:test-target "unit-test"
3458 #:build-target "core"
3459 #:phases
3460 (modify-phases %standard-phases
3461 ;; Disable unit tests, because they require junit, which requires
3462 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3463 ;; attribute from the manifest for reproducibility.
3464 (add-before 'configure 'patch-build.xml
3465 (lambda _
3466 (substitute* "build.xml"
3467 (("unit-test, ") "")
3468 (("\\$\\{build.timestamp\\}") "guix"))
3469 #t))
3470 ;; Java's "getMethods()" returns methods in an unpredictable order.
3471 ;; To make the output of the generated code deterministic we must
3472 ;; sort the array of methods.
3473 (add-after 'unpack 'make-method-order-deterministic
3474 (lambda _
3475 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3476 (("import java\\.util\\.Iterator;" line)
3477 (string-append line "\n"
3478 "import java.util.Arrays; import java.util.Comparator;"))
3479 (("allMethods = cls\\.getMethods\\(\\);" line)
3480 (string-append "_" line
3481 "
3482 private Method[] getSortedMethods() {
3483 Arrays.sort(_allMethods, new Comparator<Method>() {
3484 @Override
3485 public int compare(Method a, Method b) {
3486 return a.toString().compareTo(b.toString());
3487 }
3488 });
3489 return _allMethods;
3490 }
3491
3492 private Method[] allMethods = getSortedMethods();")))
3493 #t))
3494 (add-before 'build 'do-not-use-bundled-qdox
3495 (lambda* (#:key inputs #:allow-other-keys)
3496 (substitute* "build.xml"
3497 (("lib/generator/qdox-1.12.jar")
3498 (string-append (assoc-ref inputs "java-qdox-1.12")
3499 "/share/java/qdox.jar")))
3500 #t))
3501 ;; build.xml searches for .jar files in this directoy, which
3502 ;; we remove from the source archive.
3503 (add-before 'build 'create-dummy-directories
3504 (lambda _
3505 (mkdir-p "lib/integration")
3506 #t))
3507 (replace 'install
3508 (lambda* (#:key outputs #:allow-other-keys)
3509 (let* ((target (string-append (assoc-ref outputs "out")
3510 "/share/java/"))
3511 (version-suffix ,(string-append "-" version ".jar"))
3512 (install-without-version-suffix
3513 (lambda (jar)
3514 (copy-file jar
3515 (string-append target
3516 (basename jar version-suffix)
3517 ".jar")))))
3518 (mkdir-p target)
3519 (for-each
3520 install-without-version-suffix
3521 (find-files "build"
3522 (lambda (name _)
3523 (and (string-suffix? ".jar" name)
3524 (not (string-suffix? "-sources.jar" name)))))))
3525 #t)))))
3526 (native-inputs
3527 `(("java-qdox-1.12" ,java-qdox-1.12)
3528 ("java-jarjar" ,java-jarjar)))
3529 (home-page "http://hamcrest.org/")
3530 (synopsis "Library of matchers for building test expressions")
3531 (description
3532 "This package provides a library of matcher objects (also known as
3533 constraints or predicates) allowing @code{match} rules to be defined
3534 declaratively, to be used in other frameworks. Typical scenarios include
3535 testing frameworks, mocking libraries and UI validation rules.")
3536 (license license:bsd-2)))
3537
3538 (define-public java-junit
3539 (package
3540 (name "java-junit")
3541 (version "4.12")
3542 (source (origin
3543 (method url-fetch)
3544 (uri (string-append "https://github.com/junit-team/junit/"
3545 "archive/r" version ".tar.gz"))
3546 (file-name (string-append name "-" version ".tar.gz"))
3547 (sha256
3548 (base32
3549 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3550 (modules '((guix build utils)))
3551 (snippet
3552 '(begin
3553 ;; Delete bundled jar archives.
3554 (delete-file-recursively "lib")
3555 #t))))
3556 (build-system ant-build-system)
3557 (arguments
3558 `(#:tests? #f ; no tests
3559 #:jar-name "junit.jar"))
3560 (inputs
3561 `(("java-hamcrest-core" ,java-hamcrest-core)))
3562 (home-page "https://junit.org/")
3563 (synopsis "Test framework for Java")
3564 (description
3565 "JUnit is a simple framework to write repeatable tests for Java projects.
3566 JUnit provides assertions for testing expected results, test fixtures for
3567 sharing common test data, and test runners for running tests.")
3568 (license license:epl1.0)))
3569
3570 (define-public java-plexus-utils
3571 (package
3572 (name "java-plexus-utils")
3573 (version "3.2.0")
3574 (source (origin
3575 (method url-fetch)
3576 (uri (string-append "https://github.com/codehaus-plexus/"
3577 "plexus-utils/archive/plexus-utils-"
3578 version ".tar.gz"))
3579 (sha256
3580 (base32
3581 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3582 (build-system ant-build-system)
3583 ;; FIXME: The default build.xml does not include a target to install
3584 ;; javadoc files.
3585 (arguments
3586 `(#:jar-name "plexus-utils.jar"
3587 #:source-dir "src/main"
3588 #:phases
3589 (modify-phases %standard-phases
3590 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3591 (lambda _
3592 (substitute* "src/main/java/org/codehaus/plexus/util/\
3593 cli/shell/BourneShell.java"
3594 (("/bin/sh") (which "sh"))
3595 (("/usr/") (getcwd)))
3596 #t))
3597 (add-after 'unpack 'fix-or-disable-broken-tests
3598 (lambda _
3599 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3600 (substitute* '("cli/CommandlineTest.java"
3601 "cli/shell/BourneShellTest.java")
3602 (("/bin/sh") (which "sh"))
3603 (("/bin/echo") (which "echo")))
3604
3605 ;; This test depends on MavenProjectStub, but we don't have
3606 ;; a package for Maven.
3607 (delete-file "introspection/ReflectionValueExtractorTest.java")
3608
3609 ;; FIXME: The command line tests fail, maybe because they use
3610 ;; absolute paths.
3611 (delete-file "cli/CommandlineTest.java"))
3612 #t)))))
3613 (native-inputs
3614 `(("java-hamcrest-core" ,java-hamcrest-core)
3615 ("java-junit" ,java-junit)))
3616 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3617 (synopsis "Common utilities for the Plexus framework")
3618 (description "This package provides various Java utility classes for the
3619 Plexus framework to ease working with strings, files, command lines, XML and
3620 more.")
3621 (license license:asl2.0)))
3622
3623 (define-public java-plexus-interpolation
3624 (package
3625 (name "java-plexus-interpolation")
3626 (version "1.23")
3627 (source (origin
3628 (method url-fetch)
3629 (uri (string-append "https://github.com/codehaus-plexus/"
3630 "plexus-interpolation/archive/"
3631 "plexus-interpolation-" version ".tar.gz"))
3632 (sha256
3633 (base32
3634 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3635 (build-system ant-build-system)
3636 (arguments
3637 `(#:jar-name "plexus-interpolation.jar"
3638 #:source-dir "src/main"))
3639 (native-inputs
3640 `(("java-junit" ,java-junit)
3641 ("java-hamcrest-core" ,java-hamcrest-core)))
3642 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3643 (synopsis "Java components for interpolating ${} strings and the like")
3644 (description "Plexus interpolator is a modular, flexible interpolation
3645 framework for the expression language style commonly seen in Maven, Plexus,
3646 and other related projects.
3647
3648 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3649 package within @code{plexus-utils}, but has been separated in order to allow
3650 these two libraries to vary independently of one another.")
3651 (license license:asl2.0)))
3652
3653 (define-public java-plexus-classworlds
3654 (package
3655 (name "java-plexus-classworlds")
3656 (version "2.5.2")
3657 (source (origin
3658 (method url-fetch)
3659 (uri (string-append "https://github.com/codehaus-plexus/"
3660 "plexus-classworlds/archive/plexus-classworlds-"
3661 version ".tar.gz"))
3662 (sha256
3663 (base32
3664 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3665 (build-system ant-build-system)
3666 (arguments
3667 `(#:jar-name "plexus-classworlds.jar"
3668 #:source-dir "src/main"
3669 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3670 (native-inputs
3671 `(("java-junit" ,java-junit)))
3672 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3673 (synopsis "Java class loader framework")
3674 (description "Plexus classworlds replaces the native @code{ClassLoader}
3675 mechanism of Java. It is especially useful for dynamic loading of application
3676 components.")
3677 (license license:asl2.0)))
3678
3679 (define java-plexus-container-default-bootstrap
3680 (package
3681 (name "java-plexus-container-default-bootstrap")
3682 (version "1.7.1")
3683 (source (origin
3684 (method url-fetch)
3685 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3686 "/archive/plexus-containers-" version ".tar.gz"))
3687 (sha256
3688 (base32
3689 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3690 (build-system ant-build-system)
3691 (arguments
3692 `(#:jar-name "container-default.jar"
3693 #:source-dir "plexus-container-default/src/main/java"
3694 #:test-dir "plexus-container-default/src/test"
3695 #:jdk ,icedtea-8
3696 #:tests? #f; requires plexus-archiver, which depends on this package
3697 #:phases
3698 (modify-phases %standard-phases
3699 (add-before 'build 'copy-resources
3700 (lambda _
3701 (copy-recursively
3702 "plexus-container-default/src/main/resources/"
3703 "build/classes")
3704 #t)))))
3705 (inputs
3706 `(("worldclass" ,java-plexus-classworlds)
3707 ("xbean" ,java-geronimo-xbean-reflect)
3708 ("utils" ,java-plexus-utils)
3709 ("junit" ,java-junit)
3710 ("guava" ,java-guava)))
3711 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3712 (synopsis "Inversion-of-control container")
3713 (description "Plexus-default-container is Plexus' inversion-of-control
3714 (@dfn{IoC}) container. It is composed of its public API and its default
3715 implementation.")
3716 (license license:asl2.0)))
3717
3718 (define-public java-plexus-io
3719 (package
3720 (name "java-plexus-io")
3721 (version "3.0.0")
3722 (source (origin
3723 (method url-fetch)
3724 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3725 "/archive/plexus-io-" version ".tar.gz"))
3726 (sha256
3727 (base32
3728 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3729 (build-system ant-build-system)
3730 (arguments
3731 `(#:jar-name "plexus-io.jar"
3732 #:source-dir "src/main/java"
3733 #:test-dir "src/test"
3734 #:jdk ,icedtea-8
3735 #:phases
3736 (modify-phases %standard-phases
3737 (add-before 'build 'copy-resources
3738 (lambda _
3739 (mkdir-p "build/classes/META-INF/plexus")
3740 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3741 "build/classes/META-INF/plexus/components.xml")
3742 #t)))))
3743 (inputs
3744 `(("utils" ,java-plexus-utils)
3745 ("commons-io" ,java-commons-io)
3746 ("java-jsr305" ,java-jsr305)))
3747 (native-inputs
3748 `(("junit" ,java-junit)
3749 ("hamcrest" ,java-hamcrest-core)
3750 ("guava" ,java-guava)
3751 ("classworlds" ,java-plexus-classworlds)
3752 ("xbean" ,java-geronimo-xbean-reflect)
3753 ("container-default" ,java-plexus-container-default-bootstrap)))
3754 (home-page "https://github.com/codehaus-plexus/plexus-io")
3755 (synopsis "I/O plexus components")
3756 (description "Plexus IO is a set of plexus components, which are designed
3757 for use in I/O operations. This implementation using plexus components allows
3758 reusing it in maven.")
3759 (license license:asl2.0)))
3760
3761 (define-public java-plexus-archiver
3762 (package
3763 (name "java-plexus-archiver")
3764 (version "4.1.0")
3765 (source (origin
3766 (method url-fetch)
3767 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3768 "/archive/plexus-archiver-" version ".tar.gz"))
3769 (sha256
3770 (base32
3771 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3772 (build-system ant-build-system)
3773 (arguments
3774 `(#:jar-name "plexus-archiver.jar"
3775 #:source-dir "src/main/java"
3776 #:jdk ,icedtea-8
3777 #:test-dir "src/test"
3778 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3779 #:phases
3780 (modify-phases %standard-phases
3781 (add-before 'check 'remove-failing
3782 (lambda _
3783 ;; Requires an older version of plexus container
3784 (delete-file
3785 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3786 #t))
3787 (add-before 'check 'fix-test-building
3788 (lambda _
3789 (substitute* "build.xml"
3790 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3791 #t))
3792 (add-before 'build 'copy-resources
3793 (lambda _
3794 (mkdir-p "build/classes/META-INF/plexus")
3795 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3796 "build/classes/META-INF/plexus/components.xml")
3797 #t)))))
3798 (inputs
3799 `(("utils" ,java-plexus-utils)
3800 ("commons-io" ,java-commons-io)
3801 ("snappy" ,java-iq80-snappy)
3802 ("io" ,java-plexus-io)
3803 ("compress" ,java-commons-compress)
3804 ("container-default" ,java-plexus-container-default-bootstrap)
3805 ("snappy" ,java-snappy)
3806 ("java-jsr305" ,java-jsr305)))
3807 (native-inputs
3808 `(("java-hamcrest-core" ,java-hamcrest-core)
3809 ("junit" ,java-junit)
3810 ("classworld" ,java-plexus-classworlds)
3811 ("xbean" ,java-geronimo-xbean-reflect)
3812 ("xz" ,java-tukaani-xz)
3813 ("guava" ,java-guava)))
3814 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3815 (synopsis "Archiver component of the Plexus project")
3816 (description "Plexus-archiver contains a component to deal with project
3817 archives (jar).")
3818 (license license:asl2.0)))
3819
3820 (define-public java-plexus-container-default
3821 (package
3822 (inherit java-plexus-container-default-bootstrap)
3823 (name "java-plexus-container-default")
3824 (arguments
3825 `(#:jar-name "container-default.jar"
3826 #:source-dir "plexus-container-default/src/main/java"
3827 #:test-dir "plexus-container-default/src/test"
3828 #:test-exclude (list ;"**/*Test.java"
3829 "**/Abstract*.java"
3830 ;; Requires plexus-hierarchy
3831 "**/PlexusHierarchyTest.java"
3832 ;; Failures
3833 "**/ComponentRealmCompositionTest.java"
3834 "**/PlexusContainerTest.java")
3835 #:jdk ,icedtea-8
3836 #:phases
3837 (modify-phases %standard-phases
3838 (add-before 'build 'copy-resources
3839 (lambda _
3840 (copy-recursively
3841 "plexus-container-default/src/main/resources/"
3842 "build/classes")
3843 #t))
3844 (add-before 'check 'fix-paths
3845 (lambda _
3846 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3847 (substitute*
3848 (string-append
3849 dir "/plexus/component/composition/"
3850 "ComponentRealmCompositionTest.java")
3851 (("src/test") "plexus-container-default/src/test"))
3852 #t))))))
3853 (inputs
3854 `(("worldclass" ,java-plexus-classworlds)
3855 ("xbean" ,java-geronimo-xbean-reflect)
3856 ("utils" ,java-plexus-utils)
3857 ("junit" ,java-junit)
3858 ("guava" ,java-guava)))
3859 (native-inputs
3860 `(("archiver" ,java-plexus-archiver)
3861 ("hamcrest" ,java-hamcrest-core)))))
3862
3863 (define-public java-plexus-component-annotations
3864 (package
3865 (inherit java-plexus-container-default)
3866 (name "java-plexus-component-annotations")
3867 (arguments
3868 `(#:jar-name "plexus-component-annotations.jar"
3869 #:source-dir "plexus-component-annotations/src/main/java"
3870 #:tests? #f)); no tests
3871 (inputs '())
3872 (native-inputs '())
3873 (synopsis "Plexus descriptors generator")
3874 (description "This package is a Maven plugin to generate Plexus descriptors
3875 from source tags and class annotations.")))
3876
3877 (define-public java-plexus-cipher
3878 (package
3879 (name "java-plexus-cipher")
3880 (version "1.7")
3881 (source (origin
3882 (method url-fetch)
3883 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3884 "/archive/plexus-cipher-" version ".tar.gz"))
3885 (sha256
3886 (base32
3887 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3888 (build-system ant-build-system)
3889 (arguments
3890 `(#:jar-name "plexus-cipher.jar"
3891 #:source-dir "src/main/java"
3892 #:jdk ,icedtea-8
3893 #:tests? #f; FIXME: requires sisu-inject-bean
3894 #:phases
3895 (modify-phases %standard-phases
3896 (add-before 'build 'copy-resources
3897 (lambda _
3898 (copy-recursively "src/main/resources" "build/classes")
3899 (mkdir-p "build/classes/META-INF/sisu")
3900 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3901 (lambda _
3902 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3903 #t)))))
3904 (inputs
3905 `(("java-cdi-api" ,java-cdi-api)
3906 ("java-javax-inject" ,java-javax-inject)))
3907 (home-page "https://github.com/sonatype/plexus-cipher")
3908 (synopsis "Encryption/decryption Component")
3909 (description "Plexus-cipher contains a component to deal with encryption
3910 and decryption.")
3911 (license license:asl2.0)))
3912
3913 (define-public java-plexus-compiler-api
3914 (package
3915 (name "java-plexus-compiler-api")
3916 (version "2.8.4")
3917 (source (origin
3918 (method url-fetch)
3919 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3920 "/archive/plexus-compiler-" version ".tar.gz"))
3921 (sha256
3922 (base32
3923 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3924 (build-system ant-build-system)
3925 (arguments
3926 `(#:jar-name "plexus-compiler-api.jar"
3927 #:source-dir "plexus-compiler-api/src/main/java"
3928 #:jdk ,icedtea-8
3929 #:test-dir "plexus-compiler-api/src/test"))
3930 (inputs
3931 `(("java-plexus-container-default" ,java-plexus-container-default)
3932 ("java-plexus-util" ,java-plexus-utils)))
3933 (native-inputs
3934 `(("java-junit" ,java-junit)))
3935 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3936 (synopsis "Plexus Compilers component's API to manipulate compilers")
3937 (description "This package contains the API used by components to manipulate
3938 compilers.")
3939 (license (list license:asl2.0
3940 license:expat))))
3941
3942 (define-public java-plexus-compiler-javac
3943 (package
3944 (inherit java-plexus-compiler-api)
3945 (name "java-plexus-compiler-javac")
3946 (arguments
3947 `(#:jar-name "plexus-compiler-javac.jar"
3948 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3949 #:jdk ,icedtea-8
3950 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3951 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3952 (inputs
3953 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3954 ("java-plexus-utils" ,java-plexus-utils)
3955 ("java-plexus-container-default" ,java-plexus-container-default)))
3956 (native-inputs
3957 `(("java-junit" ,java-junit)))
3958 (synopsis "Javac Compiler support for Plexus Compiler component")
3959 (description "This package contains the Javac Compiler support for Plexus
3960 Compiler component.")))
3961
3962 (define-public java-plexus-sec-dispatcher
3963 (package
3964 (name "java-plexus-sec-dispatcher")
3965 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3966 (source (origin
3967 ;; This project doesn't tag releases or publish tarballs, so we take
3968 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3969 (method url-fetch)
3970 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3971 "archive/7db8f88048.tar.gz"))
3972 (sha256
3973 (base32
3974 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3975 (file-name (string-append name "-" version ".tar.gz"))))
3976 (arguments
3977 `(#:jar-name "plexus-sec-dispatcher.jar"
3978 #:source-dir "src/main/java"
3979 #:jdk ,icedtea-8
3980 #:phases
3981 (modify-phases %standard-phases
3982 (add-before 'build 'generate-models
3983 (lambda* (#:key inputs #:allow-other-keys)
3984 (define (modello-single-mode file version mode)
3985 (invoke "java"
3986 "org.codehaus.modello.ModelloCli"
3987 file mode "src/main/java" version
3988 "false" "true"))
3989 (let ((file "src/main/mdo/settings-security.mdo"))
3990 (modello-single-mode file "1.0.0" "java")
3991 (modello-single-mode file "1.0.0" "xpp3-reader")
3992 (modello-single-mode file "1.0.0" "xpp3-writer"))
3993 #t))
3994 (add-before 'build 'generate-components.xml
3995 (lambda _
3996 (mkdir-p "build/classes/META-INF/plexus")
3997 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3998 (lambda _
3999 (display
4000 "<component-set>\n
4001 <components>\n
4002 <component>\n
4003 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4004 <role-hint>default</role-hint>\n
4005 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4006 <description></description>\n
4007 <requirements>\n
4008 <requirement>\n
4009 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4010 <field-name>_cipher</field-name>\n
4011 </requirement>\n
4012 <requirement>\n
4013 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4014 <field-name>_decryptors</field-name>\n
4015 </requirement>\n
4016 </requirements>\n
4017 <configuration>\n
4018 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4019 </configuration>\n
4020 </component>\n
4021 </components>\n
4022 </component-set>\n")))
4023 #t))
4024 (add-before 'check 'fix-paths
4025 (lambda _
4026 (copy-recursively "src/test/resources" "target")
4027 #t)))))
4028 (inputs
4029 `(("java-plexus-cipher" ,java-plexus-cipher)))
4030 (native-inputs
4031 `(("java-modello-core" ,java-modello-core)
4032 ;; for modello:
4033 ("java-plexus-container-default" ,java-plexus-container-default)
4034 ("java-plexus-classworlds" ,java-plexus-classworlds)
4035 ("java-plexus-utils" ,java-plexus-utils)
4036 ("java-guava" ,java-guava)
4037 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4038 ("java-sisu-build-api" ,java-sisu-build-api)
4039 ;; modello plugins:
4040 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4041 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4042 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4043 ;; for tests
4044 ("java-junit" ,java-junit)))
4045 (build-system ant-build-system)
4046 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4047 (synopsis "Plexus Security Dispatcher Component")
4048 (description "This package is the Plexus Security Dispatcher Component.
4049 This component decrypts a string passed to it.")
4050 (license license:asl2.0)))
4051
4052 (define-public java-plexus-cli
4053 (package
4054 (name "java-plexus-cli")
4055 (version "1.7")
4056 (source (origin
4057 (method git-fetch)
4058 (uri (git-reference
4059 (url "https://github.com/sonatype/plexus-cli")
4060 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4061 (file-name (string-append name "-" version))
4062 (sha256
4063 (base32
4064 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4065 (build-system ant-build-system)
4066 (arguments
4067 `(#:jar-name "plexus-cli.jar"
4068 #:source-dir "src/main/java"
4069 #:jdk ,icedtea-8
4070 #:test-dir "src/test"))
4071 (inputs
4072 `(("java-commons-cli" ,java-commons-cli)
4073 ("java-plexus-container-default" ,java-plexus-container-default)
4074 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4075 (native-inputs
4076 `(("java-plexus-utils" ,java-plexus-utils)
4077 ("java-junit" ,java-junit)
4078 ("java-guava" ,java-guava)))
4079 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4080 (synopsis "CLI building library for plexus")
4081 (description "This package is a library to help creating CLI around
4082 Plexus components.")
4083 (license license:asl2.0)))
4084
4085 (define-public java-sisu-build-api
4086 (package
4087 (name "java-sisu-build-api")
4088 (version "0.0.7")
4089 (source (origin
4090 (method url-fetch)
4091 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
4092 "archive/plexus-build-api-" version ".tar.gz"))
4093 (sha256
4094 (base32
4095 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
4096 (build-system ant-build-system)
4097 (arguments
4098 `(#:jar-name "sisu-build-api.jar"
4099 #:source-dir "src/main/java"
4100 #:jdk ,icedtea-8
4101 #:tests? #f; FIXME: how to run the tests?
4102 #:phases
4103 (modify-phases %standard-phases
4104 (add-before 'build 'copy-resources
4105 (lambda _
4106 (copy-recursively "src/main/resources" "build/classes")
4107 (substitute* (find-files "build/classes")
4108 (("\\$\\{project.version\\}") ,version))
4109 #t))
4110 (add-before 'build 'generate-plexus-compontent
4111 (lambda _
4112 (mkdir-p "build/classes/META-INF/plexus")
4113 ;; This file is required for plexus to inject this package.
4114 ;; FIXME: how is it generated?
4115 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4116 (lambda _
4117 (display
4118 "<component-set>\n
4119 <components>\n
4120 <component>\n
4121 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4122 <role-hint>default</role-hint>\n
4123 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4124 <description>Filesystem based non-incremental build context implementation\n
4125 which behaves as if all files were just created.</description>\n
4126 </component>\n
4127 </components>\n
4128 </component-set>\n")))
4129 #t)))))
4130 (inputs
4131 `(("java-plexus-utils" ,java-plexus-utils)
4132 ("java-plexus-container-default" ,java-plexus-container-default)))
4133 (home-page "https://github.com/sonatype/sisu-build-api/")
4134 (synopsis "Base build API for maven")
4135 (description "This package contains the base build API for maven and
4136 a default implementation of it. This API is about scanning files in a
4137 project and determining what files need to be rebuilt.")
4138 (license license:asl2.0)))
4139
4140 (define-public java-modello-core
4141 (package
4142 (name "java-modello-core")
4143 (version "1.9.1")
4144 (source (origin
4145 (method url-fetch)
4146 (uri (string-append "https://github.com/codehaus-plexus/modello"
4147 "/archive/modello-" version ".tar.gz"))
4148 (sha256
4149 (base32
4150 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
4151 (build-system ant-build-system)
4152 (arguments
4153 `(#:jar-name "modello-core.jar"
4154 #:source-dir "modello-core/src/main/java"
4155 #:test-dir "modello-core/src/test"
4156 #:main-class "org.codehaus.modello.ModelloCli"
4157 #:jdk ,icedtea-8
4158 #:phases
4159 (modify-phases %standard-phases
4160 (add-before 'build 'copy-resources
4161 (lambda _
4162 (mkdir-p "build/classes/META-INF/plexus")
4163 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4164 "build/classes/META-INF/plexus/components.xml")
4165 #t))
4166 (add-before 'check 'fix-tests
4167 (lambda _
4168 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4169 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4170 "modello/core/io/ModelReaderTest.java")
4171 (("src/test") "modello-core/src/test")))
4172 #t)))))
4173 (inputs
4174 `(("java-plexus-utils" ,java-plexus-utils)
4175 ("java-plexus-container-default" ,java-plexus-container-default)
4176 ("java-sisu-build-api" ,java-sisu-build-api)))
4177 (native-inputs
4178 `(("java-junit" ,java-junit)
4179 ("java-plexus-classworlds" ,java-plexus-classworlds)
4180 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4181 ("java-guava" ,java-guava)))
4182 (home-page "https://codehaus-plexus.github.io/modello/")
4183 (synopsis "Framework for code generation from a simple model")
4184 (description "Modello is a framework for code generation from a simple model.
4185
4186 Modello generates code from a simple model format: based on a plugin
4187 architecture, various types of code and descriptors can be generated from the
4188 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4189 XSD and documentation.")
4190 (license (list
4191 license:expat
4192 ;; Although this package uses only files licensed under expat,
4193 ;; other parts of the source are licensed under different
4194 ;; licenses. We include them to be inherited by other packages.
4195 license:asl2.0
4196 ;; Some files in modello-plugin-java are licensed under a
4197 ;; 5-clause BSD license.
4198 (license:non-copyleft
4199 (string-append "file:///modello-plugins/modello-plugin-java/"
4200 "src/main/java/org/codehaus/modello/plugin/"
4201 "java/javasource/JNaming.java"))))))
4202
4203 (define-public java-modello-plugins-java
4204 (package
4205 (inherit java-modello-core)
4206 (name "java-modello-plugins-java")
4207 (arguments
4208 `(#:jar-name "modello-plugins-java.jar"
4209 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4210 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4211 #:jdk ,icedtea-8
4212 #:tests? #f; requires maven-model, which depends on this package
4213 #:phases
4214 (modify-phases %standard-phases
4215 (add-before 'build 'copy-resources
4216 (lambda _
4217 (mkdir-p "build/classes")
4218 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4219 "build/classes")
4220 #t)))))
4221 (inputs
4222 `(("java-modello-core" ,java-modello-core)
4223 ,@(package-inputs java-modello-core)))
4224 (synopsis "Modello Java Plugin")
4225 (description "Modello Java Plugin generates Java objects for the model.")))
4226
4227 (define-public java-modello-plugins-xml
4228 (package
4229 (inherit java-modello-core)
4230 (name "java-modello-plugins-xml")
4231 (arguments
4232 `(#:jar-name "modello-plugins-xml.jar"
4233 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4234 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4235 #:jdk ,icedtea-8
4236 #:phases
4237 (modify-phases %standard-phases
4238 (add-before 'build 'copy-resources
4239 (lambda _
4240 (mkdir-p "build/classes")
4241 (copy-recursively
4242 "modello-plugins/modello-plugin-xml/src/main/resources"
4243 "build/classes")
4244 #t))
4245 (add-before 'check 'fix-paths
4246 (lambda _
4247 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4248 (substitute*
4249 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4250 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4251 #t)))))
4252 (inputs
4253 `(("java-modello-core" ,java-modello-core)
4254 ("java-modello-plugins-java" ,java-modello-plugins-java)
4255 ,@(package-inputs java-modello-core)))
4256 (synopsis "Modello XML Plugin")
4257 (description "Modello XML Plugin contains shared code for every plugins
4258 working on XML representation of the model.")))
4259
4260 (define-public java-modello-test
4261 (package
4262 (inherit java-modello-core)
4263 (name "java-modello-test")
4264 (arguments
4265 `(#:jar-name "modello-test.jar"
4266 #:source-dir "modello-test/src/main/java"
4267 #:tests? #f; no tests
4268 #:jdk ,icedtea-8))
4269 (inputs
4270 `(("java-plexus-utils" ,java-plexus-utils)
4271 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4272 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4273 ("java-plexus-container-default" ,java-plexus-container-default)))
4274 (synopsis "Modello test package")
4275 (description "The modello test package contains the basis to create
4276 Modello generator unit-tests, including sample models and xml files to test
4277 every feature for every plugin.")))
4278
4279 (define-public java-modello-plugins-xpp3
4280 (package
4281 (inherit java-modello-core)
4282 (name "java-modello-plugins-xpp3")
4283 (arguments
4284 `(#:jar-name "modello-plugins-xpp3.jar"
4285 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4286 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4287 ;; One of the test dependencies is maven-model which depends on this package.
4288 #:tests? #f
4289 #:jdk ,icedtea-8
4290 #:phases
4291 (modify-phases %standard-phases
4292 (add-before 'build 'copy-resources
4293 (lambda _
4294 (mkdir-p "build/classes")
4295 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4296 "build/classes")
4297 #t)))))
4298 (inputs
4299 `(("java-modello-core" ,java-modello-core)
4300 ("java-modello-plugins-java" ,java-modello-plugins-java)
4301 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4302 ,@(package-inputs java-modello-core)))
4303 (native-inputs
4304 `(("java-xmlunit" ,java-xmlunit)
4305 ("java-modello-test" ,java-modello-test)
4306 ,@(package-native-inputs java-modello-core)))
4307 (synopsis "Modello XPP3 Plugin")
4308 (description "The modello XPP3 plugin generates XML readers and writers based
4309 on the XPP3 API (XML Pull Parser).")))
4310
4311 (define-public java-asm
4312 (package
4313 (name "java-asm")
4314 (version "6.0")
4315 (source (origin
4316 (method url-fetch)
4317 (uri (string-append "http://download.forge.ow2.org/asm/"
4318 "asm-" version ".tar.gz"))
4319 (sha256
4320 (base32
4321 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4322 (build-system ant-build-system)
4323 (propagated-inputs
4324 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4325 ("java-aqute-libg" ,java-aqute-libg)))
4326 (arguments
4327 `(#:build-target "compile"
4328 ;; The tests require an old version of Janino, which no longer compiles
4329 ;; with the JDK7.
4330 #:tests? #f
4331 #:make-flags
4332 (list
4333 ;; We don't need these extra ant tasks, but the build system asks us to
4334 ;; provide a path anyway.
4335 "-Dobjectweb.ant.tasks.path=dummy-path"
4336 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4337 ;; used during the build automatically by ant-build-system, but
4338 ;; java-asm's build.xml fails unless we provide something here.
4339 "-Dbiz.aQute.bnd.path=dummy-path")
4340 #:phases
4341 (modify-phases %standard-phases
4342 (add-before 'install 'build-jars
4343 (lambda* (#:key make-flags #:allow-other-keys)
4344 ;; We cannot use the "jar" target because it depends on a couple
4345 ;; of unpackaged, complicated tools.
4346 (mkdir "dist")
4347 (invoke "jar"
4348 "-cf" (string-append "dist/asm-" ,version ".jar")
4349 "-C" "output/build/tmp" ".")))
4350 (replace 'install
4351 (install-jars "dist")))))
4352 (native-inputs
4353 `(("java-junit" ,java-junit)))
4354 (home-page "https://asm.ow2.io/")
4355 (synopsis "Very small and fast Java bytecode manipulation framework")
4356 (description "ASM is an all purpose Java bytecode manipulation and
4357 analysis framework. It can be used to modify existing classes or dynamically
4358 generate classes, directly in binary form. The provided common
4359 transformations and analysis algorithms allow to easily assemble custom
4360 complex transformations and code analysis tools.")
4361 (license license:bsd-3)))
4362
4363 (define java-asm-bootstrap
4364 (package
4365 (inherit java-asm)
4366 (name "java-asm-bootstrap")
4367 (arguments
4368 (substitute-keyword-arguments (package-arguments java-asm)
4369 ((#:tests? _) #f)))
4370 (native-inputs `())
4371 (propagated-inputs
4372 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4373 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4374 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4375 (delete `("java-aqute-libg" ,java-aqute-libg)
4376 (package-inputs java-asm)))))))
4377
4378 (define-public java-cglib
4379 (package
4380 (name "java-cglib")
4381 (version "3.2.4")
4382 (source
4383 (origin
4384 (method git-fetch)
4385 (uri (git-reference
4386 (url "https://github.com/cglib/cglib.git")
4387 (commit (string-append
4388 "RELEASE_"
4389 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4390 version)))))
4391 (file-name (git-file-name name version))
4392 (sha256
4393 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4394 (build-system ant-build-system)
4395 (arguments
4396 `(;; FIXME: tests fail because junit runs
4397 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4398 ;; to describe a test at all.
4399 #:tests? #f
4400 #:jar-name "cglib.jar"
4401 #:phases
4402 (modify-phases %standard-phases
4403 (add-after 'unpack 'chdir
4404 (lambda _ (chdir "cglib") #t)))))
4405 (inputs
4406 `(("java-asm" ,java-asm)
4407 ("java-junit" ,java-junit)))
4408 (home-page "https://github.com/cglib/cglib/")
4409 (synopsis "Java byte code generation library")
4410 (description "The byte code generation library CGLIB is a high level API
4411 to generate and transform Java byte code.")
4412 (license license:asl2.0)))
4413
4414 (define-public java-objenesis
4415 (package
4416 (name "java-objenesis")
4417 (version "2.5.1")
4418 (source (origin
4419 (method url-fetch)
4420 (uri (string-append "https://github.com/easymock/objenesis/"
4421 "archive/" version ".tar.gz"))
4422 (file-name (string-append "objenesis-" version ".tar.gz"))
4423 (sha256
4424 (base32
4425 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4426 (build-system ant-build-system)
4427 (arguments
4428 `(#:jar-name "objenesis.jar"
4429 #:source-dir "main/src/"
4430 #:test-dir "main/src/test/"))
4431 (native-inputs
4432 `(("java-junit" ,java-junit)
4433 ("java-hamcrest-core" ,java-hamcrest-core)))
4434 (home-page "http://objenesis.org/")
4435 (synopsis "Bypass the constructor when creating an object")
4436 (description "Objenesis is a small Java library that serves one purpose:
4437 to instantiate a new object of a particular class. It is common to see
4438 restrictions in libraries stating that classes must require a default
4439 constructor. Objenesis aims to overcome these restrictions by bypassing the
4440 constructor on object instantiation.")
4441 (license license:asl2.0)))
4442
4443 (define-public java-easymock
4444 (package
4445 (name "java-easymock")
4446 (version "3.4")
4447 (source (origin
4448 (method url-fetch)
4449 (uri (string-append "https://github.com/easymock/easymock/"
4450 "archive/easymock-" version ".tar.gz"))
4451 (sha256
4452 (base32
4453 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4454 (build-system ant-build-system)
4455 (arguments
4456 `(#:jar-name "easymock.jar"
4457 #:source-dir "core/src/main"
4458 #:test-dir "core/src/test"
4459 #:phases
4460 (modify-phases %standard-phases
4461 ;; FIXME: Android support requires the following packages to be
4462 ;; available: com.google.dexmaker.stock.ProxyBuilder
4463 (add-after 'unpack 'delete-android-support
4464 (lambda _
4465 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4466 (substitute* "MocksControl.java"
4467 (("AndroidSupport.isAndroid\\(\\)") "false")
4468 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4469 (delete-file "AndroidClassProxyFactory.java"))
4470 #t))
4471 (add-after 'unpack 'delete-broken-tests
4472 (lambda _
4473 (with-directory-excursion "core/src/test/java/org/easymock"
4474 ;; This test depends on dexmaker.
4475 (delete-file "tests2/ClassExtensionHelperTest.java")
4476
4477 ;; This is not a test.
4478 (delete-file "tests/BaseEasyMockRunnerTest.java")
4479
4480 ;; This test should be executed with a different runner...
4481 (delete-file "tests2/EasyMockAnnotationsTest.java")
4482 ;; ...but deleting it means that we also have to delete these
4483 ;; dependent files.
4484 (delete-file "tests2/EasyMockRunnerTest.java")
4485 (delete-file "tests2/EasyMockRuleTest.java")
4486
4487 ;; This test fails because the file "easymock.properties" does
4488 ;; not exist.
4489 (delete-file "tests2/EasyMockPropertiesTest.java"))
4490 #t)))))
4491 (inputs
4492 `(("java-asm" ,java-asm)
4493 ("java-cglib" ,java-cglib)
4494 ("java-objenesis" ,java-objenesis)))
4495 (native-inputs
4496 `(("java-junit" ,java-junit)
4497 ("java-hamcrest-core" ,java-hamcrest-core)))
4498 (home-page "http://easymock.org")
4499 (synopsis "Java library providing mock objects for unit tests")
4500 (description "EasyMock is a Java library that provides an easy way to use
4501 mock objects in unit testing.")
4502 (license license:asl2.0)))
4503
4504 (define-public java-jmock-1
4505 (package
4506 (name "java-jmock")
4507 (version "1.2.0")
4508 (source (origin
4509 (method url-fetch)
4510 (uri (string-append "https://github.com/jmock-developers/"
4511 "jmock-library/archive/" version ".tar.gz"))
4512 (file-name (string-append "jmock-" version ".tar.gz"))
4513 (sha256
4514 (base32
4515 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4516 (build-system ant-build-system)
4517 (arguments
4518 `(#:build-target "jars"
4519 #:test-target "run.tests"
4520 #:phases
4521 (modify-phases %standard-phases
4522 (replace 'install (install-jars "build")))))
4523 (home-page "http://www.jmock.org")
4524 (synopsis "Mock object library for test-driven development")
4525 (description "JMock is a library that supports test-driven development of
4526 Java code with mock objects. Mock objects help you design and test the
4527 interactions between the objects in your programs.
4528
4529 The jMock library
4530
4531 @itemize
4532 @item makes it quick and easy to define mock objects
4533 @item lets you precisely specify the interactions between
4534 your objects, reducing the brittleness of your tests
4535 @item plugs into your favourite test framework
4536 @item is easy to extend.
4537 @end itemize\n")
4538 (license license:bsd-3)))
4539
4540 (define-public java-jmock
4541 (package
4542 (inherit java-jmock-1)
4543 (name "java-jmock")
4544 (version "2.8.2")
4545 (source (origin
4546 (method url-fetch)
4547 (uri (string-append "https://github.com/jmock-developers/"
4548 "jmock-library/archive/" version ".tar.gz"))
4549 (file-name (string-append name "-" version ".tar.gz"))
4550 (sha256
4551 (base32
4552 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4553 (inputs
4554 `(("java-hamcrest-all" ,java-hamcrest-all)
4555 ("java-asm" ,java-asm)
4556 ("java-bsh" ,java-bsh)
4557 ("java-junit" ,java-junit)))
4558 (native-inputs
4559 `(("cglib" ,java-cglib)))
4560 (arguments
4561 `(#:jar-name "java-jmock.jar"
4562 #:source-dir "jmock/src/main/java"
4563 #:test-dir "jmock/src/test"))))
4564
4565 (define-public java-jmock-junit4
4566 (package
4567 (inherit java-jmock)
4568 (name "java-jmock-junit4")
4569 (arguments
4570 `(#:jar-name "java-jmock-junit4.jar"
4571 #:source-dir "jmock-junit4/src/main/java"
4572 #:test-dir "jmock-junit4/src/test"))
4573 (inputs
4574 `(("java-hamcrest-all" ,java-hamcrest-all)
4575 ("java-asm" ,java-asm)
4576 ("java-bsh" ,java-bsh)
4577 ("java-jmock" ,java-jmock)
4578 ("java-jumit" ,java-junit)))))
4579
4580 (define-public java-jmock-legacy
4581 (package
4582 (inherit java-jmock)
4583 (name "java-jmock-legacy")
4584 (arguments
4585 `(#:jar-name "java-jmock-legacy.jar"
4586 #:source-dir "jmock-legacy/src/main/java"
4587 #:test-dir "jmock-legacy/src/test"
4588 #:phases
4589 (modify-phases %standard-phases
4590 (add-before 'check 'copy-tests
4591 (lambda _
4592 ;; This file is a dependancy of some tests
4593 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4594 (copy-file (string-append "jmock/src/test/java/" file)
4595 (string-append "jmock-legacy/src/test/java/" file))
4596 #t))))))
4597 (inputs
4598 `(("java-hamcrest-all" ,java-hamcrest-all)
4599 ("java-objenesis" ,java-objenesis)
4600 ("java-cglib" ,java-cglib)
4601 ("java-jmock" ,java-jmock)
4602 ("java-asm" ,java-asm)
4603 ("java-bsh" ,java-bsh)
4604 ("java-junit" ,java-junit)))
4605 (native-inputs
4606 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4607
4608 (define-public java-hamcrest-all
4609 (package (inherit java-hamcrest-core)
4610 (name "java-hamcrest-all")
4611 (arguments
4612 `(#:jdk ,icedtea-8
4613 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4614 ((#:build-target _) "bigjar")
4615 ((#:phases phases)
4616 `(modify-phases ,phases
4617 ;; Some build targets override the classpath, so we need to patch
4618 ;; the build.xml to ensure that required dependencies are on the
4619 ;; classpath.
4620 (add-after 'unpack 'patch-classpath-for-integration
4621 (lambda* (#:key inputs #:allow-other-keys)
4622 (substitute* "build.xml"
4623 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4624 (string-join
4625 (cons line
4626 (append
4627 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4628 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4629 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4630 ";"))
4631 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4632 (string-append (assoc-ref inputs "java-hamcrest-core")
4633 "/share/java/hamcrest-core.jar")))
4634 #t)))))))
4635 (inputs
4636 `(("java-junit" ,java-junit)
4637 ("java-jmock" ,java-jmock-1)
4638 ;; This is necessary because of what seems to be a race condition.
4639 ;; This package would sometimes fail to build because hamcrest-core.jar
4640 ;; could not be found, even though it is built as part of this package.
4641 ;; Adding java-hamcrest-core appears to fix this problem. See
4642 ;; https://debbugs.gnu.org/31390 for more information.
4643 ("java-hamcrest-core" ,java-hamcrest-core)
4644 ("java-easymock" ,java-easymock)
4645 ,@(package-inputs java-hamcrest-core)))))
4646
4647 (define-public java-jopt-simple
4648 (package
4649 (name "java-jopt-simple")
4650 (version "5.0.3")
4651 (source (origin
4652 (method url-fetch)
4653 (uri (string-append "http://repo1.maven.org/maven2/"
4654 "net/sf/jopt-simple/jopt-simple/"
4655 version "/jopt-simple-"
4656 version "-sources.jar"))
4657 (sha256
4658 (base32
4659 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4660 (build-system ant-build-system)
4661 (arguments
4662 `(#:tests? #f ; there are no tests
4663 #:jar-name "jopt-simple.jar"))
4664 (home-page "https://pholser.github.io/jopt-simple/")
4665 (synopsis "Java library for parsing command line options")
4666 (description "JOpt Simple is a Java library for parsing command line
4667 options, such as those you might pass to an invocation of @code{javac}. In
4668 the interest of striving for simplicity, as closely as possible JOpt Simple
4669 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4670 GNU @code{getopt_long}. It also aims to make option parser configuration and
4671 retrieval of options and their arguments simple and expressive, without being
4672 overly clever.")
4673 (license license:expat)))
4674
4675 (define-public java-commons-math3
4676 (package
4677 (name "java-commons-math3")
4678 (version "3.6.1")
4679 (source (origin
4680 (method url-fetch)
4681 (uri (string-append "mirror://apache/commons/math/source/"
4682 "commons-math3-" version "-src.tar.gz"))
4683 (sha256
4684 (base32
4685 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4686 (build-system ant-build-system)
4687 (arguments
4688 `(#:build-target "jar"
4689 #:test-target "test"
4690 #:make-flags
4691 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4692 (junit (assoc-ref %build-inputs "java-junit")))
4693 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4694 (string-append "-Dhamcrest.jar=" hamcrest
4695 "/share/java/hamcrest-core.jar")))
4696 #:phases
4697 (modify-phases %standard-phases
4698 ;; We want to build the jar in the build phase and run the tests
4699 ;; later in a separate phase.
4700 (add-after 'unpack 'untangle-targets
4701 (lambda _
4702 (substitute* "build.xml"
4703 (("name=\"jar\" depends=\"test\"")
4704 "name=\"jar\" depends=\"compile\""))
4705 #t))
4706 ;; There is no install target.
4707 (replace 'install
4708 (install-jars "target")))))
4709 (native-inputs
4710 `(("java-junit" ,java-junit)
4711 ("java-hamcrest-core" ,java-hamcrest-core)))
4712 (home-page "https://commons.apache.org/math/")
4713 (synopsis "Apache Commons mathematics library")
4714 (description "Commons Math is a library of lightweight, self-contained
4715 mathematics and statistics components addressing the most common problems not
4716 available in the Java programming language or Commons Lang.")
4717 (license license:asl2.0)))
4718
4719 (define-public java-jmh
4720 (package
4721 (name "java-jmh")
4722 (version "1.17.5")
4723 (source (origin
4724 (method hg-fetch)
4725 (uri (hg-reference
4726 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4727 (changeset version)))
4728 (file-name (string-append name "-" version "-checkout"))
4729 (sha256
4730 (base32
4731 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4732 (build-system ant-build-system)
4733 (arguments
4734 `(#:jar-name "jmh-core.jar"
4735 #:source-dir "jmh-core/src/main"
4736 #:test-dir "jmh-core/src/test"
4737 #:phases
4738 (modify-phases %standard-phases
4739 ;; This seems to be a bug in the JDK. It may not be necessary in
4740 ;; future versions of the JDK.
4741 (add-after 'unpack 'fix-bug
4742 (lambda _
4743 (with-directory-excursion
4744 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4745 (substitute* '("IntegerValueConverter.java"
4746 "ThreadsValueConverter.java")
4747 (("public Class<Integer> valueType")
4748 "public Class<? extends Integer> valueType")))
4749 #t)))))
4750 (inputs
4751 `(("java-jopt-simple" ,java-jopt-simple)
4752 ("java-commons-math3" ,java-commons-math3)))
4753 (native-inputs
4754 `(("java-junit" ,java-junit)
4755 ("java-hamcrest-core" ,java-hamcrest-core)))
4756 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
4757 (synopsis "Benchmark harness for the JVM")
4758 (description "JMH is a Java harness for building, running, and analysing
4759 nano/micro/milli/macro benchmarks written in Java and other languages
4760 targeting the JVM.")
4761 ;; GPLv2 only
4762 (license license:gpl2)))
4763
4764 (define-public java-commons-collections4
4765 (package
4766 (name "java-commons-collections4")
4767 (version "4.1")
4768 (source (origin
4769 (method url-fetch)
4770 (uri (string-append "mirror://apache/commons/collections/source/"
4771 "commons-collections4-" version "-src.tar.gz"))
4772 (sha256
4773 (base32
4774 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4775 (build-system ant-build-system)
4776 (arguments
4777 `(#:test-target "test"
4778 #:make-flags
4779 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4780 (junit (assoc-ref %build-inputs "java-junit"))
4781 (easymock (assoc-ref %build-inputs "java-easymock")))
4782 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4783 (string-append "-Dhamcrest.jar=" hamcrest
4784 "/share/java/hamcrest-core.jar")
4785 (string-append "-Deasymock.jar=" easymock
4786 "/share/java/easymock.jar")))
4787 #:phases
4788 (modify-phases %standard-phases
4789 (replace 'install
4790 (install-jars "target")))))
4791 (native-inputs
4792 `(("java-junit" ,java-junit)
4793 ("java-hamcrest-core" ,java-hamcrest-core)
4794 ("java-easymock" ,java-easymock)))
4795 (home-page "https://commons.apache.org/collections/")
4796 (synopsis "Collections framework")
4797 (description "The Java Collections Framework is the recognised standard
4798 for collection handling in Java. Commons-Collections seek to build upon the
4799 JDK classes by providing new interfaces, implementations and utilities. There
4800 are many features, including:
4801
4802 @itemize
4803 @item @code{Bag} interface for collections that have a number of copies of
4804 each object
4805 @item @code{BidiMap} interface for maps that can be looked up from value to
4806 key as well and key to value
4807 @item @code{MapIterator} interface to provide simple and quick iteration over
4808 maps
4809 @item Transforming decorators that alter each object as it is added to the
4810 collection
4811 @item Composite collections that make multiple collections look like one
4812 @item Ordered maps and sets that retain the order elements are added in,
4813 including an LRU based map
4814 @item Reference map that allows keys and/or values to be garbage collected
4815 under close control
4816 @item Many comparator implementations
4817 @item Many iterator implementations
4818 @item Adapter classes from array and enumerations to collections
4819 @item Utilities to test or create typical set-theory properties of collections
4820 such as union, intersection, and closure.
4821 @end itemize\n")
4822 (license license:asl2.0)))
4823
4824 (define-public java-commons-collections
4825 (package
4826 (inherit java-commons-collections4)
4827 (name "java-commons-collections")
4828 (version "3.2.2")
4829 (source (origin
4830 (method url-fetch)
4831 (uri (string-append "mirror://apache/commons/collections/source/"
4832 "commons-collections-" version "-src.tar.gz"))
4833 (sha256
4834 (base32
4835 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4836 (patches
4837 (search-patches "java-commons-collections-fix-java8.patch"))))
4838 (arguments
4839 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4840 ((#:phases phases)
4841 `(modify-phases ,phases
4842 ;; The manifest is required by the build procedure
4843 (add-before 'build 'add-manifest
4844 (lambda _
4845 (mkdir-p "build/conf")
4846 (call-with-output-file "build/conf/MANIFEST.MF"
4847 (lambda (file)
4848 (format file "Manifest-Version: 1.0\n")))
4849 #t))
4850 (replace 'install
4851 (install-jars "build"))))))))
4852
4853 (define java-commons-collections-test-classes
4854 (package
4855 (inherit java-commons-collections)
4856 (arguments
4857 `(#:jar-name "commons-collections-test-classes.jar"
4858 #:source-dir "src/test"
4859 #:tests? #f))
4860 (inputs
4861 `(("collection" ,java-commons-collections)))))
4862
4863 (define-public java-commons-beanutils
4864 (package
4865 (name "java-commons-beanutils")
4866 (version "1.9.3")
4867 (source (origin
4868 (method url-fetch)
4869 (uri (string-append "mirror://apache/commons/beanutils/source/"
4870 "commons-beanutils-" version "-src.tar.gz"))
4871 (sha256
4872 (base32
4873 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4874 (build-system ant-build-system)
4875 (arguments
4876 `(#:test-target "test"
4877 #:tests? #f
4878 #:phases
4879 (modify-phases %standard-phases
4880 (replace 'install
4881 (lambda* (#:key outputs #:allow-other-keys)
4882 (rename-file (string-append "dist/commons-beanutils-" ,version
4883 "-SNAPSHOT.jar")
4884 "commons-beanutils.jar")
4885 (install-file "commons-beanutils.jar"
4886 (string-append (assoc-ref outputs "out") "/share/java/"))
4887 #t)))))
4888 (inputs
4889 `(("logging" ,java-commons-logging-minimal)
4890 ("collections" ,java-commons-collections)))
4891 (native-inputs
4892 `(("junit" ,java-junit)
4893 ("collections-test" ,java-commons-collections-test-classes)))
4894 (home-page "https://commons.apache.org/beanutils/")
4895 (synopsis "Dynamically set or get properties in Java")
4896 (description "BeanUtils provides a simplified interface to reflection and
4897 introspection to set or get dynamically determined properties through their
4898 setter and getter method.")
4899 (license license:asl2.0)))
4900
4901 (define-public java-commons-io
4902 (package
4903 (name "java-commons-io")
4904 (version "2.5")
4905 (source
4906 (origin
4907 (method url-fetch)
4908 (uri (string-append "mirror://apache/commons/io/source/"
4909 "commons-io-" version "-src.tar.gz"))
4910 (sha256
4911 (base32
4912 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4913 (build-system ant-build-system)
4914 (outputs '("out" "doc"))
4915 (arguments
4916 `(#:test-target "test"
4917 #:make-flags
4918 (list (string-append "-Djunit.jar="
4919 (assoc-ref %build-inputs "java-junit")
4920 "/share/java/junit.jar"))
4921 #:phases
4922 (modify-phases %standard-phases
4923 (add-after 'build 'build-javadoc ant-build-javadoc)
4924 (replace 'install (install-jars "target"))
4925 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4926 (native-inputs
4927 `(("java-junit" ,java-junit)
4928 ("java-hamcrest-core" ,java-hamcrest-core)))
4929 (home-page "https://commons.apache.org/io/")
4930 (synopsis "Common useful IO related classes")
4931 (description "Commons-IO contains utility classes, stream implementations,
4932 file filters and endian classes.")
4933 (license license:asl2.0)))
4934
4935 (define-public java-commons-exec-1.1
4936 (package
4937 (name "java-commons-exec")
4938 (version "1.1")
4939 (source
4940 (origin
4941 (method url-fetch)
4942 (uri (string-append "mirror://apache/commons/exec/source/"
4943 "commons-exec-" version "-src.tar.gz"))
4944 (sha256
4945 (base32
4946 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4947 (build-system ant-build-system)
4948 (arguments
4949 `(#:test-target "test"
4950 #:make-flags
4951 (list (string-append "-Dmaven.junit.jar="
4952 (assoc-ref %build-inputs "java-junit")
4953 "/share/java/junit.jar"))
4954 #:phases
4955 (modify-phases %standard-phases
4956 (add-before 'build 'delete-network-tests
4957 (lambda _
4958 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4959 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4960 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4961 #t))
4962 ;; The "build" phase automatically tests.
4963 (delete 'check)
4964 (replace 'install (install-jars "target")))))
4965 (native-inputs
4966 `(("java-junit" ,java-junit)))
4967 (home-page "https://commons.apache.org/proper/commons-exec/")
4968 (synopsis "Common program execution related classes")
4969 (description "Commons-Exec simplifies executing external processes.")
4970 (license license:asl2.0)))
4971
4972 (define-public java-commons-exec
4973 (package
4974 (inherit java-commons-exec-1.1)
4975 (version "1.3")
4976 (source
4977 (origin
4978 (method url-fetch)
4979 (uri (string-append "mirror://apache/commons/exec/source/"
4980 "commons-exec-" version "-src.tar.gz"))
4981 (sha256
4982 (base32
4983 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4984 (arguments
4985 `(#:test-target "test"
4986 #:make-flags
4987 (list (string-append "-Dmaven.junit.jar="
4988 (assoc-ref %build-inputs "java-junit")
4989 "/share/java/junit.jar")
4990 "-Dmaven.compiler.source=1.7"
4991 "-Dmaven.compiler.target=1.7")
4992 #:phases
4993 (modify-phases %standard-phases
4994 (add-before 'build 'delete-network-tests
4995 (lambda* (#:key inputs #:allow-other-keys)
4996 ;; This test hangs indefinitely.
4997 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4998 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4999 (("ping -c 10 127.0.0.1") "sleep 10"))
5000 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5001 (("/bin/ls") "ls"))
5002 (call-with-output-file "src/test/scripts/ping.sh"
5003 (lambda (port)
5004 (format port "#!~a/bin/sh\nsleep $1\n"
5005 (assoc-ref inputs "bash"))))
5006 #t))
5007 ;; The "build" phase automatically tests.
5008 (delete 'check)
5009 (replace 'install (install-jars "target")))))
5010 (native-inputs
5011 `(("java-junit" ,java-junit)
5012 ("java-hamcrest-core" ,java-hamcrest-core)))))
5013
5014 (define-public java-commons-lang
5015 (package
5016 (name "java-commons-lang")
5017 (version "2.6")
5018 (source
5019 (origin
5020 (method url-fetch)
5021 (uri (string-append "mirror://apache/commons/lang/source/"
5022 "commons-lang-" version "-src.tar.gz"))
5023 (sha256
5024 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5025 (build-system ant-build-system)
5026 (outputs '("out" "doc"))
5027 (arguments
5028 `(#:test-target "test"
5029 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5030 #:phases
5031 (modify-phases %standard-phases
5032 (add-after 'build 'build-javadoc ant-build-javadoc)
5033 (add-before 'check 'disable-failing-test
5034 (lambda _
5035 ;; Disable a failing test
5036 (substitute* "src/test/java/org/apache/commons/lang/\
5037 time/FastDateFormatTest.java"
5038 (("public void testFormat\\(\\)")
5039 "public void disabled_testFormat()"))
5040 #t))
5041 (replace 'install (install-jars "target"))
5042 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5043 (native-inputs
5044 `(("java-junit" ,java-junit)))
5045 (home-page "https://commons.apache.org/lang/")
5046 (synopsis "Extension of the java.lang package")
5047 (description "The Commons Lang components contains a set of Java classes
5048 that provide helper methods for standard Java classes, especially those found
5049 in the @code{java.lang} package in the Sun JDK. The following classes are
5050 included:
5051
5052 @itemize
5053 @item StringUtils - Helper for @code{java.lang.String}.
5054 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5055 of characters such as @code{[a-z]} and @code{[abcdez]}.
5056 @item RandomStringUtils - Helper for creating randomised strings.
5057 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5058 @item NumberRange - A range of numbers with an upper and lower bound.
5059 @item ObjectUtils - Helper for @code{java.lang.Object}.
5060 @item SerializationUtils - Helper for serializing objects.
5061 @item SystemUtils - Utility class defining the Java system properties.
5062 @item NestedException package - A sub-package for the creation of nested
5063 exceptions.
5064 @item Enum package - A sub-package for the creation of enumerated types.
5065 @item Builder package - A sub-package for the creation of @code{equals},
5066 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5067 @end itemize\n")
5068 (license license:asl2.0)))
5069
5070 (define-public java-commons-lang3
5071 (package
5072 (name "java-commons-lang3")
5073 (version "3.4")
5074 (source
5075 (origin
5076 (method url-fetch)
5077 (uri (string-append "mirror://apache/commons/lang/source/"
5078 "commons-lang3-" version "-src.tar.gz"))
5079 (sha256
5080 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5081 (build-system ant-build-system)
5082 (outputs '("out" "doc"))
5083 (arguments
5084 `(#:test-target "test"
5085 #:make-flags
5086 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5087 (junit (assoc-ref %build-inputs "java-junit"))
5088 (easymock (assoc-ref %build-inputs "java-easymock"))
5089 (io (assoc-ref %build-inputs "java-commons-io")))
5090 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5091 (string-append "-Dhamcrest.jar=" hamcrest
5092 "/share/java/hamcrest-all.jar")
5093 (string-append "-Dcommons-io.jar=" io
5094 "/share/java/commons-io-"
5095 ,(package-version java-commons-io)
5096 "-SNAPSHOT.jar")
5097 (string-append "-Deasymock.jar=" easymock
5098 "/share/java/easymock.jar")))
5099 #:phases
5100 (modify-phases %standard-phases
5101 (add-after 'build 'build-javadoc ant-build-javadoc)
5102 (replace 'install (install-jars "target"))
5103 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5104 (native-inputs
5105 `(("java-junit" ,java-junit)
5106 ("java-commons-io" ,java-commons-io)
5107 ("java-hamcrest-all" ,java-hamcrest-all)
5108 ("java-easymock" ,java-easymock)))
5109 (home-page "https://commons.apache.org/lang/")
5110 (synopsis "Extension of the java.lang package")
5111 (description "The Commons Lang components contains a set of Java classes
5112 that provide helper methods for standard Java classes, especially those found
5113 in the @code{java.lang} package. The following classes are included:
5114
5115 @itemize
5116 @item StringUtils - Helper for @code{java.lang.String}.
5117 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5118 characters such as @code{[a-z]} and @code{[abcdez]}.
5119 @item RandomStringUtils - Helper for creating randomised strings.
5120 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5121 @item NumberRange - A range of numbers with an upper and lower bound.
5122 @item ObjectUtils - Helper for @code{java.lang.Object}.
5123 @item SerializationUtils - Helper for serializing objects.
5124 @item SystemUtils - Utility class defining the Java system properties.
5125 @item NestedException package - A sub-package for the creation of nested
5126 exceptions.
5127 @item Enum package - A sub-package for the creation of enumerated types.
5128 @item Builder package - A sub-package for the creation of @code{equals},
5129 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5130 @end itemize\n")
5131 (license license:asl2.0)))
5132
5133 (define-public java-commons-bsf
5134 (package
5135 (name "java-commons-bsf")
5136 (version "2.4.0")
5137 (source (origin
5138 (method url-fetch)
5139 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5140 version ".tar.gz"))
5141 (sha256
5142 (base32
5143 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5144 (modules '((guix build utils)))
5145 (snippet
5146 '(begin
5147 (for-each delete-file
5148 (find-files "." "\\.jar$"))
5149 #t))))
5150 (build-system ant-build-system)
5151 (arguments
5152 `(#:build-target "jar"
5153 #:tests? #f; No test file
5154 #:modules ((guix build ant-build-system)
5155 (guix build utils)
5156 (guix build java-utils)
5157 (sxml simple))
5158 #:phases
5159 (modify-phases %standard-phases
5160 (add-before 'build 'create-properties
5161 (lambda _
5162 ;; This file is missing from the distribution
5163 (call-with-output-file "build-properties.xml"
5164 (lambda (port)
5165 (sxml->xml
5166 `(project (@ (basedir ".") (name "build-properties") (default ""))
5167 (property (@ (name "project.name") (value "bsf")))
5168 (property (@ (name "source.level") (value "1.5")))
5169 (property (@ (name "build.lib") (value "build/jar")))
5170 (property (@ (name "src.dir") (value "src")))
5171 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5172 (property (@ (name "build.tests") (value "build/test-classes")))
5173 (property (@ (name "build.dest") (value "build/classes"))))
5174 port)))
5175 #t))
5176 (replace 'install (install-jars "build")))))
5177 (native-inputs
5178 `(("java-junit" ,java-junit)))
5179 (inputs
5180 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5181 (home-page "https://commons.apache.org/proper/commons-bsf")
5182 (synopsis "Bean Scripting Framework")
5183 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5184 which provides scripting language support within Java applications, and access
5185 to Java objects and methods from scripting languages. BSF allows one to write
5186 JSPs in languages other than Java while providing access to the Java class
5187 library. In addition, BSF permits any Java application to be implemented in
5188 part (or dynamically extended) by a language that is embedded within it. This
5189 is achieved by providing an API that permits calling scripting language engines
5190 from within Java, as well as an object registry that exposes Java objects to
5191 these scripting language engines.")
5192 (license license:asl2.0)))
5193
5194 (define-public java-commons-jxpath
5195 (package
5196 (name "java-commons-jxpath")
5197 (version "1.3")
5198 (source (origin
5199 (method url-fetch)
5200 (uri (string-append "mirror://apache/commons/jxpath/source/"
5201 "commons-jxpath-" version "-src.tar.gz"))
5202 (sha256
5203 (base32
5204 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5205 (build-system ant-build-system)
5206 (arguments
5207 `(#:jar-name "commons-jxpath.jar"
5208 ;; tests require more dependencies, including mockrunner which depends on old software
5209 #:tests? #f
5210 #:source-dir "src/java"))
5211 (inputs
5212 `(("servlet" ,java-classpathx-servletapi)
5213 ("java-jdom" ,java-jdom)
5214 ("java-commons-beanutils" ,java-commons-beanutils)))
5215 (native-inputs
5216 `(("java-junit" ,java-junit)))
5217 (home-page "https://commons.apache.org/jxpath/")
5218 (synopsis "Simple interpreter of an expression language called XPath.")
5219 (description "The org.apache.commons.jxpath package defines a simple
5220 interpreter of an expression language called XPath. JXPath applies XPath
5221 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5222 contexts, DOM etc, including mixtures thereof.")
5223 (license license:asl2.0)))
5224
5225 (define-public java-commons-pool
5226 (package
5227 (name "java-commons-pool")
5228 (version "2.6.2")
5229 (source (origin
5230 (method url-fetch)
5231 (uri (string-append "mirror://apache/commons/pool/source/"
5232 "commons-pool2-" version "-src.tar.gz"))
5233 (sha256
5234 (base32
5235 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5236 (arguments
5237 `(#:jar-name "common-pool.jar"
5238 #:source-dir "src/main/java"
5239 #:test-exclude
5240 (list "**/PerformanceTest.java")))
5241 (build-system ant-build-system)
5242 (inputs
5243 `(("java-cglib" ,java-cglib)))
5244 (native-inputs
5245 `(("java-junit" ,java-junit)
5246 ("java-hamcrest-core" ,java-hamcrest-core)
5247 ("java-asm" ,java-asm)
5248 ("java-objenesis" ,java-objenesis)))
5249 (home-page "https://commons.apache.org/proper/commons-pool/")
5250 (synopsis "Object-pooling API in Java")
5251 (description "The commons-pool package provides an object-pooling API
5252 and a number of object pool implementations. This package defines a
5253 handful of pooling interfaces and some base classes that may be useful when
5254 creating new pool implementations.")
5255 (license license:asl2.0)))
5256
5257 (define-public java-commons-dbcp
5258 (package
5259 (name "java-commons-dbcp")
5260 (version "2.6.0")
5261 (source (origin
5262 (method url-fetch)
5263 (uri (string-append "mirror://apache/commons/dbcp/source/"
5264 "commons-dbcp2-" version "-src.tar.gz"))
5265 (sha256
5266 (base32
5267 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5268 (arguments
5269 `(#:source-dir "src/main/java"
5270 #:jar-name "java-commons-dbcp.jar"
5271 #:tests? #f)); requires apache-geronimo
5272 (inputs
5273 `(("java-commons-pool" ,java-commons-pool)
5274 ("java-commons-logging" ,java-commons-logging-minimal)
5275 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5276 (native-inputs
5277 `(("java-junit" ,java-junit)))
5278 (build-system ant-build-system)
5279 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5280 (synopsis "Database Connection Pool for Java")
5281 (description "Commons-dbcp allows you to share a pool of database
5282 connections between users. Creating a new connection for each user can be
5283 time consuming and even unfeasible when the number of simultaneous users is
5284 very large. This package provides a way to share a poole of connections to
5285 reduce that load.")
5286 (license license:asl2.0)))
5287
5288 (define-public java-commons-jcs
5289 (package
5290 (name "java-commons-jcs")
5291 (version "2.2.1")
5292 (source (origin
5293 (method url-fetch)
5294 (uri (string-append "mirror://apache/commons/jcs/source/"
5295 "commons-jcs-dist-" version "-src.tar.gz"))
5296 (sha256
5297 (base32
5298 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5299 (build-system ant-build-system)
5300 (arguments
5301 `(#:jar-name "commons-jcs.jar"
5302 #:source-dir "commons-jcs-core/src/main/java"
5303 #:test-dir "commons-jcs-core/src/test"
5304 #:tests? #f; requires hsqldb
5305 #:phases
5306 (modify-phases %standard-phases
5307 (add-before 'build 'prepare
5308 (lambda _
5309 (with-directory-excursion
5310 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5311 (substitute*
5312 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5313 (("commons.dbcp") "commons.dbcp2")
5314 ((".*\\.setMaxActive.*") ""))
5315 ;;; Remove dependency on velocity-tools
5316 (delete-file "admin/servlet/JCSAdminServlet.java"))
5317 #t)))))
5318 (propagated-inputs
5319 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5320 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5321 ("java-commons-httpclient" ,java-commons-httpclient)
5322 ("java-commons-dbcp" ,java-commons-dbcp)))
5323 (native-inputs
5324 `(("java-junit" ,java-junit)))
5325 (home-page "https://commons.apache.org/proper/commons-jcs/")
5326 (synopsis "Distributed caching system in Java")
5327 (description "JCS is a distributed caching system written in Java. It
5328 is intended to speed up applications by providing a means to manage cached
5329 data of various dynamic natures. Like any caching system, JCS is most useful
5330 for high read, low put applications. Latency times drop sharply and
5331 bottlenecks move away from the database in an effectively cached system.")
5332 (license license:asl2.0)))
5333
5334 (define-public java-jsr250
5335 (package
5336 (name "java-jsr250")
5337 (version "1.3")
5338 (source (origin
5339 (method url-fetch)
5340 (uri (string-append "https://repo1.maven.org/maven2/"
5341 "javax/annotation/javax.annotation-api/"
5342 version "/javax.annotation-api-"
5343 version "-sources.jar"))
5344 (sha256
5345 (base32
5346 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5347 (build-system ant-build-system)
5348 (arguments
5349 `(#:tests? #f ; no tests included
5350 #:jdk ,icedtea-8
5351 #:jar-name "jsr250.jar"))
5352 (home-page "https://jcp.org/en/jsr/detail?id=250")
5353 (synopsis "Security-related annotations")
5354 (description "This package provides annotations for security. It provides
5355 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5356 namespaces.")
5357 ;; either cddl or gpl2 only, with classpath exception
5358 (license (list license:cddl1.0
5359 license:gpl2))))
5360
5361 (define-public java-jsr305
5362 (package
5363 (name "java-jsr305")
5364 (version "3.0.1")
5365 (source (origin
5366 (method url-fetch)
5367 (uri (string-append "https://repo1.maven.org/maven2/"
5368 "com/google/code/findbugs/"
5369 "jsr305/" version "/jsr305-"
5370 version "-sources.jar"))
5371 (sha256
5372 (base32
5373 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5374 (build-system ant-build-system)
5375 (arguments
5376 `(#:tests? #f ; no tests included
5377 #:jar-name "jsr305.jar"))
5378 (home-page "http://findbugs.sourceforge.net/")
5379 (synopsis "Annotations for the static analyzer called findbugs")
5380 (description "This package provides annotations for the findbugs package.
5381 It provides packages in the @code{javax.annotations} namespace.")
5382 (license license:asl2.0)))
5383
5384 (define-public java-guava
5385 (package
5386 (name "java-guava")
5387 ;; This is the last release of Guava that can be built with Java 7.
5388 (version "20.0")
5389 (source (origin
5390 (method url-fetch)
5391 (uri (string-append "https://github.com/google/guava/"
5392 "releases/download/v" version
5393 "/guava-" version "-sources.jar"))
5394 (sha256
5395 (base32
5396 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5397 (build-system ant-build-system)
5398 (arguments
5399 `(#:tests? #f ; no tests included
5400 #:jar-name "guava.jar"
5401 #:phases
5402 (modify-phases %standard-phases
5403 (add-after 'unpack 'trim-sources
5404 (lambda _
5405 (with-directory-excursion "src/com/google/common"
5406 ;; Remove annotations to avoid extra dependencies:
5407 ;; * "j2objc" annotations are used when converting Java to
5408 ;; Objective C;
5409 ;; * "errorprone" annotations catch common Java mistakes at
5410 ;; compile time;
5411 ;; * "IgnoreJRERequirement" is used for Android.
5412 (substitute* (find-files "." "\\.java$")
5413 (("import com.google.j2objc.*") "")
5414 (("import com.google.errorprone.annotation.*") "")
5415 (("import org.codehaus.mojo.animal_sniffer.*") "")
5416 (("@CanIgnoreReturnValue") "")
5417 (("@LazyInit") "")
5418 (("@WeakOuter") "")
5419 (("@RetainedWith") "")
5420 (("@Weak") "")
5421 (("@ForOverride") "")
5422 (("@J2ObjCIncompatible") "")
5423 (("@IgnoreJRERequirement") "")))
5424 #t)))))
5425 (inputs
5426 `(("java-jsr305" ,java-jsr305)))
5427 (home-page "https://github.com/google/guava")
5428 (synopsis "Google core libraries for Java")
5429 (description "Guava is a set of core libraries that includes new
5430 collection types (such as multimap and multiset), immutable collections, a
5431 graph library, functional types, an in-memory cache, and APIs/utilities for
5432 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5433 more!")
5434 (license license:asl2.0)))
5435
5436 ;; The java-commons-logging package provides adapters to many different
5437 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5438 ;; it with only a minimal set of adapters.
5439 (define-public java-commons-logging-minimal
5440 (package
5441 (name "java-commons-logging-minimal")
5442 (version "1.2")
5443 (source (origin
5444 (method url-fetch)
5445 (uri (string-append "mirror://apache/commons/logging/source/"
5446 "commons-logging-" version "-src.tar.gz"))
5447 (sha256
5448 (base32
5449 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5450 (build-system ant-build-system)
5451 (arguments
5452 `(#:tests? #f ; avoid dependency on logging frameworks
5453 #:jar-name "commons-logging-minimal.jar"
5454 #:phases
5455 (modify-phases %standard-phases
5456 (add-after 'unpack 'delete-adapters-and-tests
5457 (lambda _
5458 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5459 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5460 ;; is used by applications; SimpleLog is the only actually usable
5461 ;; implementation that does not depend on another logging
5462 ;; framework.
5463 (for-each
5464 (lambda (file)
5465 (delete-file (string-append
5466 "src/main/java/org/apache/commons/logging/impl/" file)))
5467 (list "Jdk13LumberjackLogger.java"
5468 "WeakHashtable.java"
5469 "Log4JLogger.java"
5470 "ServletContextCleaner.java"
5471 "Jdk14Logger.java"
5472 "AvalonLogger.java"
5473 "LogKitLogger.java"))
5474 (delete-file-recursively "src/test")
5475 #t)))))
5476 (home-page "https://commons.apache.org/logging/")
5477 (synopsis "Common API for logging implementations")
5478 (description "The Logging package is a thin bridge between different
5479 logging implementations. A library that uses the commons-logging API can be
5480 used with any logging implementation at runtime.")
5481 (license license:asl2.0)))
5482
5483 ;; This is the last release of the 1.x series.
5484 (define-public java-mockito-1
5485 (package
5486 (name "java-mockito")
5487 (version "1.10.19")
5488 (source (origin
5489 (method url-fetch)
5490 (uri (string-append "http://repo1.maven.org/maven2/"
5491 "org/mockito/mockito-core/" version
5492 "/mockito-core-" version "-sources.jar"))
5493 (sha256
5494 (base32
5495 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5496 (build-system ant-build-system)
5497 (arguments
5498 `(#:jar-name "mockito.jar"
5499 #:tests? #f ; no tests included
5500 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5501 ;; patches in build phases.
5502 #:phases
5503 (modify-phases %standard-phases
5504 ;; Mockito was developed against a different version of hamcrest,
5505 ;; which does not require matcher implementations to provide an
5506 ;; implementation of the "describeMismatch" method. We add this
5507 ;; simple definition to pass the build with our version of hamcrest.
5508 (add-after 'unpack 'fix-hamcrest-build-error
5509 (lambda _
5510 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5511 (("public Matcher getActualMatcher\\(\\) .*" line)
5512 (string-append "
5513 public void describeMismatch(Object item, Description description) {
5514 actualMatcher.describeMismatch(item, description);
5515 }"
5516 line)))
5517 #t))
5518 ;; Mockito bundles cglib. We have a cglib package, so let's use
5519 ;; that instead.
5520 (add-after 'unpack 'use-system-libraries
5521 (lambda _
5522 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5523 (substitute* '("CGLIBHacker.java"
5524 "CglibMockMaker.java"
5525 "ClassImposterizer.java"
5526 "DelegatingMockitoMethodProxy.java"
5527 "MethodInterceptorFilter.java"
5528 "MockitoNamingPolicy.java"
5529 "SerializableMockitoMethodProxy.java"
5530 "SerializableNoOp.java")
5531 (("import org.mockito.cglib") "import net.sf.cglib")))
5532 #t)))))
5533 (inputs
5534 `(("java-junit" ,java-junit)
5535 ("java-objenesis" ,java-objenesis)
5536 ("java-cglib" ,java-cglib)
5537 ("java-hamcrest-core" ,java-hamcrest-core)))
5538 (home-page "http://mockito.org")
5539 (synopsis "Mockito is a mock library for Java")
5540 (description "Mockito is a mocking library for Java which lets you write
5541 tests with a clean and simple API. It generates mocks using reflection, and
5542 it records all mock invocations, including methods arguments.")
5543 (license license:asl2.0)))
5544
5545 (define-public java-httpcomponents-httpcore
5546 (package
5547 (name "java-httpcomponents-httpcore")
5548 (version "4.4.6")
5549 (source (origin
5550 (method url-fetch)
5551 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5552 "source/httpcomponents-core-"
5553 version "-src.tar.gz"))
5554 (sha256
5555 (base32
5556 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5557 (build-system ant-build-system)
5558 (arguments
5559 `(#:jar-name "httpcomponents-httpcore.jar"
5560 #:phases
5561 (modify-phases %standard-phases
5562 (add-after 'unpack 'chdir
5563 (lambda _ (chdir "httpcore") #t)))))
5564 (inputs
5565 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5566 ("java-commons-lang3" ,java-commons-lang3)))
5567 (native-inputs
5568 `(("java-junit" ,java-junit)
5569 ("java-mockito" ,java-mockito-1)))
5570 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5571 (synopsis "Low level HTTP transport components")
5572 (description "HttpCore is a set of low level HTTP transport components
5573 that can be used to build custom client and server side HTTP services with a
5574 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5575 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5576 NIO.
5577
5578 This package provides the blocking I/O model library.")
5579 (license license:asl2.0)))
5580
5581 (define-public java-httpcomponents-httpcore-nio
5582 (package (inherit java-httpcomponents-httpcore)
5583 (name "java-httpcomponents-httpcore-nio")
5584 (arguments
5585 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5586 #:phases
5587 (modify-phases %standard-phases
5588 (add-after 'unpack 'chdir
5589 (lambda _ (chdir "httpcore-nio") #t)))))
5590 (inputs
5591 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5592 ("java-hamcrest-core" ,java-hamcrest-core)
5593 ,@(package-inputs java-httpcomponents-httpcore)))
5594 (description "HttpCore is a set of low level HTTP transport components
5595 that can be used to build custom client and server side HTTP services with a
5596 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5597 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5598 NIO.
5599
5600 This package provides the non-blocking I/O model library based on Java
5601 NIO.")))
5602
5603 (define-public java-httpcomponents-httpcore-ab
5604 (package (inherit java-httpcomponents-httpcore)
5605 (name "java-httpcomponents-httpcore-ab")
5606 (arguments
5607 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5608 #:phases
5609 (modify-phases %standard-phases
5610 (add-after 'unpack 'chdir
5611 (lambda _ (chdir "httpcore-ab") #t)))))
5612 (inputs
5613 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5614 ("java-commons-cli" ,java-commons-cli)
5615 ("java-hamcrest-core" ,java-hamcrest-core)
5616 ,@(package-inputs java-httpcomponents-httpcore)))
5617 (synopsis "Apache HttpCore benchmarking tool")
5618 (description "This package provides the HttpCore benchmarking tool. It is
5619 an Apache AB clone based on HttpCore.")))
5620
5621 (define-public java-httpcomponents-httpclient
5622 (package
5623 (name "java-httpcomponents-httpclient")
5624 (version "4.5.3")
5625 (source (origin
5626 (method url-fetch)
5627 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5628 "source/httpcomponents-client-"
5629 version "-src.tar.gz"))
5630 (sha256
5631 (base32
5632 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5633 (build-system ant-build-system)
5634 (arguments
5635 `(#:jar-name "httpcomponents-httpclient.jar"
5636 #:phases
5637 (modify-phases %standard-phases
5638 (add-after 'unpack 'chdir
5639 (lambda _ (chdir "httpclient") #t)))))
5640 (inputs
5641 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5642 ("java-commons-codec" ,java-commons-codec)
5643 ("java-hamcrest-core" ,java-hamcrest-core)
5644 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5645 ("java-mockito" ,java-mockito-1)
5646 ("java-junit" ,java-junit)))
5647 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5648 (synopsis "HTTP client library for Java")
5649 (description "Although the @code{java.net} package provides basic
5650 functionality for accessing resources via HTTP, it doesn't provide the full
5651 flexibility or functionality needed by many applications. @code{HttpClient}
5652 seeks to fill this void by providing an efficient, up-to-date, and
5653 feature-rich package implementing the client side of the most recent HTTP
5654 standards and recommendations.")
5655 (license license:asl2.0)))
5656
5657 (define-public java-httpcomponents-httpmime
5658 (package (inherit java-httpcomponents-httpclient)
5659 (name "java-httpcomponents-httpmime")
5660 (arguments
5661 `(#:jar-name "httpcomponents-httpmime.jar"
5662 #:phases
5663 (modify-phases %standard-phases
5664 (add-after 'unpack 'chdir
5665 (lambda _ (chdir "httpmime") #t)))))
5666 (inputs
5667 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5668 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5669 ("java-junit" ,java-junit)
5670 ("java-hamcrest-core" ,java-hamcrest-core)))))
5671
5672 (define-public java-commons-net
5673 (package
5674 (name "java-commons-net")
5675 (version "3.6")
5676 (source (origin
5677 (method url-fetch)
5678 (uri (string-append "mirror://apache/commons/net/source/"
5679 "commons-net-" version "-src.tar.gz"))
5680 (sha256
5681 (base32
5682 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5683 (build-system ant-build-system)
5684 (arguments
5685 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5686 ;; should be "resources/examples/examples.properties"), but gets "null"
5687 ;; instead.
5688 #:tests? #f
5689 #:jar-name "commons-net.jar"))
5690 (native-inputs
5691 `(("java-junit" ,java-junit)
5692 ("java-hamcrest-core" ,java-hamcrest-core)))
5693 (home-page "https://commons.apache.org/net/")
5694 (synopsis "Client library for many basic Internet protocols")
5695 (description "The Apache Commons Net library implements the client side of
5696 many basic Internet protocols. The purpose of the library is to provide
5697 fundamental protocol access, not higher-level abstractions.")
5698 (license license:asl2.0)))
5699
5700 (define-public java-jsch
5701 (package
5702 (name "java-jsch")
5703 (version "0.1.55")
5704 (source (origin
5705 (method url-fetch)
5706 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5707 version "/jsch-" version ".zip"))
5708 (sha256
5709 (base32
5710 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5711 (build-system ant-build-system)
5712 (arguments
5713 `(#:build-target "dist"
5714 #:tests? #f ; no tests included
5715 #:phases
5716 (modify-phases %standard-phases
5717 (replace 'install (install-jars "dist")))))
5718 (native-inputs
5719 `(("unzip" ,unzip)))
5720 (home-page "http://www.jcraft.com/jsch/")
5721 (synopsis "Pure Java implementation of SSH2")
5722 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5723 to connect to an SSH server and use port forwarding, X11 forwarding, file
5724 transfer, etc., and you can integrate its functionality into your own Java
5725 programs.")
5726 (license license:bsd-3)))
5727
5728 (define-public java-commons-compress
5729 (package
5730 (name "java-commons-compress")
5731 (version "1.13")
5732 (source (origin
5733 (method url-fetch)
5734 (uri (string-append "mirror://apache/commons/compress/source/"
5735 "commons-compress-" version "-src.tar.gz"))
5736 (sha256
5737 (base32
5738 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5739 (build-system ant-build-system)
5740 (arguments
5741 `(#:jar-name "commons-compress.jar"
5742 #:phases
5743 (modify-phases %standard-phases
5744 (add-after 'unpack 'delete-bad-tests
5745 (lambda _
5746 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5747 ;; FIXME: These tests really should not fail. Maybe they are
5748 ;; indicative of problems with our Java packaging work.
5749
5750 ;; This test fails with a null pointer exception.
5751 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5752 ;; This test fails to open test resources.
5753 (delete-file "archivers/zip/ExplodeSupportTest.java")
5754
5755 ;; FIXME: This test adds a dependency on powermock, which is hard to
5756 ;; package at this point.
5757 ;; https://github.com/powermock/powermock
5758 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5759 #t)))))
5760 (inputs
5761 `(("java-junit" ,java-junit)
5762 ("java-hamcrest-core" ,java-hamcrest-core)
5763 ("java-mockito" ,java-mockito-1)
5764 ("java-xz" ,java-xz)))
5765 (home-page "https://commons.apache.org/proper/commons-compress/")
5766 (synopsis "Java library for working with compressed files")
5767 (description "The Apache Commons Compress library defines an API for
5768 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5769 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5770 (license license:asl2.0)))
5771
5772 (define-public java-commons-csv
5773 (package
5774 (name "java-commons-csv")
5775 (version "1.4")
5776 (source (origin
5777 (method url-fetch)
5778 (uri (string-append "mirror://apache/commons/csv/source/"
5779 "commons-csv-" version "-src.tar.gz"))
5780 (sha256
5781 (base32
5782 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5783 (build-system ant-build-system)
5784 (arguments
5785 `(#:jar-name "commons-csv.jar"
5786 #:source-dir "src/main/java"
5787 #:tests? #f)); FIXME: requires java-h2
5788 (inputs
5789 `(("java-hamcrest-core" ,java-hamcrest-core)
5790 ("java-commons-io" ,java-commons-io)
5791 ("java-commons-lang3" ,java-commons-lang3)
5792 ("junit" ,java-junit)))
5793 (home-page "https://commons.apache.org/proper/commons-csv/")
5794 (synopsis "Read and write CSV documents")
5795 (description "Commons CSV reads and writes files in variations of the Comma
5796 Separated Value (CSV) format. The most common CSV formats are predefined in the
5797 CSVFormat class:
5798
5799 @itemize
5800 @item Microsoft Excel
5801 @item Informix UNLOAD
5802 @item Informix UNLOAD CSV
5803 @item MySQL
5804 @item RFC 4180
5805 @item TDF
5806 @end itemize
5807
5808 Custom formats can be created using a fluent style API.")
5809 (license license:asl2.0)))
5810
5811 (define-public java-osgi-annotation
5812 (package
5813 (name "java-osgi-annotation")
5814 (version "6.0.0")
5815 (source (origin
5816 (method url-fetch)
5817 (uri (string-append "https://repo1.maven.org/maven2/"
5818 "org/osgi/org.osgi.annotation/" version "/"
5819 "org.osgi.annotation-" version "-sources.jar"))
5820 (sha256
5821 (base32
5822 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5823 (build-system ant-build-system)
5824 (arguments
5825 `(#:tests? #f ; no tests
5826 #:jar-name "osgi-annotation.jar"))
5827 (home-page "https://www.osgi.org")
5828 (synopsis "Annotation module of OSGi framework")
5829 (description
5830 "OSGi, for Open Services Gateway initiative framework, is a module system
5831 and service platform for the Java programming language. This package contains
5832 the OSGi annotation module, providing additional services to help dynamic
5833 components.")
5834 (license license:asl2.0)))
5835
5836 (define-public java-osgi-core
5837 (package
5838 (name "java-osgi-core")
5839 (version "6.0.0")
5840 (source (origin
5841 (method url-fetch)
5842 (uri (string-append "https://repo1.maven.org/maven2/"
5843 "org/osgi/org.osgi.core/" version "/"
5844 "org.osgi.core-" version "-sources.jar"))
5845 (sha256
5846 (base32
5847 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5848 (build-system ant-build-system)
5849 (arguments
5850 `(#:tests? #f ; no tests
5851 #:jar-name "osgi-core.jar"))
5852 (inputs
5853 `(("java-osgi-annotation" ,java-osgi-annotation)))
5854 (home-page "https://www.osgi.org")
5855 (synopsis "Core module of OSGi framework")
5856 (description
5857 "OSGi, for Open Services Gateway initiative framework, is a module system
5858 and service platform for the Java programming language. This package contains
5859 the OSGi Core module.")
5860 (license license:asl2.0)))
5861
5862 (define-public java-osgi-service-event
5863 (package
5864 (name "java-osgi-service-event")
5865 (version "1.3.1")
5866 (source (origin
5867 (method url-fetch)
5868 (uri (string-append "https://repo1.maven.org/maven2/"
5869 "org/osgi/org.osgi.service.event/"
5870 version "/org.osgi.service.event-"
5871 version "-sources.jar"))
5872 (sha256
5873 (base32
5874 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5875 (build-system ant-build-system)
5876 (arguments
5877 `(#:tests? #f ; no tests
5878 #:jar-name "osgi-service-event.jar"))
5879 (inputs
5880 `(("java-osgi-annotation" ,java-osgi-annotation)
5881 ("java-osgi-core" ,java-osgi-core)))
5882 (home-page "https://www.osgi.org")
5883 (synopsis "OSGi service event module")
5884 (description
5885 "OSGi, for Open Services Gateway initiative framework, is a module system
5886 and service platform for the Java programming language. This package contains
5887 the OSGi @code{org.osgi.service.event} module.")
5888 (license license:asl2.0)))
5889
5890 (define-public java-eclipse-osgi
5891 (package
5892 (name "java-eclipse-osgi")
5893 (version "3.11.3")
5894 (source (origin
5895 (method url-fetch)
5896 (uri (string-append "https://repo1.maven.org/maven2/"
5897 "org/eclipse/platform/org.eclipse.osgi/"
5898 version "/org.eclipse.osgi-"
5899 version "-sources.jar"))
5900 (sha256
5901 (base32
5902 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5903 (build-system ant-build-system)
5904 (arguments
5905 `(#:tests? #f ; no tests included
5906 #:jar-name "eclipse-equinox-osgi.jar"))
5907 (inputs
5908 `(("java-osgi-annotation" ,java-osgi-annotation)))
5909 (home-page "http://www.eclipse.org/equinox/")
5910 (synopsis "Eclipse Equinox OSGi framework")
5911 (description "This package provides an implementation of the OSGi Core
5912 specification.")
5913 (license license:epl1.0)))
5914
5915 (define-public java-eclipse-equinox-common
5916 (package
5917 (name "java-eclipse-equinox-common")
5918 (version "3.10.200")
5919 (source (origin
5920 (method url-fetch)
5921 (uri (string-append "https://repo1.maven.org/maven2/"
5922 "org/eclipse/platform/org.eclipse.equinox.common/"
5923 version "/org.eclipse.equinox.common-"
5924 version "-sources.jar"))
5925 (sha256
5926 (base32
5927 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5928 (build-system ant-build-system)
5929 (arguments
5930 `(#:tests? #f ; no tests included
5931 #:jar-name "eclipse-equinox-common.jar"))
5932 (inputs
5933 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5934 (home-page "http://www.eclipse.org/equinox/")
5935 (synopsis "Common Eclipse runtime")
5936 (description "This package provides the common Eclipse runtime.")
5937 (license license:epl1.0)))
5938
5939 (define-public java-eclipse-core-jobs
5940 (package
5941 (name "java-eclipse-core-jobs")
5942 (version "3.8.0")
5943 (source (origin
5944 (method url-fetch)
5945 (uri (string-append "https://repo1.maven.org/maven2/"
5946 "org/eclipse/platform/org.eclipse.core.jobs/"
5947 version "/org.eclipse.core.jobs-"
5948 version "-sources.jar"))
5949 (sha256
5950 (base32
5951 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5952 (build-system ant-build-system)
5953 (arguments
5954 `(#:tests? #f ; no tests included
5955 #:jar-name "eclipse-core-jobs.jar"))
5956 (inputs
5957 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5958 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5959 (home-page "http://www.eclipse.org/equinox/")
5960 (synopsis "Eclipse jobs mechanism")
5961 (description "This package provides the Eclipse jobs mechanism.")
5962 (license license:epl1.0)))
5963
5964 (define-public java-eclipse-equinox-registry
5965 (package
5966 (name "java-eclipse-equinox-registry")
5967 (version "3.6.100")
5968 (source (origin
5969 (method url-fetch)
5970 (uri (string-append "https://repo1.maven.org/maven2/"
5971 "org/eclipse/platform/org.eclipse.equinox.registry/"
5972 version "/org.eclipse.equinox.registry-"
5973 version "-sources.jar"))
5974 (sha256
5975 (base32
5976 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5977 (build-system ant-build-system)
5978 (arguments
5979 `(#:tests? #f ; no tests included
5980 #:jar-name "eclipse-equinox-registry.jar"))
5981 (inputs
5982 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5983 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5984 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5985 (home-page "http://www.eclipse.org/equinox/")
5986 (synopsis "Eclipse extension registry support")
5987 (description "This package provides support for the Eclipse extension
5988 registry.")
5989 (license license:epl1.0)))
5990
5991 (define-public java-eclipse-equinox-app
5992 (package
5993 (name "java-eclipse-equinox-app")
5994 (version "1.3.400")
5995 (source (origin
5996 (method url-fetch)
5997 (uri (string-append "https://repo1.maven.org/maven2/"
5998 "org/eclipse/platform/org.eclipse.equinox.app/"
5999 version "/org.eclipse.equinox.app-"
6000 version "-sources.jar"))
6001 (sha256
6002 (base32
6003 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6004 (build-system ant-build-system)
6005 (arguments
6006 `(#:tests? #f ; no tests included
6007 #:jar-name "eclipse-equinox-app.jar"))
6008 (inputs
6009 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6010 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6011 ("java-eclipse-osgi" ,java-eclipse-osgi)
6012 ("java-osgi-service-event" ,java-osgi-service-event)))
6013 (home-page "http://www.eclipse.org/equinox/")
6014 (synopsis "Equinox application container")
6015 (description "This package provides the Equinox application container for
6016 Eclipse.")
6017 (license license:epl1.0)))
6018
6019 (define-public java-eclipse-equinox-preferences
6020 (package
6021 (name "java-eclipse-equinox-preferences")
6022 (version "3.6.1")
6023 (source (origin
6024 (method url-fetch)
6025 (uri (string-append "https://repo1.maven.org/maven2/"
6026 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6027 version "/org.eclipse.equinox.preferences-"
6028 version "-sources.jar"))
6029 (sha256
6030 (base32
6031 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6032 (build-system ant-build-system)
6033 (arguments
6034 `(#:tests? #f ; no tests included
6035 #:jar-name "eclipse-equinox-preferences.jar"))
6036 (inputs
6037 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6038 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6039 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6040 (home-page "http://www.eclipse.org/equinox/")
6041 (synopsis "Eclipse preferences mechanism")
6042 (description "This package provides the Eclipse preferences mechanism with
6043 the module @code{org.eclipse.equinox.preferences}.")
6044 (license license:epl1.0)))
6045
6046 (define-public java-eclipse-core-contenttype
6047 (package
6048 (name "java-eclipse-core-contenttype")
6049 (version "3.5.100")
6050 (source (origin
6051 (method url-fetch)
6052 (uri (string-append "https://repo1.maven.org/maven2/"
6053 "org/eclipse/platform/org.eclipse.core.contenttype/"
6054 version "/org.eclipse.core.contenttype-"
6055 version "-sources.jar"))
6056 (sha256
6057 (base32
6058 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6059 (build-system ant-build-system)
6060 (arguments
6061 `(#:tests? #f ; no tests included
6062 #:jar-name "eclipse-core-contenttype.jar"))
6063 (inputs
6064 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6065 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6066 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6067 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6068 (home-page "http://www.eclipse.org/")
6069 (synopsis "Eclipse content mechanism")
6070 (description "This package provides the Eclipse content mechanism in the
6071 @code{org.eclipse.core.contenttype} module.")
6072 (license license:epl1.0)))
6073
6074 (define-public java-eclipse-core-runtime
6075 (package
6076 (name "java-eclipse-core-runtime")
6077 (version "3.15.100")
6078 (source (origin
6079 (method url-fetch)
6080 (uri (string-append "https://repo1.maven.org/maven2/"
6081 "org/eclipse/platform/org.eclipse.core.runtime/"
6082 version "/org.eclipse.core.runtime-"
6083 version "-sources.jar"))
6084 (sha256
6085 (base32
6086 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6087 (build-system ant-build-system)
6088 (arguments
6089 `(#:tests? #f ; no tests included
6090 #:jar-name "eclipse-core-runtime.jar"))
6091 (inputs
6092 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6093 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6094 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6095 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6096 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6097 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6098 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6099 (home-page "https://www.eclipse.org/")
6100 (synopsis "Eclipse core runtime")
6101 (description "This package provides the Eclipse core runtime with the
6102 module @code{org.eclipse.core.runtime}.")
6103 (license license:epl1.0)))
6104
6105 (define-public java-eclipse-core-filesystem
6106 (package
6107 (name "java-eclipse-core-filesystem")
6108 (version "1.6.1")
6109 (source (origin
6110 (method url-fetch)
6111 (uri (string-append "https://repo1.maven.org/maven2/"
6112 "org/eclipse/platform/org.eclipse.core.filesystem/"
6113 version "/org.eclipse.core.filesystem-"
6114 version "-sources.jar"))
6115 (sha256
6116 (base32
6117 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6118 (build-system ant-build-system)
6119 (arguments
6120 `(#:tests? #f ; no tests included
6121 #:jar-name "eclipse-core-filesystem.jar"))
6122 (inputs
6123 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6124 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6125 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6126 (home-page "https://www.eclipse.org/")
6127 (synopsis "Eclipse core file system")
6128 (description "This package provides the Eclipse core file system with the
6129 module @code{org.eclipse.core.filesystem}.")
6130 (license license:epl1.0)))
6131
6132 (define-public java-eclipse-core-expressions
6133 (package
6134 (name "java-eclipse-core-expressions")
6135 (version "3.5.100")
6136 (source (origin
6137 (method url-fetch)
6138 (uri (string-append "https://repo1.maven.org/maven2/"
6139 "org/eclipse/platform/org.eclipse.core.expressions/"
6140 version "/org.eclipse.core.expressions-"
6141 version "-sources.jar"))
6142 (sha256
6143 (base32
6144 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6145 (build-system ant-build-system)
6146 (arguments
6147 `(#:tests? #f ; no tests included
6148 #:jar-name "eclipse-core-expressions.jar"))
6149 (inputs
6150 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6151 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6152 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6153 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6154 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6155 (home-page "https://www.eclipse.org/")
6156 (synopsis "Eclipse core expression language")
6157 (description "This package provides the Eclipse core expression language
6158 with the @code{org.eclipse.core.expressions} module.")
6159 (license license:epl1.0)))
6160
6161 (define-public java-eclipse-core-variables
6162 (package
6163 (name "java-eclipse-core-variables")
6164 (version "3.3.0")
6165 (source (origin
6166 (method url-fetch)
6167 (uri (string-append "https://repo1.maven.org/maven2/"
6168 "org/eclipse/platform/org.eclipse.core.variables/"
6169 version "/org.eclipse.core.variables-"
6170 version "-sources.jar"))
6171 (sha256
6172 (base32
6173 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6174 (build-system ant-build-system)
6175 (arguments
6176 `(#:tests? #f ; no tests included
6177 #:jar-name "eclipse-core-variables.jar"))
6178 (inputs
6179 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6180 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6181 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6182 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6183 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6184 (home-page "https://www.eclipse.org/platform")
6185 (synopsis "Eclipse core variables")
6186 (description "This package provides the Eclipse core variables module
6187 @code{org.eclipse.core.variables}.")
6188 (license license:epl1.0)))
6189
6190 (define-public java-eclipse-ant-core
6191 (package
6192 (name "java-eclipse-ant-core")
6193 (version "3.4.100")
6194 (source (origin
6195 (method url-fetch)
6196 (uri (string-append "https://repo1.maven.org/maven2/"
6197 "org/eclipse/platform/org.eclipse.ant.core/"
6198 version "/org.eclipse.ant.core-"
6199 version "-sources.jar"))
6200 (sha256
6201 (base32
6202 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6203 (build-system ant-build-system)
6204 (arguments
6205 `(#:tests? #f ; no tests included
6206 #:jar-name "eclipse-ant-core.jar"))
6207 (inputs
6208 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6209 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6210 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6211 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6212 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6213 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6214 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6215 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6216 (home-page "https://www.eclipse.org/platform")
6217 (synopsis "Ant build tool core libraries")
6218 (description "This package provides the ant build tool core libraries with
6219 the module @code{org.eclipse.ant.core}.")
6220 (license license:epl1.0)))
6221
6222 (define-public java-eclipse-core-resources
6223 (package
6224 (name "java-eclipse-core-resources")
6225 (version "3.13.200")
6226 (source (origin
6227 (method url-fetch)
6228 (uri (string-append "https://repo1.maven.org/maven2/"
6229 "org/eclipse/platform/org.eclipse.core.resources/"
6230 version "/org.eclipse.core.resources-"
6231 version "-sources.jar"))
6232 (sha256
6233 (base32
6234 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6235 (build-system ant-build-system)
6236 (arguments
6237 `(#:tests? #f ; no tests included
6238 #:jar-name "eclipse-core-resources.jar"))
6239 (inputs
6240 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6241 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6242 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6243 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6244 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6245 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6246 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6247 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6248 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6249 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6250 (home-page "https://www.eclipse.org/")
6251 (synopsis "Eclipse core resource management")
6252 (description "This package provides the Eclipse core resource management
6253 module @code{org.eclipse.core.resources}.")
6254 (license license:epl1.0)))
6255
6256 (define-public java-eclipse-compare-core
6257 (package
6258 (name "java-eclipse-compare-core")
6259 (version "3.6.0")
6260 (source (origin
6261 (method url-fetch)
6262 (uri (string-append "https://repo1.maven.org/maven2/"
6263 "org/eclipse/platform/org.eclipse.compare.core/"
6264 version "/org.eclipse.compare.core-"
6265 version "-sources.jar"))
6266 (sha256
6267 (base32
6268 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6269 (build-system ant-build-system)
6270 (arguments
6271 `(#:tests? #f ; no tests included
6272 #:jar-name "eclipse-compare-core.jar"))
6273 (inputs
6274 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6275 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6276 ("java-eclipse-osgi" ,java-eclipse-osgi)
6277 ("java-icu4j" ,java-icu4j)))
6278 (home-page "https://www.eclipse.org/")
6279 (synopsis "Eclipse core compare support")
6280 (description "This package provides the Eclipse core compare support
6281 module @code{org.eclipse.compare.core}.")
6282 (license license:epl1.0)))
6283
6284 (define-public java-eclipse-team-core
6285 (package
6286 (name "java-eclipse-team-core")
6287 (version "3.8.0")
6288 (source (origin
6289 (method url-fetch)
6290 (uri (string-append "https://repo1.maven.org/maven2/"
6291 "org/eclipse/platform/org.eclipse.team.core/"
6292 version "/org.eclipse.team.core-"
6293 version "-sources.jar"))
6294 (sha256
6295 (base32
6296 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6297 (build-system ant-build-system)
6298 (arguments
6299 `(#:tests? #f ; no tests included
6300 #:jar-name "eclipse-team-core.jar"))
6301 (inputs
6302 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6303 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6304 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6305 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6306 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6307 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6308 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6309 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6310 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6311 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6312 (home-page "https://www.eclipse.org/platform")
6313 (synopsis "Eclipse team support core")
6314 (description "This package provides the Eclipse team support core module
6315 @code{org.eclipse.team.core}.")
6316 (license license:epl1.0)))
6317
6318 (define-public java-eclipse-core-commands
6319 (package
6320 (name "java-eclipse-core-commands")
6321 (version "3.8.1")
6322 (source (origin
6323 (method url-fetch)
6324 (uri (string-append "https://repo1.maven.org/maven2/"
6325 "org/eclipse/platform/org.eclipse.core.commands/"
6326 version "/org.eclipse.core.commands-"
6327 version "-sources.jar"))
6328 (sha256
6329 (base32
6330 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6331 (build-system ant-build-system)
6332 (arguments
6333 `(#:tests? #f ; no tests included
6334 #:jar-name "eclipse-core-commands.jar"))
6335 (inputs
6336 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6337 (home-page "https://www.eclipse.org/platform")
6338 (synopsis "Eclipse core commands")
6339 (description "This package provides Eclipse core commands in the module
6340 @code{org.eclipse.core.commands}.")
6341 (license license:epl1.0)))
6342
6343 (define-public java-eclipse-text
6344 (package
6345 (name "java-eclipse-text")
6346 (version "3.6.0")
6347 (source (origin
6348 (method url-fetch)
6349 (uri (string-append "https://repo1.maven.org/maven2/"
6350 "org/eclipse/platform/org.eclipse.text/"
6351 version "/org.eclipse.text-"
6352 version "-sources.jar"))
6353 (sha256
6354 (base32
6355 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6356 (build-system ant-build-system)
6357 (arguments
6358 `(#:tests? #f ; no tests included
6359 #:jar-name "eclipse-text.jar"
6360 #:phases
6361 (modify-phases %standard-phases
6362 ;; When creating a new category we must make sure that the new list
6363 ;; matches List<Position>. By default it seems to be too generic
6364 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6365 ;; Without this we get this error:
6366 ;;
6367 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6368 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6369 ;; [javac] fPositions.put(category, new ArrayList<>());
6370 ;; [javac] ^
6371 ;; [javac] required: String,List<Position>
6372 ;; [javac] found: String,ArrayList<Object>
6373 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6374 ;; to List<Position> by method invocation conversion
6375 ;; [javac] where K,V are type-variables:
6376 ;; [javac] K extends Object declared in interface Map
6377 ;; [javac] V extends Object declared in interface Map
6378 ;;
6379 ;; I don't know if this is a good fix. I suspect it is not, but it
6380 ;; seems to work.
6381 (add-after 'unpack 'fix-compilation-error
6382 (lambda _
6383 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6384 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6385 "Positions.put(category, new ArrayList<Position>());"))
6386 #t)))))
6387 (inputs
6388 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6389 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6390 ("java-icu4j" ,java-icu4j)))
6391 (home-page "http://www.eclipse.org/platform")
6392 (synopsis "Eclipse text library")
6393 (description "Platform Text is part of the Platform UI project and
6394 provides the basic building blocks for text and text editors within Eclipse
6395 and contributes the Eclipse default text editor.")
6396 (license license:epl1.0)))
6397
6398 (define-public java-eclipse-jdt-core
6399 (package
6400 (name "java-eclipse-jdt-core")
6401 (version "3.16.0")
6402 (source (origin
6403 (method url-fetch)
6404 (uri (string-append "https://repo1.maven.org/maven2/"
6405 "org/eclipse/jdt/org.eclipse.jdt.core/"
6406 version "/org.eclipse.jdt.core-"
6407 version "-sources.jar"))
6408 (sha256
6409 (base32
6410 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6411 (build-system ant-build-system)
6412 (arguments
6413 `(#:tests? #f ; no tests included
6414 #:jar-name "eclipse-jdt-core.jar"
6415 #:phases
6416 (modify-phases %standard-phases
6417 (add-after 'unpack 'move-sources
6418 (lambda _
6419 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6420 (for-each (lambda (file)
6421 (install-file file (string-append "../" (dirname file))))
6422 (find-files "." ".*")))
6423 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6424 #t))
6425 (add-before 'build 'copy-resources
6426 (lambda _
6427 (with-directory-excursion "src"
6428 (for-each (lambda (file)
6429 (install-file file (string-append "../build/classes/" (dirname file))))
6430 (find-files "." ".*.(props|properties|rsc)")))
6431 #t)))))
6432 (inputs
6433 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6434 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6435 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6436 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6437 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6438 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6439 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6440 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6441 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6442 ("java-eclipse-osgi" ,java-eclipse-osgi)
6443 ("java-eclipse-text" ,java-eclipse-text)))
6444 (home-page "https://www.eclipse.org/jdt")
6445 (synopsis "Java development tools core libraries")
6446 (description "This package provides the core libraries of the Eclipse Java
6447 development tools.")
6448 (license license:epl1.0)))
6449
6450 (define-public java-eclipse-jdt-compiler-apt
6451 (package
6452 (name "java-eclipse-jdt-compiler-apt")
6453 (version "1.3.400")
6454 (source (origin
6455 (method url-fetch)
6456 (uri (string-append "https://repo1.maven.org/maven2/"
6457 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6458 version "/org.eclipse.jdt.compiler.apt-"
6459 version "-sources.jar"))
6460 (sha256
6461 (base32
6462 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6463 (build-system ant-build-system)
6464 (arguments
6465 `(#:tests? #f ; no tests included
6466 #:jar-name "eclipse-jdt-compiler-apt.jar"
6467 #:jdk ,openjdk11))
6468 (inputs
6469 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6470 (home-page "https://www.eclipse.org/jdt/apt/")
6471 (synopsis "Annotation processing tool")
6472 (description "APT stands for Annotation Processing Tool. APT provides a
6473 means for generating files and compiling new Java classes based on annotations
6474 found in your source code.")
6475 (license license:epl2.0)))
6476
6477 (define-public java-javax-mail
6478 (package
6479 (name "java-javax-mail")
6480 (version "1.5.6")
6481 (source (origin
6482 (method url-fetch)
6483 (uri (string-append "https://repo1.maven.org/maven2/"
6484 "com/sun/mail/javax.mail/"
6485 version "/javax.mail-"
6486 version "-sources.jar"))
6487 (sha256
6488 (base32
6489 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6490 (build-system ant-build-system)
6491 (arguments
6492 `(#:tests? #f ; no tests
6493 #:jar-name "javax-mail.jar"))
6494 (home-page "https://javamail.java.net")
6495 (synopsis "Reference implementation of the JavaMail API")
6496 (description
6497 "This package provides versions of the JavaMail API implementation, IMAP,
6498 SMTP, and POP3 service providers, some examples, and documentation for the
6499 JavaMail API.")
6500 ;; GPLv2 only with "classpath exception".
6501 (license license:gpl2)))
6502
6503 (define-public java-log4j-api
6504 (package
6505 (name "java-log4j-api")
6506 (version "2.4.1")
6507 (source (origin
6508 (method url-fetch)
6509 (uri (string-append "mirror://apache/logging/log4j/" version
6510 "/apache-log4j-" version "-src.tar.gz"))
6511 (sha256
6512 (base32
6513 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6514 (build-system ant-build-system)
6515 (arguments
6516 `(#:tests? #f ; tests require unpackaged software
6517 #:jar-name "log4j-api.jar"
6518 #:make-flags
6519 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6520 "/share/java"))
6521 #:phases
6522 (modify-phases %standard-phases
6523 (add-after 'unpack 'enter-dir
6524 (lambda _ (chdir "log4j-api") #t))
6525 ;; FIXME: The tests require additional software that has not been
6526 ;; packaged yet, such as
6527 ;; * org.apache.maven
6528 ;; * org.apache.felix
6529 (add-after 'enter-dir 'delete-tests
6530 (lambda _ (delete-file-recursively "src/test") #t)))))
6531 (inputs
6532 `(("java-osgi-core" ,java-osgi-core)
6533 ("java-hamcrest-core" ,java-hamcrest-core)
6534 ("java-junit" ,java-junit)))
6535 (home-page "https://logging.apache.org/log4j/2.x/")
6536 (synopsis "API module of the Log4j logging framework for Java")
6537 (description
6538 "This package provides the API module of the Log4j logging framework for
6539 Java.")
6540 (license license:asl2.0)))
6541
6542 (define-public java-log4j-core
6543 (package
6544 (inherit java-log4j-api)
6545 (name "java-log4j-core")
6546 (inputs
6547 `(("java-osgi-core" ,java-osgi-core)
6548 ("java-hamcrest-core" ,java-hamcrest-core)
6549 ("java-log4j-api" ,java-log4j-api)
6550 ("java-mail" ,java-mail)
6551 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6552 ("java-lmax-disruptor" ,java-lmax-disruptor)
6553 ("java-kafka" ,java-kafka-clients)
6554 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6555 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6556 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6557 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6558 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6559 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6560 ("java-commons-compress" ,java-commons-compress)
6561 ("java-commons-csv" ,java-commons-csv)
6562 ("java-jeromq" ,java-jeromq)
6563 ("java-junit" ,java-junit)))
6564 (native-inputs
6565 `(("hamcrest" ,java-hamcrest-all)
6566 ("java-commons-io" ,java-commons-io)
6567 ("java-commons-lang3" ,java-commons-lang3)
6568 ("slf4j" ,java-slf4j-api)))
6569 (arguments
6570 `(#:tests? #f ; tests require more dependencies
6571 #:test-dir "src/test"
6572 #:source-dir "src/main/java"
6573 #:jar-name "log4j-core.jar"
6574 #:jdk ,icedtea-8
6575 #:make-flags
6576 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6577 "/share/java"))
6578 #:phases
6579 (modify-phases %standard-phases
6580 (add-after 'unpack 'enter-dir
6581 (lambda _ (chdir "log4j-core") #t)))))
6582 (synopsis "Core component of the Log4j framework")
6583 (description "This package provides the core component of the Log4j
6584 logging framework for Java.")))
6585
6586 (define-public java-log4j-1.2-api
6587 (package
6588 (inherit java-log4j-api)
6589 (name "java-log4j-1.2-api")
6590 (arguments
6591 `(#:jar-name "java-log4j-1.2-api.jar"
6592 #:source-dir "log4j-1.2-api/src/main/java"
6593 #:jdk ,icedtea-8
6594 ;; Tests require maven-model (and other maven subprojects), which is a
6595 ;; cyclic dependency.
6596 #:tests? #f))
6597 (inputs
6598 `(("log4j-api" ,java-log4j-api)
6599 ("log4j-core" ,java-log4j-core)
6600 ("osgi-core" ,java-osgi-core)
6601 ("eclipse-osgi" ,java-eclipse-osgi)
6602 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6603
6604 (define-public java-commons-cli
6605 (package
6606 (name "java-commons-cli")
6607 (version "1.4")
6608 (source (origin
6609 (method url-fetch)
6610 (uri (string-append "mirror://apache/commons/cli/source/"
6611 "commons-cli-" version "-src.tar.gz"))
6612 (sha256
6613 (base32
6614 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6615 (build-system ant-build-system)
6616 ;; TODO: javadoc
6617 (arguments
6618 `(#:jar-name "commons-cli.jar"))
6619 (native-inputs
6620 `(("java-junit" ,java-junit)
6621 ("java-hamcrest-core" ,java-hamcrest-core)))
6622 (home-page "https://commons.apache.org/cli/")
6623 (synopsis "Command line arguments and options parsing library")
6624 (description "The Apache Commons CLI library provides an API for parsing
6625 command line options passed to programs. It is also able to print help
6626 messages detailing the options available for a command line tool.
6627
6628 Commons CLI supports different types of options:
6629
6630 @itemize
6631 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6632 @item GNU like long options (ie. du --human-readable --max-depth=1)
6633 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6634 @item Short options with value attached (ie. gcc -O2 foo.c)
6635 @item long options with single hyphen (ie. ant -projecthelp)
6636 @end itemize
6637
6638 This is a part of the Apache Commons Project.")
6639 (license license:asl2.0)))
6640
6641 (define-public java-commons-codec
6642 (package
6643 (name "java-commons-codec")
6644 (version "1.10")
6645 (source (origin
6646 (method url-fetch)
6647 (uri (string-append "mirror://apache/commons/codec/source/"
6648 "commons-codec-" version "-src.tar.gz"))
6649 (sha256
6650 (base32
6651 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6652 (build-system ant-build-system)
6653 (outputs '("out" "doc"))
6654 (arguments
6655 `(#:test-target "test"
6656 #:make-flags
6657 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6658 (junit (assoc-ref %build-inputs "java-junit")))
6659 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6660 (string-append "-Dhamcrest.jar=" hamcrest
6661 "/share/java/hamcrest-core.jar")
6662 ;; Do not append version to jar.
6663 "-Dfinal.name=commons-codec"))
6664 #:phases
6665 (modify-phases %standard-phases
6666 (add-after 'build 'build-javadoc ant-build-javadoc)
6667 (replace 'install (install-jars "dist"))
6668 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6669 (native-inputs
6670 `(("java-junit" ,java-junit)
6671 ("java-hamcrest-core" ,java-hamcrest-core)))
6672 (home-page "https://commons.apache.org/codec/")
6673 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6674 (description "The codec package contains simple encoder and decoders for
6675 various formats such as Base64 and Hexadecimal. In addition to these widely
6676 used encoders and decoders, the codec package also maintains a collection of
6677 phonetic encoding utilities.
6678
6679 This is a part of the Apache Commons Project.")
6680 (license license:asl2.0)))
6681
6682 (define-public java-commons-daemon
6683 (package
6684 (name "java-commons-daemon")
6685 (version "1.1.0")
6686 (source (origin
6687 (method url-fetch)
6688 (uri (string-append "mirror://apache/commons/daemon/source/"
6689 "commons-daemon-" version "-src.tar.gz"))
6690 (sha256
6691 (base32
6692 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
6693 (build-system ant-build-system)
6694 (arguments
6695 `(#:test-target "test"
6696 #:phases
6697 (modify-phases %standard-phases
6698 (add-after 'build 'build-javadoc ant-build-javadoc)
6699 (replace 'install (install-jars "dist"))
6700 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6701 (native-inputs
6702 `(("java-junit" ,java-junit)))
6703 (home-page "https://commons.apache.org/daemon/")
6704 (synopsis "Library to launch Java applications as daemons")
6705 (description "The Daemon package from Apache Commons can be used to
6706 implement Java applications which can be launched as daemons. For example the
6707 program will be notified about a shutdown so that it can perform cleanup tasks
6708 before its process of execution is destroyed by the operation system.
6709
6710 This package contains the Java library. You will also need the actual binary
6711 for your architecture which is provided by the jsvc package.
6712
6713 This is a part of the Apache Commons Project.")
6714 (license license:asl2.0)))
6715
6716 (define-public java-javaewah
6717 (package
6718 (name "java-javaewah")
6719 (version "1.1.6")
6720 (source (origin
6721 (method url-fetch)
6722 (uri (string-append "https://github.com/lemire/javaewah/"
6723 "archive/JavaEWAH-" version ".tar.gz"))
6724 (sha256
6725 (base32
6726 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6727 (build-system ant-build-system)
6728 (arguments `(#:jar-name "javaewah.jar"))
6729 (inputs
6730 `(("java-junit" ,java-junit)
6731 ("java-hamcrest-core" ,java-hamcrest-core)))
6732 (home-page "https://github.com/lemire/javaewah")
6733 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6734 (description "This is a word-aligned compressed variant of the Java
6735 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6736 compression scheme. It can be used to implement bitmap indexes.
6737
6738 The goal of word-aligned compression is not to achieve the best compression,
6739 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6740 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6741 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6742 @code{BitSet} class by Sun).")
6743 ;; GPL2.0 derivates are explicitly allowed.
6744 (license license:asl2.0)))
6745
6746 (define-public java-slf4j-api
6747 (package
6748 (name "java-slf4j-api")
6749 (version "1.7.25")
6750 (source (origin
6751 (method url-fetch)
6752 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6753 version ".tar.gz"))
6754 (sha256
6755 (base32
6756 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6757 (modules '((guix build utils)))
6758 ;; Delete bundled jars.
6759 (snippet
6760 '(begin
6761 (for-each delete-file (find-files "." "\\.jar$"))
6762 #t))))
6763 (build-system ant-build-system)
6764 (arguments
6765 `(#:jar-name "slf4j-api.jar"
6766 #:source-dir "slf4j-api/src/main"
6767 #:test-dir "slf4j-api/src/test"
6768 #:phases
6769 (modify-phases %standard-phases
6770 (add-after 'build 'regenerate-jar
6771 (lambda _
6772 ;; pom.xml ignores these files in the jar creation process. If we don't,
6773 ;; we get the error "This code should have never made it into slf4j-api.jar"
6774 (delete-file-recursively "build/classes/org/slf4j/impl")
6775 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6776 "build/classes" ".")))
6777 (add-before 'check 'dont-test-abstract-classes
6778 (lambda _
6779 ;; abstract classes are not meant to be run with junit
6780 (substitute* "build.xml"
6781 (("<include name=\"\\*\\*/\\*Test.java\" />")
6782 (string-append "<include name=\"**/*Test.java\" />"
6783 "<exclude name=\"**/MultithreadedInitializationTest"
6784 ".java\" />")))
6785 #t)))))
6786 (inputs
6787 `(("java-junit" ,java-junit)
6788 ("java-hamcrest-core" ,java-hamcrest-core)))
6789 (home-page "https://www.slf4j.org/")
6790 (synopsis "Simple logging facade for Java")
6791 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6792 simple facade or abstraction for various logging
6793 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6794 allowing the end user to plug in the desired logging framework at deployment
6795 time.")
6796 (license license:expat)))
6797
6798 (define java-slf4j-api-bootstrap
6799 (package
6800 (inherit java-slf4j-api)
6801 (name "java-slf4j-api-bootstrap")
6802 (inputs `())
6803 (arguments
6804 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6805 ((#:tests? _ #f) #f)))))
6806
6807 (define-public java-slf4j-simple
6808 (package
6809 (name "java-slf4j-simple")
6810 (version "1.7.25")
6811 (source (package-source java-slf4j-api))
6812 (build-system ant-build-system)
6813 (arguments
6814 `(#:jar-name "slf4j-simple.jar"
6815 #:source-dir "slf4j-simple/src/main"
6816 #:test-dir "slf4j-simple/src/test"
6817 #:phases
6818 (modify-phases %standard-phases
6819 ;; The tests need some test classes from slf4j-api
6820 (add-before 'check 'build-slf4j-api-test-helpers
6821 (lambda _
6822 ;; Add current dir to CLASSPATH ...
6823 (setenv "CLASSPATH"
6824 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6825 ;; ... and build test helper classes here:
6826 (apply invoke
6827 `("javac" "-d" "."
6828 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6829 (inputs
6830 `(("java-junit" ,java-junit)
6831 ("java-hamcrest-core" ,java-hamcrest-core)
6832 ("java-slf4j-api" ,java-slf4j-api)))
6833 (home-page "https://www.slf4j.org/")
6834 (synopsis "Simple implementation of simple logging facade for Java")
6835 (description "SLF4J binding for the Simple implementation, which outputs
6836 all events to System.err. Only messages of level INFO and higher are
6837 printed.")
6838 (license license:expat)))
6839
6840 (define-public antlr2
6841 (package
6842 (name "antlr2")
6843 (version "2.7.7")
6844 (source (origin
6845 (method url-fetch)
6846 (uri (string-append "https://www.antlr2.org/download/antlr-"
6847 version ".tar.gz"))
6848 (sha256
6849 (base32
6850 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6851 (modules '((guix build utils)))
6852 (snippet
6853 '(begin
6854 (delete-file "antlr.jar")
6855 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6856 (("#include <map>")
6857 (string-append
6858 "#include <map>\n"
6859 "#define EOF (-1)\n"
6860 "#include <strings.h>")))
6861 (substitute* "configure"
6862 (("/bin/sh") "sh"))
6863 #t))))
6864 (build-system gnu-build-system)
6865 (arguments
6866 `(#:tests? #f ; no test target
6867 #:imported-modules ((guix build ant-build-system)
6868 (guix build syscalls)
6869 ,@%gnu-build-system-modules)
6870 #:modules (((guix build ant-build-system) #:prefix ant:)
6871 (guix build gnu-build-system)
6872 (guix build utils))
6873 #:phases
6874 (modify-phases %standard-phases
6875 (add-after 'install 'strip-jar-timestamps
6876 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6877 (add-before 'configure 'fix-timestamp
6878 (lambda _
6879 (substitute* "configure"
6880 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6881 #t))
6882 (add-after 'configure 'fix-bin-ls
6883 (lambda _
6884 (substitute* (find-files "." "Makefile")
6885 (("/bin/ls") "ls"))
6886 #t)))))
6887 (native-inputs
6888 `(("which" ,which)
6889 ("zip" ,zip)
6890 ("java" ,icedtea "jdk")))
6891 (inputs
6892 `(("java" ,icedtea)))
6893 (home-page "https://www.antlr2.org")
6894 (synopsis "Framework for constructing recognizers, compilers, and translators")
6895 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6896 is a language tool that provides a framework for constructing recognizers,
6897 compilers, and translators from grammatical descriptions containing Java, C#,
6898 C++, or Python actions. ANTLR provides excellent support for tree construction,
6899 tree walking, and translation.")
6900 (license license:public-domain)))
6901
6902 (define-public java-stringtemplate-3
6903 (package
6904 (name "java-stringtemplate")
6905 (version "3.2.1")
6906 (source (origin
6907 (method url-fetch)
6908 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6909 "gh-pages/download/stringtemplate-"
6910 version ".tar.gz"))
6911 (sha256
6912 (base32
6913 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6914 (build-system ant-build-system)
6915 (arguments
6916 `(#:jar-name (string-append ,name "-" ,version ".jar")
6917 #:test-dir "test"
6918 #:modules ((guix build ant-build-system)
6919 (guix build utils)
6920 (srfi srfi-1))
6921 #:phases
6922 (modify-phases %standard-phases
6923 (add-before 'check 'fix-tests
6924 (lambda _
6925 (substitute* "build.xml"
6926 (("\\$\\{test.home\\}/java")
6927 "${test.home}/org"))
6928 #t))
6929 (add-before 'build 'generate-grammar
6930 (lambda _
6931 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6932 (for-each (lambda (file)
6933 (format #t "~a\n" file)
6934 (invoke "antlr" file))
6935 '("template.g" "angle.bracket.template.g" "action.g"
6936 "eval.g" "group.g" "interface.g")))
6937 #t)))))
6938 (native-inputs
6939 `(("antlr" ,antlr2)
6940 ("java-junit" ,java-junit)))
6941 (home-page "https://www.stringtemplate.org")
6942 (synopsis "Template engine to generate formatted text output")
6943 (description "StringTemplate is a java template engine (with ports for C#,
6944 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6945 or any other formatted text output. StringTemplate is particularly good at
6946 code generators, multiple site skins, and internationalization / localization.
6947 StringTemplate also powers ANTLR.")
6948 (license license:bsd-3)))
6949
6950 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6951 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6952 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6953 ;; of antlr3 at runtime.
6954 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6955 ;; This version of ST4 is sufficient for the latest antlr3.
6956 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6957 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6958 ;; against the latest ST4.
6959 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6960 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6961 ;; only grammar files with the antlr2 syntax.
6962 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6963
6964 (define-public java-stringtemplate
6965 (package (inherit java-stringtemplate-3)
6966 (name "java-stringtemplate")
6967 (version "4.0.8")
6968 (source (origin
6969 (method url-fetch)
6970 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6971 version ".tar.gz"))
6972 (file-name (string-append name "-" version ".tar.gz"))
6973 (sha256
6974 (base32
6975 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6976 (build-system ant-build-system)
6977 (arguments
6978 `(#:jar-name (string-append ,name "-" ,version ".jar")
6979 #:tests? #f ; FIXME: tests fail for unknown reasons
6980 #:test-dir "test"
6981 #:modules ((guix build ant-build-system)
6982 (guix build utils)
6983 (srfi srfi-1))
6984 #:phases
6985 (modify-phases %standard-phases
6986 (add-before 'check 'fix-test-target
6987 (lambda _
6988 (substitute* "build.xml"
6989 (("\\$\\{test.home\\}/java") "${test.home}/")
6990 (("\\*Test.java") "Test*.java"))
6991 #t))
6992 (add-before 'build 'generate-grammar
6993 (lambda _
6994 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6995 (for-each (lambda (file)
6996 (format #t "~a\n" file)
6997 (invoke "antlr3" file))
6998 '("STParser.g" "Group.g" "CodeGenerator.g")))
6999 #t)))))
7000 (inputs
7001 `(("antlr3" ,antlr3-bootstrap)
7002 ("antlr2" ,antlr2)
7003 ("java-stringtemplate" ,java-stringtemplate-3)
7004 ("java-junit" ,java-junit)))))
7005
7006 (define java-stringtemplate-4.0.6
7007 (package (inherit java-stringtemplate)
7008 (name "java-stringtemplate")
7009 (version "4.0.6")
7010 (source (origin
7011 (method url-fetch)
7012 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7013 version ".tar.gz"))
7014 (file-name (string-append name "-" version ".tar.gz"))
7015 (sha256
7016 (base32
7017 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7018 (inputs
7019 `(("antlr3" ,antlr3-3.3)
7020 ("antlr2" ,antlr2)
7021 ("java-stringtemplate" ,java-stringtemplate-3)))))
7022
7023 (define-public antlr3
7024 (package
7025 (name "antlr3")
7026 (version "3.5.2")
7027 (source (origin
7028 (method url-fetch)
7029 (uri (string-append "https://github.com/antlr/antlr3/archive/"
7030 version ".tar.gz"))
7031 (file-name (string-append name "-" version ".tar.gz"))
7032 (sha256
7033 (base32
7034 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
7035 (build-system ant-build-system)
7036 (arguments
7037 `(#:jar-name (string-append ,name "-" ,version ".jar")
7038 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7039 #:tests? #f
7040 #:phases
7041 (modify-phases %standard-phases
7042 (add-after 'install 'bin-install
7043 (lambda* (#:key inputs outputs #:allow-other-keys)
7044 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7045 (bin (string-append (assoc-ref outputs "out") "/bin")))
7046 (mkdir-p bin)
7047 (with-output-to-file (string-append bin "/antlr3")
7048 (lambda _
7049 (display
7050 (string-append "#!" (which "sh") "\n"
7051 "java -cp " jar "/" ,name "-" ,version ".jar:"
7052 (string-concatenate
7053 (find-files (assoc-ref inputs "stringtemplate")
7054 ".*\\.jar"))
7055 ":"
7056 (string-concatenate
7057 (find-files (assoc-ref inputs "stringtemplate4")
7058 ".*\\.jar"))
7059 ":"
7060 (string-concatenate
7061 (find-files (string-append
7062 (assoc-ref inputs "antlr")
7063 "/lib")
7064 ".*\\.jar"))
7065 " org.antlr.Tool $*"))))
7066 (chmod (string-append bin "/antlr3") #o755))
7067 #t))
7068 (add-before 'build 'generate-grammar
7069 (lambda _
7070 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7071 (for-each (lambda (file)
7072 (display file)
7073 (newline)
7074 (invoke "antlr3" file))
7075 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7076 "AssignTokenTypesWalker.g"
7077 "ActionTranslator.g" "TreeToNFAConverter.g"
7078 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7079 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7080 (substitute* "ANTLRParser.java"
7081 (("public Object getTree") "public GrammarAST getTree"))
7082 (substitute* "ANTLRv3Parser.java"
7083 (("public Object getTree") "public CommonTree getTree"))
7084 (chdir "../../../../../java")
7085 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7086 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7087 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7088 (substitute* "org/antlr/tool/ErrorManager.java"
7089 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7090 (chdir "../../../..")
7091 #t))
7092 (add-before 'build 'fix-build-xml
7093 (lambda _
7094 (substitute* "build.xml"
7095 (("target name=\"compile\">")
7096 "target name=\"compile\">
7097 <copy todir=\"${classes.dir}\">
7098 <fileset dir=\"tool/src/main/resources\">
7099 <include name=\"**/*.stg\"/>
7100 <include name=\"**/*.st\"/>
7101 <include name=\"**/*.sti\"/>
7102 <include name=\"**/STLexer.tokens\"/>
7103 </fileset>
7104 </copy>"))
7105 #t)))))
7106 (native-inputs
7107 `(("antlr" ,antlr2)
7108 ("antlr3" ,antlr3-bootstrap)))
7109 (inputs
7110 `(("junit" ,java-junit)
7111 ("stringtemplate" ,java-stringtemplate-3)
7112 ("stringtemplate4" ,java-stringtemplate)))
7113 (propagated-inputs
7114 `(("stringtemplate" ,java-stringtemplate-3)
7115 ("antlr" ,antlr2)
7116 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7117 (home-page "https://www.antlr3.org")
7118 (synopsis "Framework for constructing recognizers, compilers, and translators")
7119 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7120 is a language tool that provides a framework for constructing recognizers,
7121 compilers, and translators from grammatical descriptions containing Java, C#,
7122 C++, or Python actions. ANTLR provides excellent support for tree construction,
7123 tree walking, and translation.")
7124 (license license:bsd-3)))
7125
7126 (define antlr3-bootstrap
7127 (package
7128 (inherit antlr3)
7129 (name "antlr3-bootstrap")
7130 (native-inputs
7131 `(("antlr" ,antlr2)
7132 ("antlr3" ,antlr3-3.3)))
7133 (inputs
7134 `(("junit" ,java-junit)))))
7135
7136 (define antlr3-3.3
7137 (package
7138 (inherit antlr3)
7139 (name "antlr3")
7140 (version "3.3")
7141 (source (origin
7142 (method url-fetch)
7143 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7144 "gh-pages/download/antlr-"
7145 version ".tar.gz"))
7146 (sha256
7147 (base32
7148 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7149 (patches
7150 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7151 (arguments
7152 `(#:jar-name (string-append ,name "-" ,version ".jar")
7153 #:source-dir (string-join '("tool/src/main/java"
7154 "runtime/Java/src/main/java"
7155 "tool/src/main/antlr2"
7156 "tool/src/main/antlr3")
7157 ":")
7158 #:tests? #f ; FIXME: tests seem to require maven plugin
7159 #:modules ((guix build ant-build-system)
7160 (guix build utils)
7161 (srfi srfi-1))
7162 #:phases
7163 (modify-phases %standard-phases
7164 (add-after 'install 'bin-install
7165 (lambda* (#:key inputs outputs #:allow-other-keys)
7166 (let* ((out (assoc-ref outputs "out"))
7167 (jar (string-append out "/share/java"))
7168 (bin (string-append out "/bin")))
7169 (mkdir-p bin)
7170 (with-output-to-file (string-append bin "/antlr3")
7171 (lambda _
7172 (display
7173 (string-append
7174 "#!" (which "sh") "\n"
7175 "java -cp " jar "/antlr3-3.3.jar:"
7176 (string-join
7177 (append (find-files (assoc-ref inputs "java-stringtemplate")
7178 ".*\\.jar$")
7179 (find-files (string-append (assoc-ref inputs "antlr")
7180 "/lib")
7181 ".*\\.jar$"))
7182 ":")
7183 " org.antlr.Tool $*"))))
7184 (chmod (string-append bin "/antlr3") #o755)
7185 #t)))
7186 (add-before 'build 'generate-grammar
7187 (lambda _
7188 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7189 (("import org.antlr.grammar.v2.\\*;")
7190 "import org.antlr.grammar.v2.*;\n
7191 import org.antlr.grammar.v2.TreeToNFAConverter;\n
7192 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
7193 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
7194 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7195 (for-each (lambda (file)
7196 (format #t "~a\n" file)
7197 (invoke "antlr" file))
7198 '("antlr.g" "antlr.print.g" "assign.types.g"
7199 "buildnfa.g" "codegen.g" "define.g")))
7200 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7201 (for-each (lambda (file)
7202 (format #t "~a\n" file)
7203 (invoke "antlr3" file))
7204 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7205 "ANTLRv3Tree.g")))
7206 #t))
7207 (add-before 'build 'fix-build-xml
7208 (lambda _
7209 (substitute* "build.xml"
7210 (("target name=\"compile\">")
7211 "target name=\"compile\">
7212 <copy todir=\"${classes.dir}\">
7213 <fileset dir=\"tool/src/main/resources\">
7214 <include name=\"**/*.stg\"/>
7215 <include name=\"**/*.st\"/>
7216 <include name=\"**/*.sti\"/>
7217 <include name=\"**/STLexer.tokens\"/>
7218 </fileset>
7219 </copy>"))
7220 #t)))))
7221 (native-inputs
7222 `(("antlr" ,antlr2)
7223 ("antlr3" ,antlr3-3.1)))
7224 (inputs
7225 `(("junit" ,java-junit)))
7226 (propagated-inputs
7227 `(("java-stringtemplate" ,java-stringtemplate-3)
7228 ("antlr" ,antlr2)
7229 ("antlr3" ,antlr3-3.1)))))
7230
7231 (define-public antlr3-3.1
7232 (package
7233 (inherit antlr3)
7234 (version "3.1")
7235 (source (origin
7236 (method url-fetch)
7237 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7238 "gh-pages/download/antlr-"
7239 version ".tar.gz"))
7240 (sha256
7241 (base32
7242 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7243 (patches
7244 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7245 (arguments
7246 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7247 #:source-dir "src:runtime/Java/src"
7248 #:tests? #f
7249 #:phases
7250 (modify-phases %standard-phases
7251 (add-after 'install 'bin-install
7252 (lambda* (#:key inputs outputs #:allow-other-keys)
7253 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7254 (bin (string-append (assoc-ref outputs "out") "/bin")))
7255 (mkdir-p bin)
7256 (with-output-to-file (string-append bin "/antlr3")
7257 (lambda _
7258 (display
7259 (string-append "#!" (which "sh") "\n"
7260 "java -cp " jar "/antlr3-3.1.jar:"
7261 (string-concatenate
7262 (find-files (assoc-ref inputs "stringtemplate")
7263 ".*\\.jar"))
7264 ":"
7265 (string-concatenate
7266 (find-files (string-append
7267 (assoc-ref inputs "antlr")
7268 "/lib")
7269 ".*\\.jar"))
7270 " org.antlr.Tool $*"))))
7271 (chmod (string-append bin "/antlr3") #o755))
7272 #t))
7273 (add-before 'build 'generate-grammar
7274 (lambda _
7275 (let ((dir "src/org/antlr/tool/"))
7276 (for-each (lambda (file)
7277 (display file)
7278 (newline)
7279 (invoke "antlr" "-o" dir (string-append dir file)))
7280 '("antlr.g" "antlr.print.g" "assign.types.g"
7281 "buildnfa.g" "define.g")))
7282 (format #t "codegen.g\n")
7283 (invoke "antlr" "-o" "src/org/antlr/codegen"
7284 "src/org/antlr/codegen/codegen.g")
7285 #t))
7286 (add-before 'build 'fix-build-xml
7287 (lambda _
7288 (substitute* "build.xml"
7289 (("target name=\"compile\">")
7290 "target name=\"compile\">
7291 <copy todir=\"${classes.dir}\">
7292 <fileset dir=\"src\">
7293 <include name=\"**/*.stg\"/>
7294 <include name=\"**/*.st\"/>
7295 <include name=\"**/*.sti\"/>
7296 <include name=\"**/STLexer.tokens\"/>
7297 </fileset>
7298 </copy>"))
7299 #t)))))
7300 (native-inputs
7301 `(("antlr" ,antlr2)))
7302 (inputs
7303 `(("junit" ,java-junit)))
7304 (propagated-inputs
7305 `(("stringtemplate" ,java-stringtemplate-3)))))
7306
7307 (define-public java-commons-cli-1.2
7308 ;; This is a bootstrap dependency for Maven2.
7309 (package
7310 (inherit java-commons-cli)
7311 (version "1.2")
7312 (source (origin
7313 (method url-fetch)
7314 (uri (string-append "mirror://apache/commons/cli/source/"
7315 "commons-cli-" version "-src.tar.gz"))
7316 (sha256
7317 (base32
7318 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7319 (arguments
7320 `(#:jar-name "commons-cli.jar"
7321 #:phases
7322 (modify-phases %standard-phases
7323 (add-before 'check 'fix-build-xml
7324 (lambda* (#:key inputs #:allow-other-keys)
7325 (substitute* "build.xml"
7326 (("dir=\"\\$\\{test.home\\}/java\"")
7327 "dir=\"${test.home}\""))
7328 #t)))))
7329 (native-inputs
7330 `(("java-junit" ,java-junit)))))
7331
7332 (define-public java-microemulator-cldc
7333 (package
7334 (name "java-microemulator-cldc")
7335 (version "2.0.4")
7336 (source (origin
7337 (method url-fetch)
7338 (uri (string-append "https://github.com/barteo/microemu/archive/"
7339 "microemulator_"
7340 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7341 version)
7342 ".tar.gz"))
7343 (file-name (string-append name "-" version ".tar.gz"))
7344 (sha256
7345 (base32
7346 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7347 (build-system ant-build-system)
7348 (arguments
7349 `(#:jar-name "microemulator-cldc.jar"
7350 #:source-dir "microemu-cldc/src/main/java"
7351 #:tests? #f)); Requires even older software
7352 (home-page "https://github.com/barteo/microemu")
7353 (synopsis "J2ME CLDC emulator")
7354 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7355 Emulator. It allows to demonstrate MIDlet based applications in web browser
7356 applet and can be run as a standalone java application.")
7357 (license (list license:asl2.0
7358 ;; or altenatively:
7359 license:lgpl2.1+))))
7360
7361 (define-public java-datanucleus-javax-persistence
7362 (package
7363 (name "java-datanucleus-javax-persistence")
7364 (version "2.2.0")
7365 (source (origin
7366 (method url-fetch)
7367 (uri (string-append "https://github.com/datanucleus/"
7368 "javax.persistence/archive/javax.persistence-"
7369 version "-release.tar.gz"))
7370 (sha256
7371 (base32
7372 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7373 (build-system ant-build-system)
7374 (arguments
7375 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7376 #:jdk ,icedtea-8
7377 #:source-dir "src/main/java"
7378 #:tests? #f)); no tests
7379 (home-page "https://github.com/datanucleus/javax.persistence")
7380 (synopsis "JPA API")
7381 (description "This package contains a clean definition of JPA API intended
7382 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7383 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7384 used to generate this API.")
7385 (license (list license:edl1.0 license:epl1.0))))
7386
7387 (define-public java-osgi-cmpn
7388 (package
7389 (name "java-osgi-cmpn")
7390 (version "6.0.0")
7391 (source (origin
7392 (method url-fetch)
7393 (uri (string-append "https://repo1.maven.org/maven2/"
7394 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7395 version "-sources.jar"))
7396 (sha256
7397 (base32
7398 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7399 (build-system ant-build-system)
7400 (arguments
7401 `(#:jar-name "osgi-cmpn.jar"
7402 #:tests? #f)); no tests
7403 (inputs
7404 `(("annotation" ,java-osgi-annotation)
7405 ("core" ,java-osgi-core)
7406 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7407 ("microemulator" ,java-microemulator-cldc)
7408 ("servlet" ,java-classpathx-servletapi)))
7409 (home-page "https://www.osgi.org")
7410 (synopsis "Compendium specification module of OSGi framework")
7411 (description
7412 "OSGi, for Open Services Gateway initiative framework, is a module system
7413 and service platform for the Java programming language. This package contains
7414 the compendium specification module, providing interfaces and classes for use
7415 in compiling bundles.")
7416 (license license:asl2.0)))
7417
7418 (define-public java-osgi-service-component-annotations
7419 (package
7420 (name "java-osgi-service-component-annotations")
7421 (version "1.3.0")
7422 (source (origin
7423 (method url-fetch)
7424 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7425 "org.osgi.service.component.annotations/"
7426 version "/org.osgi.service.component.annotations-"
7427 version "-sources.jar"))
7428 (sha256
7429 (base32
7430 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7431 (build-system ant-build-system)
7432 (arguments
7433 `(#:jar-name "osgi-service-component-annotations.jar"
7434 #:tests? #f)); no tests
7435 (inputs
7436 `(("annotation" ,java-osgi-annotation)))
7437 (home-page "https://www.osgi.org")
7438 (synopsis "Support annotations for osgi-service-component")
7439 (description
7440 "OSGi, for Open Services Gateway initiative framework, is a module system
7441 and service platform for the Java programming language. This package contains
7442 the support annotations for osgi-service-component.")
7443 (license license:asl2.0)))
7444
7445 (define-public java-osgi-dto
7446 (package
7447 (name "java-osgi-dto")
7448 (version "1.0.0")
7449 (source (origin
7450 (method url-fetch)
7451 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7452 "org.osgi.dto/" version "/org.osgi.dto-"
7453 version "-sources.jar"))
7454 (sha256
7455 (base32
7456 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7457 (build-system ant-build-system)
7458 (arguments
7459 `(#:jar-name "osgi-dto.jar"
7460 #:tests? #f)); no tests
7461 (inputs
7462 `(("annotation" ,java-osgi-annotation)))
7463 (home-page "https://www.osgi.org")
7464 (synopsis "Data Transfer Objects")
7465 (description
7466 "OSGi, for Open Services Gateway initiative framework, is a module system
7467 and service platform for the Java programming language. This package contains
7468 the Data Transfer Objects. It is easily serializable having only public fields
7469 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7470 Map and array aggregates may also be used. The aggregates must only hold
7471 objects of the listed types or aggregates.")
7472 (license license:asl2.0)))
7473
7474 (define-public java-osgi-resource
7475 (package
7476 (name "java-osgi-resource")
7477 (version "1.0.0")
7478 (source (origin
7479 (method url-fetch)
7480 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7481 "org.osgi.resource/"
7482 version "/org.osgi.resource-"
7483 version "-sources.jar"))
7484 (sha256
7485 (base32
7486 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7487 (build-system ant-build-system)
7488 (arguments
7489 `(#:jar-name "osgi-resource.jar"
7490 #:tests? #f)); no tests
7491 (inputs
7492 `(("annotation" ,java-osgi-annotation)
7493 ("dto" ,java-osgi-dto)))
7494 (home-page "https://www.osgi.org")
7495 (synopsis "OSGI Resource")
7496 (description
7497 "OSGi, for Open Services Gateway initiative framework, is a module system
7498 and service platform for the Java programming language. This package contains
7499 the definition of common types in osgi packages.")
7500 (license license:asl2.0)))
7501
7502 (define-public java-osgi-namespace-contract
7503 (package
7504 (name "java-osgi-namespace-contract")
7505 (version "1.0.0")
7506 (source (origin
7507 (method url-fetch)
7508 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7509 "org.osgi.namespace.contract/"
7510 version "/org.osgi.namespace.contract-"
7511 version "-sources.jar"))
7512 (sha256
7513 (base32
7514 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7515 (build-system ant-build-system)
7516 (inputs
7517 `(("resource" ,java-osgi-resource)
7518 ("annotation" ,java-osgi-annotation)))
7519 (arguments
7520 `(#:jar-name "osgi-namespace-contract.jar"
7521 #:tests? #f)); no tests
7522 (home-page "https://www.osgi.org")
7523 (synopsis "Contract Capability and Requirement Namespace")
7524 (description
7525 "OSGi, for Open Services Gateway initiative framework, is a module system
7526 and service platform for the Java programming language. This package contains
7527 the names for the attributes and directives for a namespace with contracts.")
7528 (license license:asl2.0)))
7529
7530 (define-public java-osgi-namespace-extender
7531 (package
7532 (name "java-osgi-namespace-extender")
7533 (version "1.0.1")
7534 (source (origin
7535 (method url-fetch)
7536 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7537 "org.osgi.namespace.extender/"
7538 version "/org.osgi.namespace.extender-"
7539 version "-sources.jar"))
7540 (sha256
7541 (base32
7542 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7543 (build-system ant-build-system)
7544 (inputs
7545 `(("resource" ,java-osgi-resource)
7546 ("annotation" ,java-osgi-annotation)))
7547 (arguments
7548 `(#:jar-name "osgi-namespace-extendent.jar"
7549 #:tests? #f)); no tests
7550 (home-page "https://www.osgi.org")
7551 (synopsis "Extender Capability and Requirement Namespace")
7552 (description
7553 "OSGi, for Open Services Gateway initiative framework, is a module system
7554 and service platform for the Java programming language. This package contains
7555 the names for the attributes and directives for an extender namespace.")
7556 (license license:asl2.0)))
7557
7558 (define-public java-osgi-namespace-service
7559 (package
7560 (name "java-osgi-namespace-service")
7561 (version "1.0.0")
7562 (source (origin
7563 (method url-fetch)
7564 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7565 "org.osgi.namespace.service/"
7566 version "/org.osgi.namespace.service-"
7567 version "-sources.jar"))
7568 (sha256
7569 (base32
7570 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7571 (build-system ant-build-system)
7572 (inputs
7573 `(("resource" ,java-osgi-resource)
7574 ("annotation" ,java-osgi-annotation)))
7575 (arguments
7576 `(#:jar-name "osgi-namespace-service.jar"
7577 #:tests? #f)); no tests
7578 (home-page "https://www.osgi.org")
7579 (synopsis "Service Capability and Requirement Namespace")
7580 (description
7581 "OSGi, for Open Services Gateway initiative framework, is a module system
7582 and service platform for the Java programming language. This package contains
7583 the names for the attributes and directives for a service namespace.")
7584 (license license:asl2.0)))
7585
7586 (define-public java-osgi-util-function
7587 (package
7588 (name "java-osgi-util-function")
7589 (version "1.0.0")
7590 (source (origin
7591 (method url-fetch)
7592 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7593 "org.osgi.util.function/"
7594 version "/org.osgi.util.function-"
7595 version "-sources.jar"))
7596 (sha256
7597 (base32
7598 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7599 (build-system ant-build-system)
7600 (arguments
7601 `(#:jar-name "osgi-util-function.jar"
7602 #:tests? #f)); no tests
7603 (inputs
7604 `(("annotation" ,java-osgi-annotation)))
7605 (home-page "https://www.osgi.org")
7606 (synopsis "OSGI Util Function")
7607 (description
7608 "OSGi, for Open Services Gateway initiative framework, is a module system
7609 and service platform for the Java programming language. This package contains
7610 an interface for a function that accepts a single argument and produces a result.")
7611 (license license:asl2.0)))
7612
7613 (define-public java-osgi-util-promise
7614 (package
7615 (name "java-osgi-util-promise")
7616 (version "1.0.0")
7617 (source (origin
7618 (method url-fetch)
7619 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7620 "org.osgi.util.promise/"
7621 version "/org.osgi.util.promise-"
7622 version "-sources.jar"))
7623 (sha256
7624 (base32
7625 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7626 (build-system ant-build-system)
7627 (arguments
7628 `(#:jar-name "osgi-util-promise.jar"
7629 #:tests? #f)); no tests
7630 (inputs
7631 `(("annotation" ,java-osgi-annotation)
7632 ("function" ,java-osgi-util-function)))
7633 (home-page "https://www.osgi.org")
7634 (synopsis "Promise of a value")
7635 (description
7636 "OSGi, for Open Services Gateway initiative framework, is a module system
7637 and service platform for the Java programming language. This package contains
7638 an interface and utilitary classes for promises. A Promise represents a future
7639 value. It handles the interactions for asynchronous processing.")
7640 (license license:asl2.0)))
7641
7642 (define-public java-osgi-service-metatype-annotations
7643 (package
7644 (name "java-osgi-service-metatype-annotations")
7645 (version "1.3.0")
7646 (source (origin
7647 (method url-fetch)
7648 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7649 "org.osgi.service.metatype.annotations/"
7650 version "/org.osgi.service.metatype.annotations-"
7651 version "-sources.jar"))
7652 (sha256
7653 (base32
7654 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7655 (build-system ant-build-system)
7656 (arguments
7657 `(#:jar-name "osgi-service-metatype-annotations.jar"
7658 #:tests? #f)); no tests
7659 (inputs
7660 `(("annotation" ,java-osgi-annotation)))
7661 (home-page "https://www.osgi.org")
7662 (synopsis "Support annotations for metatype")
7663 (description
7664 "OSGi, for Open Services Gateway initiative framework, is a module system
7665 and service platform for the Java programming language. This package contains
7666 the support annotations for metatype.")
7667 (license license:asl2.0)))
7668
7669 (define-public java-osgi-service-repository
7670 (package
7671 (name "java-osgi-service-repository")
7672 (version "1.1.0")
7673 (source (origin
7674 (method url-fetch)
7675 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7676 "org.osgi.service.repository/"
7677 version "/org.osgi.service.repository-"
7678 version "-sources.jar"))
7679 (sha256
7680 (base32
7681 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7682 (build-system ant-build-system)
7683 (arguments
7684 `(#:jar-name "osgi-service-repository.jar"
7685 #:tests? #f)); no tests
7686 (inputs
7687 `(("annotation" ,java-osgi-annotation)
7688 ("promise" ,java-osgi-util-promise)
7689 ("resource" ,java-osgi-resource)))
7690 (home-page "https://www.osgi.org")
7691 (synopsis "OSGI service repository")
7692 (description
7693 "OSGi, for Open Services Gateway initiative framework, is a module system
7694 and service platform for the Java programming language. This package contains
7695 a repository service that contains resources.")
7696 (license license:asl2.0)))
7697
7698 (define-public java-osgi-framework
7699 (package
7700 (name "java-osgi-framework")
7701 (version "1.8.0")
7702 (source (origin
7703 (method url-fetch)
7704 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7705 "org.osgi.framework/" version "/org.osgi.framework-"
7706 version "-sources.jar"))
7707 (sha256
7708 (base32
7709 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7710 (build-system ant-build-system)
7711 (arguments
7712 `(#:jar-name "osgi-framework.jar"
7713 #:tests? #f)); no tests
7714 (inputs
7715 `(("annotation" ,java-osgi-annotation)
7716 ("resource" ,java-osgi-resource)
7717 ("dto" ,java-osgi-dto)))
7718 (home-page "https://www.osgi.org")
7719 (synopsis "OSGi framework")
7720 (description
7721 "OSGi, for Open Services Gateway initiative framework, is a module system
7722 and service platform for the Java programming language.")
7723 (license license:asl2.0)))
7724
7725 (define-public java-osgi-service-log
7726 (package
7727 (name "java-osgi-service-log")
7728 (version "1.3.0")
7729 (source (origin
7730 (method url-fetch)
7731 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7732 "org.osgi.service.log/"
7733 version "/org.osgi.service.log-"
7734 version "-sources.jar"))
7735 (sha256
7736 (base32
7737 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7738 (build-system ant-build-system)
7739 (arguments
7740 `(#:jar-name "osgi-service-log.jar"
7741 #:tests? #f)); no tests
7742 (inputs
7743 `(("java-osgi-framework" ,java-osgi-framework)))
7744 (home-page "https://www.osgi.org")
7745 (synopsis "Provides methods for bundles to write messages to the log")
7746 (description
7747 "OSGi, for Open Services Gateway initiative framework, is a module system
7748 and service platform for the Java programming language. This package contains
7749 the log service.")
7750 (license license:asl2.0)))
7751
7752 (define-public java-osgi-service-jdbc
7753 (package
7754 (name "java-osgi-service-jdbc")
7755 (version "1.0.0")
7756 (source (origin
7757 (method url-fetch)
7758 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7759 "org.osgi.service.jdbc/"
7760 version "/org.osgi.service.jdbc-"
7761 version "-sources.jar"))
7762 (sha256
7763 (base32
7764 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7765 (build-system ant-build-system)
7766 (arguments
7767 `(#:jar-name "osgi-service-jdbc.jar"
7768 #:tests? #f)); no tests
7769 (home-page "https://www.osgi.org")
7770 (synopsis "Factory for JDBC connection factories")
7771 (description
7772 "OSGi, for Open Services Gateway initiative framework, is a module system
7773 and service platform for the Java programming language. This package contains
7774 a factory for JDBC connection factories. There are 3 preferred connection
7775 factories for getting JDBC connections:
7776
7777 @itemize
7778 @item @code{javax.sql.DataSource};
7779 @item @code{javax.sql.ConnectionPoolDataSource};
7780 @item @code{javax.sql.XADataSource}.
7781 @end itemize")
7782 (license license:asl2.0)))
7783
7784 (define-public java-osgi-service-resolver
7785 (package
7786 (name "java-osgi-service-resolver")
7787 (version "1.0.1")
7788 (source (origin
7789 (method url-fetch)
7790 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7791 "org.osgi.service.resolver/"
7792 version "/org.osgi.service.resolver-"
7793 version "-sources.jar"))
7794 (sha256
7795 (base32
7796 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7797 (build-system ant-build-system)
7798 (arguments
7799 `(#:jar-name "osgi-service-resolver.jar"
7800 #:tests? #f)); no tests
7801 (inputs
7802 `(("annotation" ,java-osgi-annotation)
7803 ("resource" ,java-osgi-resource)))
7804 (home-page "https://www.osgi.org")
7805 (synopsis "OSGI Resolver service")
7806 (description
7807 "OSGi, for Open Services Gateway initiative framework, is a module system
7808 and service platform for the Java programming language. This package contains
7809 a resolver service that resolves the specified resources in the context supplied
7810 by the caller.")
7811 (license license:asl2.0)))
7812
7813 (define-public java-osgi-util-tracker
7814 (package
7815 (name "java-osgi-util-tracker")
7816 (version "1.5.1")
7817 (source (origin
7818 (method url-fetch)
7819 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7820 "org.osgi.util.tracker/"
7821 version "/org.osgi.util.tracker-"
7822 version "-sources.jar"))
7823 (sha256
7824 (base32
7825 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7826 (build-system ant-build-system)
7827 (arguments
7828 `(#:jar-name "osgi-util-tracker.jar"
7829 #:tests? #f)); no tests
7830 (inputs
7831 `(("framework" ,java-osgi-framework)
7832 ("annotation" ,java-osgi-annotation)))
7833 (home-page "https://www.osgi.org")
7834 (synopsis "Bundle tracking")
7835 (description
7836 "OSGi, for Open Services Gateway initiative framework, is a module system
7837 and service platform for the Java programming language. This package contains
7838 bundle tracking utility classes.")
7839 (license license:asl2.0)))
7840
7841 (define-public java-osgi-service-cm
7842 (package
7843 (name "java-osgi-service-cm")
7844 (version "1.5.0")
7845 (source (origin
7846 (method url-fetch)
7847 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7848 "org.osgi.service.cm/"
7849 version "/org.osgi.service.cm-"
7850 version "-sources.jar"))
7851 (sha256
7852 (base32
7853 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7854 (build-system ant-build-system)
7855 (arguments
7856 `(#:jar-name "osgi-service-cm.jar"
7857 #:tests? #f)); no tests
7858 (inputs
7859 `(("framework" ,java-osgi-framework)
7860 ("annotation" ,java-osgi-annotation)))
7861 (home-page "https://www.osgi.org")
7862 (synopsis "OSGI Configuration Management")
7863 (description
7864 "OSGi, for Open Services Gateway initiative framework, is a module system
7865 and service platform for the Java programming language. This package contains
7866 utility classes for the configuration of services.")
7867 (license license:asl2.0)))
7868
7869 (define-public java-osgi-service-packageadmin
7870 (package
7871 (name "java-osgi-service-packageadmin")
7872 (version "1.2.0")
7873 (source (origin
7874 (method url-fetch)
7875 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7876 "org.osgi.service.packageadmin/"
7877 version "/org.osgi.service.packageadmin-"
7878 version "-sources.jar"))
7879 (sha256
7880 (base32
7881 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7882 (build-system ant-build-system)
7883 (arguments
7884 `(#:jar-name "osgi-service-packageadmin.jar"
7885 #:tests? #f)); no tests
7886 (inputs
7887 `(("framework" ,java-osgi-framework)))
7888 (home-page "https://www.osgi.org")
7889 (synopsis "OSGI Package Administration")
7890 (description
7891 "OSGi, for Open Services Gateway initiative framework, is a module system
7892 and service platform for the Java programming language. This package contains
7893 the packageadmin service.")
7894 (license license:asl2.0)))
7895
7896 (define-public java-ops4j-base-lang
7897 (package
7898 (name "java-ops4j-base-lang")
7899 (version "1.5.0")
7900 (source (origin
7901 (method url-fetch)
7902 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7903 "archive/base-" version ".tar.gz"))
7904 (sha256
7905 (base32
7906 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7907 (build-system ant-build-system)
7908 (arguments
7909 `(#:jar-name "java-ops4j-base-lang.jar"
7910 #:source-dir "ops4j-base-lang/src/main/java"
7911 #:tests? #f; no tests
7912 #:phases
7913 (modify-phases %standard-phases
7914 (add-before 'build 'add-test-file
7915 (lambda _
7916 ;; That file is required by a test in ops4j-pax-exam-core-spi
7917 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7918 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7919 (lambda _
7920 (display
7921 (string-append
7922 "version=" ,version "\n"
7923 "groupId=org.ops4j.base"
7924 "artifactId=ops4j-base-lang\n"))))
7925 #t)))))
7926 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7927 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7928 (description "OPS4J stands for Open Participation Software for Java. This
7929 package contains utilities and extensions related to @code{java.lang}.")
7930 (license license:asl2.0)))
7931
7932 (define-public java-ops4j-base-monitors
7933 (package
7934 (inherit java-ops4j-base-lang)
7935 (name "java-ops4j-base-monitors")
7936 (arguments
7937 `(#:jar-name "java-ops4j-base-monitors.jar"
7938 #:source-dir "ops4j-base-monitors/src/main/java"
7939 #:tests? #f)); no tests
7940 (inputs
7941 `(("lang" ,java-ops4j-base-lang)))
7942 (description "OPS4J stands for Open Participation Software for Java. This
7943 package contains utilities and extensions related to monitoring.")))
7944
7945 (define-public java-ops4j-base-io
7946 (package
7947 (inherit java-ops4j-base-lang)
7948 (name "java-ops4j-base-io")
7949 (arguments
7950 `(#:jar-name "java-ops4j-base-io.jar"
7951 #:source-dir "ops4j-base-io/src/main/java"
7952 #:test-dir "ops4j-base-io/src/test"
7953 #:test-exclude
7954 (list "**/ListerTest.java")))
7955 (inputs
7956 `(("lang" ,java-ops4j-base-monitors)
7957 ("lang" ,java-ops4j-base-lang)))
7958 (native-inputs
7959 `(("junit" ,java-junit)
7960 ("hamcrest" ,java-hamcrest-core)))
7961 (description "OPS4J stands for Open Participation Software for Java. This
7962 package contains utilities and extensions related to handling streams and files.")))
7963
7964 (define-public java-ops4j-base-util
7965 (package
7966 (inherit java-ops4j-base-lang)
7967 (name "java-ops4j-base-util")
7968 (arguments
7969 `(#:jar-name "java-ops4j-base-util.jar"
7970 #:source-dir "ops4j-base-util/src/main/java"
7971 #:test-dir "ops4j-base-util/src/test"))
7972 (inputs
7973 `(("lang" ,java-ops4j-base-lang)))
7974 (native-inputs
7975 `(("junit" ,java-junit)))
7976 (description "OPS4J stands for Open Participation Software for Java. This
7977 package contains utilities and extensions related to environment, i18n and
7978 mime types.")))
7979
7980 (define-public java-ops4j-base-util-property
7981 (package
7982 (inherit java-ops4j-base-lang)
7983 (name "java-ops4j-base-util-property")
7984 (arguments
7985 `(#:jar-name "java-ops4j-base-util-property.jar"
7986 #:source-dir "ops4j-base-util-property/src/main/java"
7987 #:tests? #f)); no tests
7988 (inputs
7989 `(("lang" ,java-ops4j-base-lang)
7990 ("util" ,java-ops4j-base-util)))
7991 (description "OPS4J stands for Open Participation Software for Java. This
7992 package contains utilities and extensions related to resolving properties from
7993 different sources.")))
7994
7995 (define-public java-ops4j-base-store
7996 (package
7997 (inherit java-ops4j-base-lang)
7998 (name "java-ops4j-base-store")
7999 (arguments
8000 `(#:jar-name "java-ops4j-base-store.jar"
8001 #:source-dir "ops4j-base-store/src/main/java"
8002 #:tests? #f)); no tests
8003 (inputs
8004 `(("lang" ,java-ops4j-base-lang)
8005 ("slf4j" ,java-slf4j-api)
8006 ("io" ,java-ops4j-base-io)))
8007 (description "OPS4J stands for Open Participation Software for Java. This
8008 package contains utilities for storing and retrieving data from an
8009 @code{InputStream}.")))
8010
8011 (define-public java-ops4j-base-spi
8012 (package
8013 (inherit java-ops4j-base-lang)
8014 (name "java-ops4j-base-spi")
8015 (arguments
8016 `(#:jar-name "java-ops4j-base-spi.jar"
8017 #:source-dir "ops4j-base-spi/src/main/java"
8018 #:test-dir "ops4j-base-spi/src/test"))
8019 (native-inputs
8020 `(("junit" ,java-junit)
8021 ("hamcrest" ,java-hamcrest-core)))
8022 (description "OPS4J stands for Open Participation Software for Java. This
8023 package contains utilities for obtaining services via the Java SE 6
8024 @code{ServiceLoader}.")))
8025
8026 (define-public java-aqute-bnd-annotation
8027 (package
8028 (name "java-aqute-bnd-annotation")
8029 (version "3.5.0")
8030 (source (origin
8031 (method url-fetch)
8032 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8033 version ".REL.tar.gz"))
8034 (file-name (string-append name "-" version ".tar.gz"))
8035 (sha256
8036 (base32
8037 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8038 (build-system ant-build-system)
8039 (arguments
8040 `(#:jar-name "java-aqute-bnd-annotation.jar"
8041 #:source-dir "biz.aQute.bnd.annotation/src"
8042 #:tests? #f)); empty test dir
8043 (home-page "https://bnd.bndtools.org/")
8044 (synopsis "Tools for OSGi")
8045 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8046 headers based on analyzing the class code, it verifies the project settings,
8047 it manages project dependencies, gives diffs jars, and much more.")
8048 (license license:asl2.0)))
8049
8050 (define-public java-aqute-libg
8051 (package
8052 (inherit java-aqute-bnd-annotation)
8053 (name "java-aqute-libg")
8054 (arguments
8055 `(#:jar-name "java-aqute-libg.jar"
8056 ;; The build fails when source/target more recent than 1.7. This
8057 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8058 ;;
8059 ;; It is closed as won't fix. There is no way to change the source
8060 ;; so that it works on 1.8, and still works on 1.6, the upstream
8061 ;; target. It work fine on 1.7, so we use 1.7.
8062 #:make-flags (list "-Dant.build.javac.source=1.7"
8063 "-Dant.build.javac.target=1.7")
8064 #:phases
8065 (modify-phases %standard-phases
8066 (add-before 'configure 'chdir
8067 ;; Change to aQute.libg directory, so that the relative
8068 ;; paths in the tests aren't broken.
8069 (lambda _
8070 (chdir "aQute.libg")
8071 #t))
8072 (add-before 'check 'create-test-directory
8073 ;; Copy the test directory to test/java, since that's where
8074 ;; ant-build-system's default project in build.xml expects to find
8075 ;; the test classes. Leave a copy in the original place to not
8076 ;; break paths in tests.
8077 (lambda _
8078 (mkdir "src/test")
8079 (copy-recursively "test" "src/test/java")
8080 #t)))))
8081 (inputs
8082 `(("slf4j" ,java-slf4j-api)
8083 ("osgi-annot" ,java-osgi-annotation)
8084 ("java-osgi-cmpn" ,java-osgi-cmpn)
8085 ("osgi" ,java-osgi-core)))
8086 (native-inputs
8087 `(("hamcrest" ,java-hamcrest-core)
8088 ("java-junit" ,java-junit)))))
8089
8090 (define java-aqute-libg-bootstrap
8091 (package
8092 (inherit java-aqute-libg)
8093 (name "java-aqute-libg-bootstrap")
8094 (arguments
8095 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
8096 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8097 ((#:tests? _ #f) #f)))
8098 (inputs
8099 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8100 ,@(delete `("slf4j" ,java-slf4j-api)
8101 (package-inputs java-aqute-libg))))
8102 (native-inputs '())))
8103
8104 (define-public java-aqute-bndlib
8105 (package
8106 (inherit java-aqute-bnd-annotation)
8107 (name "java-aqute-bndlib")
8108 (arguments
8109 `(#:jar-name "java-bndlib.jar"
8110 #:source-dir "biz.aQute.bndlib/src"
8111 #:tests? #f)); no tests
8112 (inputs
8113 `(("slf4j" ,java-slf4j-api)
8114 ("osgi-annot" ,java-osgi-annotation)
8115 ("java-aqute-libg" ,java-aqute-libg)
8116 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8117 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8118 ("java-osgi-service-repository" ,java-osgi-service-repository)
8119 ("java-osgi-service-log" ,java-osgi-service-log)
8120 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8121 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8122 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8123 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8124 ("promise" ,java-osgi-util-promise)
8125 ("osgi" ,java-osgi-core)))))
8126
8127 (define java-aqute-bndlib-bootstrap
8128 (package
8129 (inherit java-aqute-bndlib)
8130 (name "java-aqute-bndlib-bootstrap")
8131 (inputs
8132 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8133 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8134 ,@(delete `("slf4j" ,java-slf4j-api)
8135 (delete `("java-aqute-libg" ,java-aqute-libg)
8136 (package-inputs java-aqute-bndlib)))))))
8137
8138 (define-public java-ops4j-pax-tinybundles
8139 (package
8140 (name "java-ops4j-pax-tinybundles")
8141 (version "2.1.1")
8142 (source (origin
8143 (method url-fetch)
8144 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8145 "archive/tinybundles-" version ".tar.gz"))
8146 (sha256
8147 (base32
8148 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8149 (arguments
8150 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8151 #:source-dir "src/main/java"
8152 #:test-exclude
8153 ;; Abstract base classes for other tests
8154 (list "**/BndTest.java" "**/CoreTest.java")
8155 #:phases
8156 (modify-phases %standard-phases
8157 (add-before 'check 'fix-version
8158 (lambda _
8159 ;; This test has a reference to an old version of bndlib we are not
8160 ;; packaging. It uses the version referenced in pom.xml. We replace
8161 ;; it with our own version.
8162 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8163 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8164 ,(package-version java-aqute-bndlib)))
8165 #t)))))
8166 (inputs
8167 `(("lang" ,java-ops4j-base-lang)
8168 ("io" ,java-ops4j-base-io)
8169 ("store" ,java-ops4j-base-store)
8170 ("slf4j" ,java-slf4j-api)
8171 ("libg" ,java-aqute-libg)
8172 ("bndlib" ,java-aqute-bndlib)))
8173 (native-inputs
8174 `(("junit" ,java-junit)
8175 ("hamcrest" ,java-hamcrest-core)
8176 ("log4j" ,java-log4j-api)
8177 ("bndannotation" ,java-aqute-bnd-annotation)
8178 ("framework" ,java-osgi-framework)))
8179 (build-system ant-build-system)
8180 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8181 (synopsis "Java APIs to create OSGi related artifacts")
8182 (description "Tinybundles is all about creating OSGi related artifacts like
8183 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8184 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8185 other hand, this library can be a foundation of real end user tools that need
8186 to create those artifacts.")
8187 (license license:asl2.0)))
8188
8189 (define-public java-ops4j-pax-exam-core
8190 (package
8191 (name "java-ops4j-pax-exam-core")
8192 (version "4.11.0")
8193 (source (origin
8194 (method url-fetch)
8195 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8196 "archive/exam-reactor-" version ".tar.gz"))
8197 (sha256
8198 (base32
8199 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8200 (arguments
8201 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8202 #:source-dir "core/pax-exam/src/main/java"
8203 #:test-dir "core/pax-exam/src/test"))
8204 (inputs
8205 `(("slf4j" ,java-slf4j-api)
8206 ("lang" ,java-ops4j-base-lang)
8207 ("io" ,java-ops4j-base-io)
8208 ("util-property" ,java-ops4j-base-util-property)
8209 ("util-store" ,java-ops4j-base-store)
8210 ("java-osgi-core" ,java-osgi-core)))
8211 (native-inputs
8212 `(("junit" ,java-junit)
8213 ("hamcrest" ,java-hamcrest-core)))
8214 (build-system ant-build-system)
8215 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8216 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8217 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8218 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8219 the system under test at the same time.")
8220 (license license:asl2.0)))
8221
8222 (define-public java-ops4j-pax-exam-core-spi
8223 (package
8224 (inherit java-ops4j-pax-exam-core)
8225 (name "java-ops4j-pax-exam-core-spi")
8226 (arguments
8227 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8228 #:source-dir "src/main/java"
8229 #:test-exclude
8230 (list
8231 ;; Abstract base class, not a test
8232 "**/BaseStagedReactorTest.java"
8233 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8234 "**/WarBuilderTest.java")
8235 #:phases
8236 (modify-phases %standard-phases
8237 (add-before 'configure 'chdir
8238 (lambda _
8239 ;; Tests assume we are in this directory
8240 (chdir "core/pax-exam-spi")
8241 #t))
8242 (add-before 'check 'fix-tests
8243 (lambda _
8244 ;; One test checks that this file is present.
8245 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8246 (with-output-to-file
8247 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8248 (lambda _
8249 (display
8250 (string-append "artifactId = pax-exam-spi\n"
8251 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8252 ;; Maven puts compilation results in the target directory, while we
8253 ;; put them in the build directory.
8254 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8255 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8256 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8257 (("target") "build"))
8258 ;; One test is expected to fail, but it doesn't throw the expected exception
8259 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8260 (("AssertionError") "IllegalArgumentException"))
8261 #t)))))
8262 (inputs
8263 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8264 ("lang" ,java-ops4j-base-lang)
8265 ("monitors" ,java-ops4j-base-monitors)
8266 ("store" ,java-ops4j-base-store)
8267 ("io" ,java-ops4j-base-io)
8268 ("spi" ,java-ops4j-base-spi)
8269 ("osgi" ,java-osgi-core)
8270 ("slf4j" ,java-slf4j-api)
8271 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8272 (native-inputs
8273 `(("mockito" ,java-mockito-1)
8274 ("junit" ,java-junit)
8275 ("hamcrest" ,java-hamcrest-core)
8276 ("cglib" ,java-cglib)
8277 ("objenesis" ,java-objenesis)
8278 ("asm" ,java-asm)))))
8279
8280 (define-public java-ops4j-pax-exam-core-junit
8281 (package
8282 (inherit java-ops4j-pax-exam-core)
8283 (name "java-ops4j-pax-exam-core-junit")
8284 (arguments
8285 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8286 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8287 #:tests? #f)); no tests
8288 (inputs
8289 `(("junit" ,java-junit)
8290 ("slf4j" ,java-slf4j-api)
8291 ("core" ,java-ops4j-pax-exam-core)
8292 ("spi" ,java-ops4j-pax-exam-core-spi)))
8293 (native-inputs '())))
8294
8295 (define-public java-fasterxml-jackson-annotations
8296 (package
8297 (name "java-fasterxml-jackson-annotations")
8298 (version "2.9.4")
8299 (source (origin
8300 (method url-fetch)
8301 (uri (string-append "https://github.com/FasterXML/"
8302 "jackson-annotations/archive/"
8303 "jackson-annotations-" version ".tar.gz"))
8304 (sha256
8305 (base32
8306 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8307 (build-system ant-build-system)
8308 (arguments
8309 `(#:jar-name "jackson-annotations.jar"
8310 #:source-dir "src/main/java"
8311 #:test-dir "src/test"))
8312 (native-inputs
8313 `(("junit" ,java-junit)))
8314 (home-page "https://github.com/FasterXML/jackson-annotations")
8315 (synopsis "General purpose annotations for the Jackson Data Processor")
8316 (description "This package contains general purpose annotations for the
8317 Jackson Data Processor, used on value and handler types. The only annotations
8318 not included are ones that require dependency to the Databind package.")
8319 (license license:asl2.0)))
8320
8321 (define-public java-fasterxml-jackson-core
8322 (package
8323 (name "java-fasterxml-jackson-core")
8324 (version "2.9.4")
8325 (source (origin
8326 (method url-fetch)
8327 (uri (string-append "https://github.com/FasterXML/"
8328 "jackson-core/archive/"
8329 "jackson-core-" version ".tar.gz"))
8330 (sha256
8331 (base32
8332 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8333 (build-system ant-build-system)
8334 (arguments
8335 `(#:jar-name "jackson-core.jar"
8336 #:source-dir "src/main/java"
8337 #:test-dir "src/test"
8338 #:test-exclude
8339 (list
8340 ;; Expected failure. pom.xml excludes these
8341 "**/failing/**"
8342 ;; Base classes that have no constructor for junit
8343 "**/BaseTest.java"
8344 "**/ConcurrencyReadTest.java"
8345 "**/ManualCharAccessTest.java"
8346 "**/ManualCharAccessTest.java"
8347 "**/TrailingCommasTest.java"
8348 "**/AsyncMissingValuesInObjectTest.java"
8349 "**/AsyncMissingValuesInArrayTest.java")
8350 #:phases
8351 (modify-phases %standard-phases
8352 (add-before 'configure 'generate-PackageVersion.java
8353 (lambda _
8354 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8355 (in (string-append out ".in")))
8356 (copy-file in out)
8357 (substitute* out
8358 (("@package@") "com.fasterxml.jackson.core.json")
8359 (("@projectversion@") ,version)
8360 (("@projectgroupid@") "com.fasterxml.jackson.core")
8361 (("@projectartifactid@") "jackson-core")))
8362 #t))
8363 (add-before 'build 'copy-resources
8364 (lambda _
8365 (copy-recursively "src/main/resources"
8366 "build/classes")
8367 #t))
8368 (add-before 'check 'copy-test-resources
8369 (lambda _
8370 (copy-recursively "src/test/resources"
8371 "build/test-classes")
8372 #t)))))
8373 (native-inputs
8374 `(("junit" ,java-junit)
8375 ("hamcrest" ,java-hamcrest-core)))
8376 (home-page "https://github.com/FasterXML/jackson-core")
8377 (synopsis "")
8378 (description "")
8379 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8380
8381 (define-public java-fasterxml-jackson-databind
8382 (package
8383 (name "java-fasterxml-jackson-databind")
8384 (version "2.9.4")
8385 (source (origin
8386 (method url-fetch)
8387 (uri (string-append "https://github.com/FasterXML/"
8388 "jackson-databind/archive/"
8389 "jackson-databind-" version ".tar.gz"))
8390 (sha256
8391 (base32
8392 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8393 (build-system ant-build-system)
8394 (arguments
8395 `(#:jar-name "jackson-databind.jar"
8396 #:source-dir "src/main/java"
8397 #:tests? #f; requires javax.measures for which I can't find a free implementation
8398 #:phases
8399 (modify-phases %standard-phases
8400 (add-before 'configure 'generate-PackageVersion.java
8401 (lambda _
8402 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8403 (in (string-append out ".in")))
8404 (copy-file in out)
8405 (substitute* out
8406 (("@package@") "com.fasterxml.jackson.databind.cfg")
8407 (("@projectversion@") ,version)
8408 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8409 (("@projectartifactid@") "jackson-databind")))
8410 #t))
8411 (add-before 'build 'copy-resources
8412 (lambda _
8413 (copy-recursively "src/main/resources" "build/classes")
8414 #t)))))
8415 (inputs
8416 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8417 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8418 (home-page "https://github.com/FasterXML/jackson-databind")
8419 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8420 (description "This package contains the general-purpose data-binding
8421 functionality and tree-model for Jackson Data Processor. It builds on core
8422 streaming parser/generator package, and uses Jackson Annotations for
8423 configuration.")
8424 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8425
8426 (define-public java-fasterxml-jackson-modules-base-jaxb
8427 (package
8428 (name "java-fasterxml-jackson-modules-base-jaxb")
8429 (version "2.9.4")
8430 (source (origin
8431 (method url-fetch)
8432 (uri (string-append "https://github.com/FasterXML/"
8433 "jackson-modules-base/archive/"
8434 "jackson-modules-base-" version ".tar.gz"))
8435 (sha256
8436 (base32
8437 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8438 (build-system ant-build-system)
8439 (arguments
8440 `(#:jar-name "jackson-modules-base-jaxb.jar"
8441 #:source-dir "jaxb/src/main/java"
8442 #:test-dir "jaxb/src/test"
8443 #:test-exclude
8444 ;; Base class for tests
8445 (list "**/BaseJaxbTest.java")
8446 #:phases
8447 (modify-phases %standard-phases
8448 (add-before 'configure 'generate-PackageVersion.java
8449 (lambda _
8450 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8451 "jackson/module/jaxb/PackageVersion.java"))
8452 (in (string-append out ".in")))
8453 (copy-file in out)
8454 (substitute* out
8455 (("@package@") "com.fasterxml.jackson.module.jaxb")
8456 (("@projectversion@") ,version)
8457 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8458 (("@projectartifactid@") "jackson-module-jaxb")))
8459 #t))
8460 (add-before 'build 'copy-resources
8461 (lambda _
8462 (copy-recursively "jaxb/src/main/resources" "build/classes")
8463 #t)))))
8464 (inputs
8465 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8466 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8467 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8468 (native-inputs
8469 `(("java-junit" ,java-junit)))
8470 (home-page "https://github.com/FasterXML/jackson-modules-base")
8471 (synopsis "Jaxb annotations jackson module")
8472 (description "This package is the jaxb annotations module for jackson.")
8473 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8474
8475 (define-public java-fasterxml-jackson-modules-base-mrbean
8476 (package
8477 (name "java-fasterxml-jackson-modules-base-mrbean")
8478 (version "2.9.4")
8479 (source (origin
8480 (method url-fetch)
8481 (uri (string-append "https://github.com/FasterXML/"
8482 "jackson-modules-base/archive/"
8483 "jackson-modules-base-" version ".tar.gz"))
8484 (sha256
8485 (base32
8486 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8487 (build-system ant-build-system)
8488 (arguments
8489 `(#:jar-name "jackson-modules-base-mrbean.jar"
8490 #:source-dir "mrbean/src/main/java"
8491 #:test-dir "mrbean/src/test"
8492 #:test-exclude
8493 ;; Base class for tests
8494 (list "**/BaseTest.java")
8495 #:phases
8496 (modify-phases %standard-phases
8497 (add-before 'configure 'generate-PackageVersion.java
8498 (lambda _
8499 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8500 "jackson/module/mrbean/PackageVersion.java"))
8501 (in (string-append out ".in")))
8502 (copy-file in out)
8503 (substitute* out
8504 (("@package@") "com.fasterxml.jackson.module.mrbean")
8505 (("@projectversion@") ,version)
8506 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8507 (("@projectartifactid@") "jackson-module-mrbean")))
8508 #t)))))
8509 (inputs
8510 `(("java-asm" ,java-asm)
8511 ("java-fasterxml-jackson-annotations"
8512 ,java-fasterxml-jackson-annotations)
8513 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8514 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8515 (native-inputs
8516 `(("java-junit" ,java-junit)))
8517 (home-page "https://github.com/FasterXML/jackson-modules-base")
8518 (synopsis "POJO type materialization for Java")
8519 (description "This package implements POJO type materialization.
8520 Databinders can construct implementation classes for Java interfaces as part
8521 of deserialization.")
8522 (license license:asl2.0)))
8523
8524 (define-public java-snakeyaml
8525 (package
8526 (name "java-snakeyaml")
8527 (version "1.18")
8528 (source (origin
8529 (method url-fetch)
8530 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8531 version ".tar.gz"))
8532 (file-name (string-append name "-" version ".tar.gz"))
8533 (sha256
8534 (base32
8535 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
8536 (build-system ant-build-system)
8537 (arguments
8538 `(#:jar-name "java-snakeyaml.jar"
8539 #:source-dir "src/main/java"
8540 ;; Tests require velocity, a cyclic dependency, and
8541 ;; java-spring-framework-context which is not packaged.
8542 #:tests? #f))
8543 (home-page "https://bitbucket.org/asomov/snakeyaml")
8544 (synopsis "YAML processor")
8545 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8546 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8547
8548 (define-public java-fasterxml-jackson-dataformat-yaml
8549 (package
8550 (name "java-fasterxml-jackson-dataformat-yaml")
8551 (version "2.9.4")
8552 (source (origin
8553 (method url-fetch)
8554 (uri (string-append "https://github.com/FasterXML/"
8555 "jackson-dataformats-text/archive/"
8556 "jackson-dataformats-text-" version ".tar.gz"))
8557 (sha256
8558 (base32
8559 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8560 (build-system ant-build-system)
8561 (arguments
8562 `(#:jar-name "jackson-dataformat-yaml.jar"
8563 #:source-dir "yaml/src/main/java"
8564 #:test-dir "yaml/src/test"
8565 #:test-exclude (list "**/failing/**.java")
8566 #:phases
8567 (modify-phases %standard-phases
8568 (add-before 'configure 'generate-PackageVersion.java
8569 (lambda _
8570 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8571 (in (string-append out ".in")))
8572 (copy-file in out)
8573 (substitute* out
8574 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8575 (("@projectversion@") ,version)
8576 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8577 (("@projectartifactid@") "jackson-dataformat-yaml")))
8578 #t)))))
8579 (inputs
8580 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8581 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8582 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8583 ("java-snakeyaml" ,java-snakeyaml)))
8584 (native-inputs
8585 `(("junit" ,java-junit)
8586 ("hamcrest" ,java-hamcrest-core)
8587 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8588 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8589 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8590 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8591 (synopsis "Yaml backend for Jackson")
8592 (description "Dataformat backends are used to support format alternatives
8593 to JSON, supported by default. This is done by sub-classing Jackson core
8594 abstractions.")
8595 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8596
8597 (define-public java-stax2-api
8598 (package
8599 (name "java-stax2-api")
8600 (version "4.0.0")
8601 (source (origin
8602 (method url-fetch)
8603 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8604 "stax2-api-" version ".tar.gz"))
8605 (sha256
8606 (base32
8607 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8608 (build-system ant-build-system)
8609 (arguments
8610 `(#:jar-name "java-stax2-api.jar"
8611 #:source-dir "src/main/java"
8612 #:tests? #f)); no tests
8613 (home-page "https://github.com/FasterXML/stax2-api")
8614 (synopsis "Stax2 API")
8615 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8616 significant new functionalities, such as full-featured bi-direction validation
8617 interface and high-performance Typed Access API.")
8618 (license license:bsd-2)))
8619
8620 (define-public java-woodstox-core
8621 (package
8622 (name "java-woodstox-core")
8623 (version "5.0.3")
8624 (source (origin
8625 (method url-fetch)
8626 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8627 "woodstox-core-" version ".tar.gz"))
8628 (sha256
8629 (base32
8630 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8631 (build-system ant-build-system)
8632 (arguments
8633 `(#:jar-name "woodstox.jar"
8634 #:test-exclude
8635 (list "**/Base*.java" "failing/**")
8636 #:phases
8637 (modify-phases %standard-phases
8638 (add-before 'build 'remove-msv-dep
8639 (lambda _
8640 ;; we don't need osgi, and it depends on msv
8641 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8642 ;; msv's latest release is from 2011 and we don't need it
8643 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8644 (delete-file-recursively "src/test/java/wstxtest/osgi")
8645 (delete-file-recursively "src/test/java/wstxtest/msv")
8646 #t))
8647 (add-before 'build 'copy-resources
8648 (lambda _
8649 (copy-recursively "src/main/resources" "build/classes")
8650 #t)))))
8651 (inputs
8652 `(("stax2" ,java-stax2-api)))
8653 (native-inputs
8654 `(("junit" ,java-junit)))
8655 (home-page "https://github.com/FasterXML/woodstox")
8656 (synopsis "Stax XML API implementation")
8657 (description "Woodstox is a stax XML API implementation.")
8658 (license license:asl2.0)))
8659
8660 (define-public java-fasterxml-jackson-dataformat-xml
8661 (package
8662 (name "java-fasterxml-jackson-dataformat-xml")
8663 (version "2.9.4")
8664 (source (origin
8665 (method url-fetch)
8666 (uri (string-append "https://github.com/FasterXML/"
8667 "jackson-dataformat-xml/archive/"
8668 "jackson-dataformat-xml-" version ".tar.gz"))
8669 (sha256
8670 (base32
8671 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8672 (build-system ant-build-system)
8673 (arguments
8674 `(#:jar-name "jackson-dataformat-xml.jar"
8675 #:source-dir "src/main/java"
8676 #:test-exclude
8677 (list "**/failing/**")
8678 #:phases
8679 (modify-phases %standard-phases
8680 (add-before 'configure 'generate-PackageVersion.java
8681 (lambda _
8682 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8683 (in (string-append out ".in")))
8684 (copy-file in out)
8685 (newline)
8686 (substitute* out
8687 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8688 (("@projectversion@") ,version)
8689 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8690 (("@projectartifactid@") "jackson-dataformat-xml")))
8691 #t))
8692 (add-before 'build 'copy-resources
8693 (lambda _
8694 (copy-recursively "src/main/resources" "build/classes")
8695 #t)))))
8696 (inputs
8697 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8698 ("jackson-core" ,java-fasterxml-jackson-core)
8699 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8700 ("jackson-databind" ,java-fasterxml-jackson-databind)
8701 ("stax2-api" ,java-stax2-api)
8702 ("woodstox" ,java-woodstox-core)))
8703 (native-inputs
8704 `(("junit" ,java-junit)
8705 ("hamcrest" ,java-hamcrest-core)))
8706 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8707 (synopsis "Read and write XML")
8708 (description "This package contains Jackson extension component for reading
8709 and writing XML encoded data.
8710
8711 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8712 approach (that is, no support is added for \"Schema-first\" approach). Support
8713 for JAXB annotations is provided by JAXB annotation module; this module
8714 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8715 @code{JsonFactory}) as well as small number of higher level overrides needed to
8716 make data-binding work.")
8717 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8718
8719 (define-public java-hdrhistogram
8720 (package
8721 (name "java-hdrhistogram")
8722 (version "2.1.9")
8723 (source (origin
8724 (method url-fetch)
8725 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8726 "archive/HdrHistogram-" version ".tar.gz"))
8727 (sha256
8728 (base32
8729 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8730 (build-system ant-build-system)
8731 (arguments
8732 `(#:jar-name "java-hdrhistogram.jar"
8733 #:source-dir "src/main/java"
8734 #:phases
8735 (modify-phases %standard-phases
8736 (add-before 'configure 'set-version
8737 (lambda _
8738 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8739 (template (string-append version-java ".template")))
8740 (copy-file template version-java)
8741 (substitute* version-java
8742 (("\\$VERSION\\$") ,version)
8743 (("\\$BUILD_TIME\\$") "0"))
8744 #t))))))
8745 (native-inputs
8746 `(("junit" ,java-junit)
8747 ("hamcrest" ,java-hamcrest-core)))
8748 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8749 (synopsis "High dynamic range histogram")
8750 (description "Hdrhistogram allows to create histograms that support
8751 recording and analyzing sampled data value counts across a configurable integer
8752 value range with configurable value precision within the range. Value precision
8753 is expressed as the number of significant digits in the value recording, and
8754 provides control over value quantization behavior across the value range and
8755 the subsequent value resolution at any given level.")
8756 (license license:public-domain)))
8757
8758 (define-public java-cofoja
8759 (package
8760 (name "java-cofoja")
8761 (version "1.3")
8762 (source (origin
8763 (method git-fetch)
8764 (uri (git-reference
8765 (url "https://github.com/nhatminhle/cofoja.git")
8766 (commit (string-append "v" version))))
8767 (file-name (string-append "java-cofoja-" version "-checkout"))
8768 (sha256
8769 (base32
8770 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8771 (build-system ant-build-system)
8772 (arguments
8773 `(#:build-target "dist"
8774 #:test-target "test"
8775 #:jdk ,icedtea-8
8776 #:make-flags
8777 (list "-Ddist.dir=dist")
8778 #:modules ((guix build ant-build-system)
8779 (guix build java-utils)
8780 (guix build utils)
8781 (srfi srfi-1)
8782 (ice-9 match))
8783 #:phases
8784 (modify-phases %standard-phases
8785 ;; The bulid system ignores the class path the ant-build-system sets
8786 ;; up and instead expects to find all dependencies in the "lib"
8787 ;; directory.
8788 (add-after 'unpack 'create-libdir
8789 (lambda* (#:key inputs #:allow-other-keys)
8790 (mkdir-p "lib")
8791 (for-each
8792 (lambda (file)
8793 (let ((target (string-append "lib/" (basename file))))
8794 (unless (file-exists? target)
8795 (symlink file target))))
8796 (append-map (match-lambda
8797 ((label . dir)
8798 (find-files dir "\\.jar$")))
8799 inputs))
8800 #t))
8801 (replace 'install (install-jars "dist")))))
8802 (inputs
8803 `(("java-asm" ,java-asm)))
8804 (native-inputs
8805 `(("java-junit" ,java-junit)))
8806 (home-page "https://github.com/nhatminhle/cofoja")
8807 (synopsis "Contracts for Java")
8808 (description "Contracts for Java, or Cofoja for short, is a contract
8809 programming framework and test tool for Java, which uses annotation processing
8810 and bytecode instrumentation to provide run-time checking. (In particular,
8811 this is not a static analysis tool.)")
8812 (license license:lgpl3+)))
8813
8814 (define-public java-aopalliance
8815 (package
8816 (name "java-aopalliance")
8817 (version "1.0")
8818 (source (origin
8819 (method git-fetch)
8820 ;; Note: this git repository is not official, but contains the
8821 ;; source code that is in the CVS repository. Downloading the
8822 ;; tarball from sourceforge is undeterministic, and the cvs download
8823 ;; fails.
8824 (uri (git-reference
8825 (url "https://github.com/hoverruan/aopalliance")
8826 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8827 (file-name (string-append name "-" version))
8828 (sha256
8829 (base32
8830 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8831 (build-system ant-build-system)
8832 (arguments
8833 `(#:jar-name "java-aopalliance.jar"
8834 #:jdk ,icedtea-8
8835 #:tests? #f; no tests
8836 #:source-dir "aopalliance/src/main"))
8837 (home-page "http://aopalliance.sourceforge.net")
8838 (synopsis "Aspect-Oriented Programming")
8839 (description "The AOP Alliance project is a joint project between several
8840 software engineering people who are interested in Aspect-Oriented Programming
8841 (AOP) and Java.")
8842 (license license:public-domain)))
8843
8844 (define-public java-javax-inject
8845 (package
8846 (name "java-javax-inject")
8847 (version "tck-1")
8848 (source (origin
8849 (method url-fetch)
8850 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8851 "archive/javax.inject-" version ".tar.gz"))
8852 (sha256
8853 (base32
8854 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8855 (build-system ant-build-system)
8856 (arguments
8857 `(#:jar-name "java-javax-inject.jar"
8858 #:jdk ,icedtea-8
8859 #:tests? #f)); no tests
8860 (home-page "http://github.com/javax-inject/javax-inject")
8861 (synopsis "JSR-330: Dependency Injection for Java")
8862 (description "This package specifies a means for obtaining objects in such
8863 a way as to maximize reusability, testability and maintainability compared to
8864 traditional approaches such as constructors, factories, and service locators
8865 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8866 most nontrivial applications.
8867
8868 Many types depend on other types. For example, a @var{Stopwatch} might depend
8869 on a @var{TimeSource}. The types on which a type depends are known as its
8870 dependencies. The process of finding an instance of a dependency to use at run
8871 time is known as resolving the dependency. If no such instance can be found,
8872 the dependency is said to be unsatisfied, and the application is broken.")
8873 (license license:asl2.0)))
8874
8875 (define-public java-guice
8876 (package
8877 (name "java-guice")
8878 (version "4.1")
8879 (source (origin
8880 (method url-fetch)
8881 (uri (string-append "https://github.com/google/guice/archive/"
8882 version ".tar.gz"))
8883 (file-name (string-append name "-" version ".tar.gz"))
8884 (modules '((guix build utils)))
8885 (snippet
8886 `(begin
8887 (for-each delete-file (find-files "." ".*.jar"))))
8888 (sha256
8889 (base32
8890 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8891 (build-system ant-build-system)
8892 (arguments
8893 `(#:jar-name "java-guice.jar"
8894 #:jdk ,icedtea-8
8895 #:tests? #f; FIXME: tests are not in a java sub directory
8896 #:source-dir "core/src"))
8897 (inputs
8898 `(("guava" ,java-guava)
8899 ("java-cglib" ,java-cglib)
8900 ("java-aopalliance" ,java-aopalliance)
8901 ("java-javax-inject" ,java-javax-inject)
8902 ("java-asm" ,java-asm)))
8903 (home-page "https://github.com/google/guice")
8904 (synopsis "Lightweight dependency injection framework")
8905 (description "Guice is a lightweight dependency injection framework fo
8906 Java 6 and above.")
8907 (license license:asl2.0)))
8908
8909 (define-public java-guice-servlet
8910 (package
8911 (inherit java-guice)
8912 (name "java-guice-servlet")
8913 (arguments
8914 `(#:jar-name "guice-servlet.jar"
8915 #:source-dir "extensions/servlet/src/"
8916 #:jdk ,icedtea-8
8917 #:tests? #f)); FIXME: not in a java subdir
8918 (inputs
8919 `(("guice" ,java-guice)
8920 ("servlet" ,java-classpathx-servletapi)
8921 ,@(package-inputs java-guice)))))
8922
8923 (define-public java-assertj
8924 (package
8925 (name "java-assertj")
8926 (version "3.8.0")
8927 (source (origin
8928 (method url-fetch)
8929 (uri (string-append "https://github.com/joel-costigliola/"
8930 "assertj-core/archive/"
8931 "assertj-core-" version ".tar.gz"))
8932 (sha256
8933 (base32
8934 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8935 (build-system ant-build-system)
8936 (arguments
8937 `(#:jar-name "java-assertj.jar"
8938 #:jdk ,icedtea-8
8939 #:source-dir "src/main/java"
8940 #:tests? #f)); depends on tng-junit which depends on assertj
8941 (inputs
8942 `(("cglib" ,java-cglib)
8943 ("junit" ,java-junit)
8944 ("hamcrest" ,java-hamcrest-core)))
8945 (native-inputs
8946 `(("mockito" ,java-mockito-1)))
8947 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8948 (synopsis "Fluent assertions for java")
8949 (description "AssertJ core is a Java library that provides a fluent
8950 interface for writing assertions. Its main goal is to improve test code
8951 readability and make maintenance of tests easier.")
8952 (license license:asl2.0)))
8953
8954 (define-public java-jboss-javassist
8955 (package
8956 (name "java-jboss-javassist")
8957 (version "3.21.0")
8958 (source (origin
8959 (method url-fetch)
8960 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8961 "archive/rel_"
8962 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8963 "_ga.tar.gz"))
8964 (sha256
8965 (base32
8966 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8967 (build-system ant-build-system)
8968 (arguments
8969 `(#:jar-name "java-jboss-javassist.jar"
8970 #:jdk ,icedtea-8
8971 #:source-dir "src/main"
8972 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8973 #:phases
8974 (modify-phases %standard-phases
8975 (add-before 'configure 'remove-binary
8976 (lambda _
8977 (delete-file "javassist.jar")
8978 #t)))))
8979 (native-inputs
8980 `(("junit" ,java-junit)))
8981 (home-page "https://github.com/jboss-javassist/javassist")
8982 (synopsis "Java bytecode engineering toolkit")
8983 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8984 manipulation simple. It is a class library for editing bytecodes in Java; it
8985 enables Java programs to define a new class at runtime and to modify a class
8986 file when the JVM loads it.")
8987 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8988
8989 (define-public java-jcommander
8990 (package
8991 (name "java-jcommander")
8992 (version "1.71")
8993 (source (origin
8994 (method url-fetch)
8995 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8996 version ".tar.gz"))
8997 (file-name (string-append name "-" version ".tar.gz"))
8998 (sha256
8999 (base32
9000 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
9001 (build-system ant-build-system)
9002 (arguments
9003 `(#:jar-name "java-jcommander.jar"
9004 #:jdk ,icedtea-8
9005 #:tests? #f; requires testng which depends on jcommander
9006 #:source-dir "src/main/java"))
9007 (home-page "https://jcommander.org")
9008 (synopsis "Command line parameters parser")
9009 (description "JCommander is a very small Java framework that makes it
9010 trivial to parse command line parameters. Parameters are declared with
9011 annotations.")
9012 (license license:asl2.0)))
9013
9014 (define-public java-bsh
9015 (package
9016 (name "java-bsh")
9017 (version "2.0b6")
9018 (source (origin
9019 (method url-fetch)
9020 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
9021 version ".tar.gz"))
9022 (file-name (string-append name "-" version ".tar.gz"))
9023 (sha256
9024 (base32
9025 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
9026 (build-system ant-build-system)
9027 (arguments
9028 `(#:build-target "jarall"
9029 #:test-target "junit-tests-all"
9030 #:phases
9031 (modify-phases %standard-phases
9032 (replace 'install
9033 (lambda* (#:key outputs #:allow-other-keys)
9034 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9035 (mkdir-p share)
9036 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9037 #t))))))
9038 (home-page "http://beanshell.org/")
9039 (synopsis "Lightweight Scripting for Java")
9040 (description "BeanShell is a small, free, embeddable Java source
9041 interpreter with object scripting language features, written in Java.
9042 BeanShell dynamically executes standard Java syntax and extends it with common
9043 scripting conveniences such as loose types, commands, and method closures like
9044 those in Perl and JavaScript.")
9045 (license license:asl2.0)))
9046
9047 (define-public java-fest-util
9048 (package
9049 (name "java-fest-util")
9050 (version "1.2.5")
9051 (source (origin
9052 (method url-fetch)
9053 (uri (string-append "https://github.com/alexruiz/fest-util/"
9054 "archive/fest-util-" version ".tar.gz"))
9055 (sha256
9056 (base32
9057 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
9058 (build-system ant-build-system)
9059 (arguments
9060 `(#:jar-name "java-fest-util.jar"
9061 #:source-dir "src/main/java"))
9062 (native-inputs
9063 `(("junit" ,java-junit)
9064 ("hamcrest" ,java-hamcrest-core)))
9065 (home-page "https://github.com/alexruiz/fest-util")
9066 (synopsis "FEST common utilities")
9067 (description "Common utilities used in all FEST module.")
9068 (license license:asl2.0)))
9069
9070 (define-public java-fest-test
9071 (package
9072 (name "java-fest-test")
9073 (version "2.1.0")
9074 (source (origin
9075 (method url-fetch)
9076 (uri (string-append "https://github.com/alexruiz/fest-test/"
9077 "archive/fest-test-" version ".tar.gz"))
9078 (sha256
9079 (base32
9080 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
9081 (build-system ant-build-system)
9082 (arguments
9083 `(#:jar-name "java-fest-test.jar"
9084 #:source-dir "src/main/java"
9085 #:tests? #f)); no tests
9086 (inputs
9087 `(("junit" ,java-junit)))
9088 (home-page "https://github.com/alexruiz/fest-test")
9089 (synopsis "Common FEST testing infrastructure")
9090 (description "Fest-test contains the common FEST testing infrastructure.")
9091 (license license:asl2.0)))
9092
9093 (define-public java-fest-assert
9094 (package
9095 (name "java-fest-assert")
9096 (version "2.0M10")
9097 (source (origin
9098 (method url-fetch)
9099 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
9100 "archive/fest-assert-core-" version ".tar.gz"))
9101 (sha256
9102 (base32
9103 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
9104 (build-system ant-build-system)
9105 (arguments
9106 `(#:jar-name "java-fest-assert.jar"
9107 #:source-dir "src/main/java"
9108 #:test-exclude
9109 (list
9110 "**/Abstract*.java"
9111 "**/*BaseTest.java"
9112 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9113 "**/MessageFormatter_format_Test.java"
9114 "**/internal/*/*_assert*_Test.java")))
9115 (inputs
9116 `(("java-fest-util" ,java-fest-util)))
9117 (native-inputs
9118 `(("java-junit" ,java-junit)
9119 ("java-fest-test" ,java-fest-test)
9120 ("java-hamcrest-core" ,java-hamcrest-core)
9121 ("java-mockito" ,java-mockito-1)
9122 ("java-cglib" ,java-cglib)
9123 ("java-objenesis" ,java-objenesis)
9124 ("java-asm" ,java-asm)))
9125 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9126 (synopsis "FEST fluent assertions")
9127 (description "FEST-Assert provides a fluent interface for assertions.")
9128 (license license:asl2.0)))
9129
9130 (define-public java-testng
9131 (package
9132 (name "java-testng")
9133 (version "6.14.3")
9134 (source (origin
9135 (method git-fetch)
9136 (uri (git-reference
9137 (url "https://github.com/cbeust/testng.git")
9138 (commit version)))
9139 (file-name (string-append name "-" version "-checkout"))
9140 (sha256
9141 (base32
9142 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
9143 (build-system ant-build-system)
9144 (arguments
9145 `(#:jdk ,icedtea-8; java.util.function
9146 #:jar-name "java-testng.jar"
9147 #:source-dir "src/main/java"
9148 #:phases
9149 (modify-phases %standard-phases
9150 ;; FIXME: I don't know why these tests fail
9151 (add-after 'unpack 'delete-failing-tests
9152 (lambda _
9153 (substitute* "src/test/resources/testng.xml"
9154 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9155 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9156 #t))
9157 ;; We don't have groovy
9158 (add-after 'unpack 'delete-groovy-tests
9159 (lambda _
9160 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9161 (substitute* "src/test/resources/testng.xml"
9162 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9163 #t))
9164 (add-before 'build 'copy-resources
9165 (lambda _
9166 (copy-recursively "src/main/resources" "build/classes")
9167 #t))
9168 (add-before 'check 'copy-test-resources
9169 (lambda _
9170 (copy-recursively "src/test/resources" "build/test-classes")
9171 #t))
9172 (replace 'check
9173 (lambda _
9174 (invoke "ant" "compile-tests")
9175 ;; we don't have groovy
9176 (substitute* "src/test/resources/testng.xml"
9177 (("<class name=\"test.groovy.GroovyTest\" />") ""))
9178 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9179 ":build/classes"
9180 ":build/test-classes")
9181 "-Dtest.resources.dir=src/test/resources"
9182 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
9183 (propagated-inputs
9184 `(("junit" ,java-junit)
9185 ("java-jsr305" ,java-jsr305)
9186 ("java-bsh" ,java-bsh)
9187 ("java-jcommander" ,java-jcommander)
9188 ("java-guice" ,java-guice)
9189 ("snakeyaml" ,java-snakeyaml)))
9190 (native-inputs
9191 `(("guava" ,java-guava)
9192 ("java-javax-inject" ,java-javax-inject)
9193 ("java-hamcrest" ,java-hamcrest-all)
9194 ("java-assertj" ,java-assertj)
9195 ("java-mockito" ,java-mockito-1)
9196 ("cglib" ,java-cglib)
9197 ("asm" ,java-asm)
9198 ("aopalliance" ,java-aopalliance)))
9199 (home-page "https://testng.org")
9200 (synopsis "Testing framework")
9201 (description "TestNG is a testing framework inspired from JUnit and NUnit
9202 but introducing some new functionalities that make it more powerful and easier
9203 to use.")
9204 (license license:asl2.0)))
9205
9206 (define-public java-jnacl
9207 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9208 (revision "2"))
9209 (package
9210 (name "java-jnacl")
9211 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9212 (source (origin
9213 (method git-fetch)
9214 (uri (git-reference
9215 (url "https://github.com/neilalexander/jnacl.git")
9216 (commit commit)))
9217 (file-name (git-file-name name version))
9218 (sha256
9219 (base32
9220 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9221 (build-system ant-build-system)
9222 (arguments
9223 `(#:jar-name "jnacl.jar"
9224 #:source-dir "src/main/java"
9225 #:jdk ,icedtea-8
9226 #:phases
9227 (modify-phases %standard-phases
9228 (add-before 'build 'fix-tests
9229 (lambda _
9230 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9231 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9232 (("assertions.Assertions") "assertions.api.Assertions"))
9233 #t))
9234 (replace 'check
9235 (lambda _
9236 (invoke "ant" "compile-tests")
9237 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9238 ":build/classes"
9239 ":build/test-classes")
9240 "org.testng.TestNG" "-testclass"
9241 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9242 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9243 ":build/classes"
9244 ":build/test-classes")
9245 "org.testng.TestNG" "-testclass"
9246 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9247 (native-inputs
9248 `(("java-testng" ,java-testng)
9249 ("java-fest-util" ,java-fest-util)
9250 ("java-fest-assert" ,java-fest-assert)))
9251 (home-page "https://github.com/neilalexander/jnacl")
9252 (synopsis "Java implementation of NaCl")
9253 (description "Pure Java implementation of the NaCl: Networking and
9254 Cryptography library.")
9255 (license license:bsd-2))))
9256
9257 (define-public java-mvel2
9258 (package
9259 (name "java-mvel2")
9260 (version "2.3.1")
9261 (source (origin
9262 (method url-fetch)
9263 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9264 version ".Final.tar.gz"))
9265 (sha256
9266 (base32
9267 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9268 (build-system ant-build-system)
9269 (arguments
9270 `(#:jar-name "mvel2.jar"
9271 #:source-dir "src/main/java"
9272 #:test-exclude
9273 (list "**/Abstract*.java"
9274 ;; Base class with no tests
9275 "**/MVELThreadTest.java")
9276 #:phases
9277 (modify-phases %standard-phases
9278 (add-after 'install 'install-bin
9279 (lambda* (#:key outputs #:allow-other-keys)
9280 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9281 (mkdir-p bin)
9282 (with-output-to-file (string-append bin "/mvel2")
9283 (lambda _
9284 (display
9285 (string-append
9286 "#!" (which "bash") "\n"
9287 "if [ \"$#\" -ne \"2\" ]; then\n"
9288 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9289 "exit\n"
9290 "fi\n"
9291 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9292 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9293 " org.mvel2.sh.Main $1"))))
9294 (chmod (string-append bin "/mvel2") #o755))
9295 #t)))))
9296 (native-inputs
9297 `(("junit" ,java-junit)
9298 ("hamcrest" ,java-hamcrest-core)))
9299 (home-page "https://github.com/mvel/mvel")
9300 (synopsis "MVFLEX Expression Language")
9301 (description "MVEL has largely been inspired by Java syntax, but has some
9302 fundamental differences aimed at making it more efficient as an expression
9303 language, such as operators that directly support collection, array and string
9304 matching, as well as regular expressions. MVEL is used to evaluate expressions
9305 written using Java syntax.
9306
9307 In addition to the expression language, MVEL serves as a templating language for
9308 configuration and string construction.")
9309 (license license:asl2.0)))
9310
9311 (define-public java-commons-jexl-2
9312 (package
9313 (name "java-commons-jexl")
9314 (version "2.1.1")
9315 (source (origin
9316 (method url-fetch)
9317 (uri (string-append "mirror://apache/commons/jexl/source/"
9318 "commons-jexl-" version "-src.tar.gz"))
9319 (sha256
9320 (base32
9321 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9322 (build-system ant-build-system)
9323 (arguments
9324 `(#:jar-name "commons-jexl-2.jar"
9325 #:jdk ,icedtea-8
9326 #:source-dir "src/main/java"
9327 #:phases
9328 (modify-phases %standard-phases
9329 (add-before 'check 'disable-broken-tests
9330 (lambda* (#:key inputs #:allow-other-keys)
9331 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9332 (substitute* "ArithmeticTest.java"
9333 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9334 (("asserter.assertExpression\\(\"imanull") "//"))
9335 ;; This test fails with "ambiguous method invocation"
9336 (delete-file "CacheTest.java")
9337 ;; This test doesn't have access to the temp directory
9338 (substitute* "ClassCreatorTest.java"
9339 (("java.io.tmpdir") "user.dir"))
9340 ;; This test fails in trying to detect whether it can run.
9341 (substitute* "ClassCreator.java"
9342 (("boolean canRun =.*") "boolean canRun = false;\n"))
9343 ;; ...and these tests depend on it.
9344 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9345 (delete-file "scripting/JexlScriptEngineTest.java"))
9346 #t))
9347 (add-before 'build 'run-javacc
9348 (lambda _
9349 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9350 (invoke "java" "jjtree" "Parser.jjt")
9351 (invoke "java" "javacc" "Parser.jj"))
9352 #t)))))
9353 (inputs
9354 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9355 (native-inputs
9356 `(("java-junit" ,java-junit)
9357 ("java-hamcrest-core" ,java-hamcrest-core)
9358 ("javacc" ,javacc-4)))
9359 (home-page "https://commons.apache.org/proper/commons-jexl/")
9360 (synopsis "Java Expression Language ")
9361 (description "JEXL is a library intended to facilitate the implementation
9362 of dynamic and scripting features in applications and frameworks written in
9363 Java. JEXL implements an Expression Language based on some extensions to the
9364 JSTL Expression Language supporting most of the constructs seen in
9365 shell-script or ECMAScript. Its goal is to expose scripting features usable
9366 by technical operatives or consultants working with enterprise platforms.")
9367 (license license:asl2.0)))
9368
9369 (define-public java-lz4
9370 (package
9371 (name "java-lz4")
9372 (version "1.4.0")
9373 (source (origin
9374 (method url-fetch)
9375 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9376 version ".tar.gz"))
9377 (file-name (string-append name "-" version ".tar.gz"))
9378 (sha256
9379 (base32
9380 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9381 (build-system ant-build-system)
9382 (arguments
9383 `(#:jar-name "lz4.jar"
9384 #:jdk ,icedtea-8
9385 #:source-dir "src/java:src/java-unsafe"
9386 #:tests? #f; FIXME: requires more dependencies
9387 #:phases
9388 (modify-phases %standard-phases
9389 (add-before 'configure 'generate-source
9390 (lambda _
9391 (with-directory-excursion "src/build/source_templates"
9392 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9393 #t)))))
9394 (native-inputs
9395 `(("mvel" ,java-mvel2)))
9396 (home-page "https://jpountz.github.io/lz4-java")
9397 (synopsis "Compression algorithm")
9398 (description "LZ4 - Java is a Java port of the popular lz4 compression
9399 algorithms and xxHash hashing algorithm.")
9400 (license license:asl2.0)))
9401
9402 (define-public java-bouncycastle
9403 (package
9404 (name "java-bouncycastle")
9405 (version "1.60")
9406 (source (origin
9407 (method url-fetch)
9408 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9409 (substring version 0 1) "v"
9410 (substring version 2 4) ".tar.gz"))
9411 (sha256
9412 (base32
9413 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9414 (modules '((guix build utils)))
9415 (snippet
9416 '(begin
9417 (for-each delete-file
9418 (find-files "." "\\.jar$"))
9419 #t))))
9420 (build-system ant-build-system)
9421 (arguments
9422 `(#:jdk ,icedtea-8
9423 #:tests? #f
9424 #:phases
9425 (modify-phases %standard-phases
9426 (replace 'build
9427 (lambda _
9428 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9429 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9430 ;; FIXME: the tests freeze.
9431 ;; (replace 'check
9432 ;; (lambda _
9433 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9434 (replace 'install
9435 (install-jars "build/artifacts/jdk1.5/jars")))))
9436 (inputs
9437 `(("java-javax-mail" ,java-javax-mail)))
9438 (native-inputs
9439 `(("unzip" ,unzip)
9440 ("junit" ,java-junit)
9441 ("java-native-access" ,java-native-access)
9442 ("java-native-access-platform" ,java-native-access-platform)))
9443 (home-page "https://www.bouncycastle.org")
9444 (synopsis "Cryptographic library")
9445 (description "Bouncy Castle is a cryptographic library for the Java
9446 programming language.")
9447 (license license:expat)))
9448
9449 (define-public java-lmax-disruptor
9450 (package
9451 (name "java-lmax-disruptor")
9452 (version "3.3.7")
9453 (source (origin
9454 (method url-fetch)
9455 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9456 "archive/" version ".tar.gz"))
9457 (file-name (string-append name "-" version ".tar.gz"))
9458 (sha256
9459 (base32
9460 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9461 (build-system ant-build-system)
9462 (arguments
9463 `(#:jar-name "java-lmax-disruptor.jar"
9464 #:jdk ,icedtea-8
9465 #:tests? #f)); tests hang
9466 (inputs
9467 `(("junit" ,java-junit)
9468 ("java-hdrhistogram" ,java-hdrhistogram)
9469 ("java-jmock" ,java-jmock)
9470 ("java-jmock-legacy" ,java-jmock-legacy)
9471 ("java-jmock-junit4" ,java-jmock-junit4)
9472 ("java-hamcrest-all" ,java-hamcrest-all)))
9473 (native-inputs
9474 `(("cglib" ,java-cglib)
9475 ("objenesis" ,java-objenesis)
9476 ("asm" ,java-asm)))
9477 (home-page "https://www.lmax.com/disruptor")
9478 (synopsis "High performance inter-thread communication")
9479 (description "LMAX Disruptor is a software pattern and software component
9480 for high performance inter-thread communication that avoids the need for
9481 message queues or resource locking.")
9482 (license license:asl2.0)))
9483
9484 (define-public java-commons-bcel
9485 (package
9486 (name "java-commons-bcel")
9487 (version "6.1")
9488 (source (origin
9489 (method url-fetch)
9490 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9491 version "-src.tar.gz"))
9492 (sha256
9493 (base32
9494 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9495 (build-system ant-build-system)
9496 (arguments
9497 `(#:jar-name "bcel.jar"
9498 #:jdk ,icedtea-8
9499 #:source-dir "src/main/java"
9500 #:test-dir "src/test/java"
9501 ;; FIXME: Tests require the unpackaged jna.
9502 #:tests? #f))
9503 (home-page "https://commons.apache.org/proper/commons-bcel/")
9504 (synopsis "Byte code engineering library")
9505 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9506 intended to give users a convenient way to analyze, create, and
9507 manipulate (binary) Java class files. Classes are represented by objects
9508 which contain all the symbolic information of the given class: methods, fields
9509 and byte code instructions, in particular.
9510
9511 Such objects can be read from an existing file, be transformed by a
9512 program (e.g. a class loader at run-time) and written to a file again. An
9513 even more interesting application is the creation of classes from scratch at
9514 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9515 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9516 of Java @code{.class} files.")
9517 (license license:asl2.0)))
9518
9519 (define-public java-xerial-core
9520 (package
9521 (name "java-xerial-core")
9522 (version "2.1")
9523 (source (origin
9524 (method url-fetch)
9525 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9526 version ".tar.gz"))
9527 (file-name (string-append name "-" version ".tar.gz"))
9528 (sha256
9529 (base32
9530 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9531 (build-system ant-build-system)
9532 (arguments
9533 `(#:jar-name "xerial-core.jar"
9534 #:source-dir "xerial-core/src/main/java"
9535 #:test-dir "xerial-core/src/test"
9536 #:phases
9537 (modify-phases %standard-phases
9538 (add-before 'build 'copy-resources
9539 (lambda _
9540 (copy-recursively "xerial-core/src/main/resources"
9541 "build/classes")
9542 #t)))))
9543 (native-inputs
9544 `(("junit" ,java-junit)
9545 ("hamcrest" ,java-hamcrest-core)))
9546 (home-page "https://github.com/xerial/xerial-java")
9547 (synopsis "Data management libraries for Java")
9548 (description "Xerial is a set of data management libraries for the Java
9549 programming language. The ultimate goal of the Xerial project is to manage
9550 everything as database, including class objects, text format data, data
9551 streams, etc.")
9552 (license license:asl2.0)))
9553
9554 (define-public java-powermock-reflect
9555 (package
9556 (name "java-powermock-reflect")
9557 (version "1.7.3")
9558 (source (origin
9559 (method url-fetch)
9560 (uri (string-append "https://github.com/powermock/powermock/"
9561 "archive/powermock-" version ".tar.gz"))
9562 (file-name (string-append name "-" version ".tar.gz"))
9563 (sha256
9564 (base32
9565 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9566 (patches
9567 (search-patches "java-powermock-fix-java-files.patch"))))
9568 (build-system ant-build-system)
9569 (arguments
9570 `(#:jar-name "java-powermock-reflect.jar"
9571 #:jdk ,icedtea-8
9572 #:source-dir "powermock-reflect/src/main/java"
9573 #:test-dir "powermock-reflect/src/test"))
9574 (inputs
9575 `(("java-objenesis" ,java-objenesis)))
9576 (native-inputs
9577 `(("junit" ,java-junit)
9578 ("cglib" ,java-cglib)
9579 ("asm" ,java-asm)
9580 ("hamcrest" ,java-hamcrest-core)
9581 ("assertj" ,java-assertj)))
9582 (home-page "https://github.com/powermock/powermock")
9583 (synopsis "Mock library extension framework")
9584 (description "PowerMock is a framework that extends other mock libraries
9585 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9586 classloader and bytecode manipulation to enable mocking of static methods,
9587 constructors, final classes and methods, private methods, removal of static
9588 initializers and more. By using a custom classloader no changes need to be
9589 done to the IDE or continuous integration servers which simplifies adoption.")
9590 (license license:asl2.0)))
9591
9592 (define-public java-powermock-core
9593 (package
9594 (inherit java-powermock-reflect)
9595 (name "java-powermock-core")
9596 (arguments
9597 `(#:jar-name "java-powermock-core.jar"
9598 #:source-dir "powermock-core/src/main/java"
9599 #:test-dir "powermock-core/src/test"
9600 #:tests? #f; requires powermock-api
9601 #:jdk ,icedtea-8
9602 #:phases
9603 (modify-phases %standard-phases
9604 (add-before 'build 'copy-resources
9605 (lambda _
9606 (copy-recursively "powermock-core/src/main/resources"
9607 "build/classes")
9608 #t)))))
9609 (inputs
9610 `(("reflect" ,java-powermock-reflect)
9611 ("javassist" ,java-jboss-javassist)))
9612 (native-inputs
9613 `(("junit" ,java-junit)
9614 ("assertj" ,java-assertj)
9615 ("mockito" ,java-mockito-1)))))
9616
9617 (define-public java-powermock-api-support
9618 (package
9619 (inherit java-powermock-reflect)
9620 (name "java-powermock-api-support")
9621 (build-system ant-build-system)
9622 (arguments
9623 `(#:jar-name "java-powermock-api-support.jar"
9624 #:jdk ,icedtea-8
9625 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9626 #:tests? #f)); no tests
9627 (inputs
9628 `(("core" ,java-powermock-core)
9629 ("reflect" ,java-powermock-reflect)))))
9630
9631 (define-public java-powermock-modules-junit4-common
9632 (package
9633 (inherit java-powermock-reflect)
9634 (name "java-powermock-modules-junit4-common")
9635 (build-system ant-build-system)
9636 (arguments
9637 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9638 #:jdk ,icedtea-8
9639 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9640 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9641 (inputs
9642 `(("core" ,java-powermock-core)
9643 ("easymock" ,java-easymock)
9644 ("reflect" ,java-powermock-reflect)
9645 ("hamcrest" ,java-hamcrest-core)
9646 ("cglib" ,java-cglib)))))
9647
9648 (define-public java-powermock-modules-junit4
9649 (package
9650 (inherit java-powermock-reflect)
9651 (name "java-powermock-modules-junit4")
9652 (build-system ant-build-system)
9653 (arguments
9654 `(#:jar-name "java-powermock-modules-junit4.jar"
9655 #:jdk ,icedtea-8
9656 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9657 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9658 #:phases
9659 (modify-phases %standard-phases
9660 (add-before 'build 'fix-junit-detection
9661 (lambda _
9662 ;; Our junit version is 4.12-SNAPSHOT
9663 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9664 "PowerMockJUnit4MethodValidator.java")
9665 (("4.12") "4.12-SNAPSHOT"))
9666 #t)))))
9667 (inputs
9668 `(("core" ,java-powermock-core)
9669 ("reflect" ,java-powermock-reflect)
9670 ("common" ,java-powermock-modules-junit4-common)
9671 ("cglib" ,java-cglib)))
9672 (native-inputs
9673 `(("easymock" ,java-easymock)
9674 ("hamcrest" ,java-hamcrest-core)
9675 ("objenesis" ,java-objenesis)
9676 ("asm" ,java-asm)
9677 ("junit" ,java-junit)))))
9678
9679 (define-public java-powermock-api-easymock
9680 (package
9681 (inherit java-powermock-reflect)
9682 (name "java-powermock-api-easymock")
9683 (build-system ant-build-system)
9684 (arguments
9685 `(#:jar-name "java-powermock-api-easymock.jar"
9686 #:jdk ,icedtea-8
9687 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9688 #:tests? #f; no tests
9689 #:phases
9690 (modify-phases %standard-phases
9691 (add-before 'build 'fix-file
9692 (lambda _
9693 ;; FIXME: This looks wrong, but it fixes a build error.
9694 (with-directory-excursion "powermock-api/powermock-api-easymock"
9695 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9696 (("classLoader instanceof MockClassLoader") "false")
9697 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9698 #t)))))
9699 (inputs
9700 `(("core" ,java-powermock-core)
9701 ("easymock" ,java-easymock)
9702 ("reflect" ,java-powermock-reflect)
9703 ("support" ,java-powermock-api-support)
9704 ("cglib" ,java-cglib)))))
9705
9706 (define-public java-jboss-jms-api-spec
9707 (package
9708 (name "java-jboss-jms-api-spec")
9709 (version "2.0")
9710 (source (origin
9711 (method url-fetch)
9712 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9713 "archive/jboss-jms-api_" version
9714 "_spec-1.0.1.Final.tar.gz"))
9715 (sha256
9716 (base32
9717 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9718 (build-system ant-build-system)
9719 (arguments
9720 `(#:jar-name "java-jboss-jms-api_spec.jar"
9721 #:jdk ,icedtea-8
9722 #:source-dir "."
9723 #:tests? #f)); no tests
9724 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9725 (synopsis "Java Message Service API specification")
9726 (description "Java Message Service (JMS) API is used to send messages
9727 messages between two or more clients. It is a messaging standard that allows
9728 application components to create, send, receive, and read messages.")
9729 ; either gpl2 only with GPL Classpath Exception, or cddl.
9730 (license (list license:gpl2 license:cddl1.0))))
9731
9732 (define-public java-mail
9733 (package
9734 (name "java-mail")
9735 (version "1.6.0")
9736 (source (origin
9737 (method url-fetch)
9738 (uri (string-append "https://github.com/javaee/javamail/archive/"
9739 "JAVAMAIL-1_6_0.tar.gz"))
9740 (sha256
9741 (base32
9742 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9743 (build-system ant-build-system)
9744 (arguments
9745 `(#:jar-name "java-mail.jar"
9746 #:jdk ,icedtea-8
9747 #:source-dir "mail/src/main/java"
9748 #:test-dir "mail/src/test"
9749 #:test-exclude
9750 (list "**/CollectorFormatterTest.java"
9751 "**/CompactFormatterTest.java"
9752 "**/DurationFilterTest.java"
9753 "**/MailHandlerTest.java"
9754 "**/GetLocalAddressTest.java"
9755 ;; FIXME: both end with:
9756 ;; java.lang.ClassNotFoundException:
9757 ;; javax.mail.internet.MimeMultipartParseTest
9758 "**/MimeMultipartParseTest.java"
9759 "**/SearchTermSerializationTest.java")
9760 #:phases
9761 (modify-phases %standard-phases
9762 (add-before 'configure 'move-version.java
9763 (lambda _
9764 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9765 "mail/src/main/java/javax/mail/Version.java")
9766 #t))
9767 (add-before 'build 'copy-resources
9768 (lambda _
9769 (copy-recursively "mail/src/main/resources/META-INF"
9770 "build/classes/META-INF")
9771 #t)))))
9772 (native-inputs
9773 `(("junit" ,java-junit)
9774 ("hamcrest" ,java-hamcrest-core)))
9775 (home-page "https://javaee.github.io/javamail/")
9776 (synopsis "Mail-related functionnalities in Java")
9777 (description "The JavaMail API provides a platform-independent and
9778 protocol-independent framework to build mail and messaging applications.")
9779 ;; General Public License Version 2 only ("GPL") or the Common Development
9780 ;; and Distribution License("CDDL")
9781 (license (list license:cddl1.1
9782 license:gpl2)))); with classpath exception
9783
9784 (define-public java-jeromq
9785 (package
9786 (name "java-jeromq")
9787 (version "0.4.3")
9788 (source (origin
9789 (method git-fetch)
9790 (uri (git-reference
9791 (url "https://github.com/zeromq/jeromq.git")
9792 (commit (string-append "v" version))))
9793 (file-name (string-append name "-" version "-checkout"))
9794 (sha256
9795 (base32
9796 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9797 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9798 (build-system ant-build-system)
9799 (arguments
9800 `(#:jar-name "java-jeromq.jar"
9801 #:source-dir "src/main/java"
9802 #:jdk ,icedtea-8
9803 #:test-exclude
9804 (list
9805 "**/Abstract*.java"
9806 ;; Requires network
9807 "**/ZBeaconTest.java"
9808 ;; Failures
9809 "**/DealerSpecTest.java"
9810 "**/CustomDecoderTest.java"
9811 "**/CustomEncoderTest.java"
9812 "**/ConnectRidTest.java"
9813 "**/ReqSpecTest.java"
9814 "**/PushPullSpecTest.java"
9815 "**/PubSubHwmTest.java"
9816 "**/RouterSpecTest.java"
9817 "**/ProxyTest.java")))
9818 (inputs
9819 `(("java-jnacl" ,java-jnacl)))
9820 (native-inputs
9821 `(("java-hamcrest-core" ,java-hamcrest-core)
9822 ("junit" ,java-junit)))
9823 (home-page "http://zeromq.org/bindings:java")
9824 (synopsis "Java binding for 0MQ")
9825 (description "Jeromq provides the java bindings for 0MQ.")
9826 (license license:mpl2.0)))
9827
9828 (define-public java-kafka-clients
9829 (package
9830 (name "java-kafka-clients")
9831 (version "1.0.0")
9832 (source (origin
9833 (method url-fetch)
9834 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9835 version "-src.tgz"))
9836 (sha256
9837 (base32
9838 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9839 (build-system ant-build-system)
9840 (arguments
9841 `(#:jar-name "java-kafka-clients.jar"
9842 #:jdk ,icedtea-8
9843 #:source-dir "clients/src/main/java"
9844 #:test-dir "clients/src/test"
9845 #:test-exclude
9846 (list
9847 ;; This file does not contain a class
9848 "**/IntegrationTest.java"
9849 ;; Requires network
9850 "**/ClientUtilsTest.java"
9851 ;; End with errors that seem related to our powermock
9852 "**/KafkaProducerTest.java"
9853 "**/BufferPoolTest.java")))
9854 (inputs
9855 `(("java-slf4j-api" ,java-slf4j-api)
9856 ("java-lz4" ,java-lz4)))
9857 (native-inputs
9858 `(("junit" ,java-junit)
9859 ("hamcrest" ,java-hamcrest-all)
9860 ("objenesis" ,java-objenesis)
9861 ("asm" ,java-asm)
9862 ("cglib" ,java-cglib)
9863 ("javassist" ,java-jboss-javassist)
9864 ("snappy" ,java-snappy)
9865 ("easymock" ,java-easymock)
9866 ("powermock" ,java-powermock-core)
9867 ("powermock-easymock" ,java-powermock-api-easymock)
9868 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9869 ("powermock-junit4" ,java-powermock-modules-junit4)
9870 ("powermock-support" ,java-powermock-api-support)
9871 ("java-bouncycastle" ,java-bouncycastle)))
9872 (home-page "https://kafka.apache.org")
9873 (synopsis "Distributed streaming platform")
9874 (description "Kafka is a distributed streaming platform, which means:
9875 @itemize
9876 @item it can publish and subscribe to streams of records;
9877 @item it can store streams of records in a fault-tolerant way;
9878 @item it can process streams of records as they occur.
9879 @end itemize")
9880 ;; Either cddl or gpl2 only.
9881 (license (list license:cddl1.1; actually cddl1.1
9882 license:gpl2)))); with classpath exception
9883
9884 (define-public java-jdom
9885 (package
9886 (name "java-jdom")
9887 (version "1.1.3")
9888 (source (origin
9889 (method url-fetch)
9890 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9891 version ".tar.gz"))
9892 (sha256
9893 (base32
9894 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9895 (build-system ant-build-system)
9896 (arguments
9897 `(#:build-target "package"
9898 #:tests? #f; tests are run as part of the build process
9899 #:phases
9900 (modify-phases %standard-phases
9901 (replace 'install
9902 (install-jars "build")))))
9903 (home-page "http://jdom.org/")
9904 (synopsis "Access, manipulate, and output XML data")
9905 (description "Java-based solution for accessing, manipulating, and
9906 outputting XML data from Java code.")
9907 (license license:bsd-4)))
9908
9909 (define-public java-geronimo-xbean-reflect
9910 (package
9911 (name "java-geronimo-xbean-reflect")
9912 (version "4.5")
9913 (source (origin
9914 (method svn-fetch)
9915 (uri (svn-reference
9916 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9917 (revision 1807396)))
9918 (file-name (string-append name "-" version))
9919 (sha256
9920 (base32
9921 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9922 (build-system ant-build-system)
9923 (arguments
9924 `(#:jar-name "geronimo-xbean-reflect.jar"
9925 #:source-dir "xbean-reflect/src/main/java"
9926 #:test-dir "xbean-reflect/src/test"
9927 #:jdk ,icedtea-8
9928 #:test-exclude
9929 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9930 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9931 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9932 #:phases
9933 (modify-phases %standard-phases
9934 (add-before 'build 'fix-source
9935 (lambda _
9936 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9937 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9938 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9939 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9940 #t))))))
9941 (inputs
9942 `(("asm" ,java-asm)
9943 ("log4j" ,java-log4j-api)
9944 ("log4j-1.2" ,java-log4j-1.2-api)
9945 ("log4j-core" ,java-log4j-core)
9946 ("logging" ,java-commons-logging-minimal)))
9947 (native-inputs
9948 `(("junit" ,java-junit)))
9949 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9950 (synopsis "Dependency injection helper")
9951 (description "Xbean-reflect provides very flexible ways to create objects
9952 and graphs of objects for dependency injection frameworks")
9953 (license license:asl2.0)))
9954
9955 (define-public java-geronimo-xbean-bundleutils
9956 (package
9957 (inherit java-geronimo-xbean-reflect)
9958 (name "java-geronimo-xbean-bundleutils")
9959 (arguments
9960 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9961 #:source-dir "xbean-bundleutils/src/main/java"
9962 #:test-dir "xbean-bundleutils/src/test"
9963 #:phases
9964 (modify-phases %standard-phases
9965 (add-before 'build 'fix-java
9966 (lambda _
9967 ;; We use a more recent version of osgi, so this file requires
9968 ;; more interface method implementations.
9969 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9970 (("import org.osgi.framework.ServiceRegistration;")
9971 "import org.osgi.framework.ServiceRegistration;
9972 import org.osgi.framework.ServiceFactory;
9973 import java.util.Collection;
9974 import org.osgi.framework.ServiceObjects;")
9975 (("public Bundle getBundle\\(\\)")
9976 "@Override
9977 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9978 throw new UnsupportedOperationException();
9979 }
9980 @Override
9981 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9982 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9983 throw new UnsupportedOperationException();
9984 }
9985 public Bundle getBundle()"))
9986 #t)))))
9987 (inputs
9988 `(("java-slf4j" ,java-slf4j-api)
9989 ("java-asm" ,java-asm)
9990 ("java-osgi-framework" ,java-osgi-framework)
9991 ("java-eclipse-osgi" ,java-eclipse-osgi)
9992 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9993
9994 (define-public java-geronimo-xbean-asm-util
9995 (package
9996 (inherit java-geronimo-xbean-reflect)
9997 (name "java-geronimo-xbean-asm-util")
9998 (arguments
9999 `(#:jar-name "geronimo-xbean-asm-util.jar"
10000 #:source-dir "xbean-asm-util/src/main/java"
10001 #:tests? #f)); no tests
10002 (inputs
10003 `(("java-asm" ,java-asm)))
10004 (native-inputs '())))
10005
10006 (define-public java-geronimo-xbean-finder
10007 (package
10008 (inherit java-geronimo-xbean-reflect)
10009 (name "java-geronimo-xbean-finder")
10010 (arguments
10011 `(#:jar-name "geronimo-xbean-finder.jar"
10012 #:source-dir "xbean-finder/src/main/java"
10013 #:test-dir "xbean-finder/src/test"))
10014 (inputs
10015 `(("java-slf4j-api" ,java-slf4j-api)
10016 ("java-asm" ,java-asm)
10017 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10018 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10019 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10020 ("java-osgi-framework" ,java-osgi-framework)))
10021 (native-inputs
10022 `(("java-junit" ,java-junit)
10023 ("java-hamcrest-core" ,java-hamcrest-core)))))
10024
10025 (define-public java-gson
10026 (package
10027 (name "java-gson")
10028 (version "2.8.2")
10029 (source (origin
10030 (method url-fetch)
10031 (uri (string-append "https://github.com/google/gson/archive/"
10032 "gson-parent-" version ".tar.gz"))
10033 (sha256
10034 (base32
10035 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10036 (build-system ant-build-system)
10037 (arguments
10038 `(#:jar-name "gson.jar"
10039 #:source-dir "gson/src/main/java"
10040 #:test-dir "gson/src/test"))
10041 (native-inputs
10042 `(("java-junit" ,java-junit)
10043 ("java-hamcrest-core" ,java-hamcrest-core)))
10044 (home-page "https://github.com/google/gson")
10045 (synopsis "Java serialization/deserialization library from/to JSON")
10046 (description "Gson is a Java library that can be used to convert Java
10047 Objects into their JSON representation. It can also be used to convert a JSON
10048 string to an equivalent Java object. Gson can work with arbitrary Java objects
10049 including pre-existing objects that you do not have source-code of.")
10050 (license license:asl2.0)))
10051
10052 (define-public java-hawtjni
10053 (package
10054 (name "java-hawtjni")
10055 (version "1.15")
10056 (source (origin
10057 (method url-fetch)
10058 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10059 "hawtjni-project-" version ".tar.gz"))
10060 (sha256
10061 (base32
10062 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10063 (build-system ant-build-system)
10064 (arguments
10065 `(#:jar-name "hawtjni.jar"
10066 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10067 #:tests? #f; no tests
10068 #:phases
10069 (modify-phases %standard-phases
10070 (add-before 'build 'build-native
10071 (lambda* (#:key inputs #:allow-other-keys)
10072 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10073 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10074 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10075 "-fPIC" "-O2" include)
10076 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10077 "-fPIC" "-O2" include)
10078 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10079 "hawtjni.o" "hawtjni-callback.o")))
10080 #t))
10081 (add-after 'install 'install-native
10082 (lambda* (#:key outputs #:allow-other-keys)
10083 (let* ((out (assoc-ref outputs "out"))
10084 (lib (string-append out "/lib"))
10085 (inc (string-append out "/include")))
10086 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10087 (install-file "libhawtjni.so" lib)
10088 (install-file "hawtjni.h" inc)))
10089 #t)))))
10090 (inputs
10091 `(("java-commons-cli" ,java-commons-cli)
10092 ("java-asm" ,java-asm)
10093 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10094 (home-page "https://fusesource.github.io/hawtjni/")
10095 (synopsis "JNI code generator")
10096 (description "HawtJNI is a code generator that produces the JNI code needed
10097 to implement Java native methods. It is based on the jnigen code generator
10098 that is part of the SWT Tools project.")
10099 (license license:asl2.0)))
10100
10101 (define-public java-jansi-native
10102 (package
10103 (name "java-jansi-native")
10104 (version "1.7")
10105 (source (origin
10106 (method url-fetch)
10107 (uri (string-append "https://github.com/fusesource/jansi-native/"
10108 "archive/jansi-native-" version ".tar.gz"))
10109 (sha256
10110 (base32
10111 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10112 (build-system ant-build-system)
10113 (arguments
10114 `(#:jar-name "jansi-native.jar"
10115 #:source-dir "src/main/java"
10116 #:tests? #f; no tests
10117 #:phases
10118 (modify-phases %standard-phases
10119 (add-before 'build 'build-native
10120 (lambda* (#:key inputs #:allow-other-keys)
10121 ;; there are more required files for windows in windows/
10122 (with-directory-excursion "src/main/native-package/src"
10123 (substitute* "jansi_ttyname.c"
10124 (("#include \"jansi_.*") ""))
10125 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10126 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10127 "/include")
10128 (string-append "-I" (assoc-ref inputs "jdk")
10129 "/include/linux")
10130 "-fPIC" "-O2")
10131 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
10132 (add-before 'build 'install-native
10133 (lambda _
10134 (let ((dir (string-append "build/classes/META-INF/native/"
10135 ,(match (%current-system)
10136 ((or "i686-linux" "armhf-linux")
10137 "linux32")
10138 ((or "x86_64-linux" "aarch64-linux"
10139 "mips64el-linux")
10140 "linux64")))))
10141 (install-file "src/main/native-package/src/libjansi.so" dir))
10142 #t))
10143 (add-after 'install 'install-native
10144 (lambda* (#:key outputs #:allow-other-keys)
10145 (install-file "src/main/native-package/src/jansi.h"
10146 (string-append (assoc-ref outputs "out") "/include"))
10147 #t)))))
10148 (inputs
10149 `(("java-hawtjni" ,java-hawtjni)))
10150 (home-page "https://fusesource.github.io/jansi/")
10151 (synopsis "Native library for jansi")
10152 (description "This package provides the native library for jansi, a small
10153 Java library that allows you to use ANSI escape sequences to format your
10154 console output.")
10155 (license license:asl2.0)))
10156
10157 (define-public java-jansi
10158 (package
10159 (name "java-jansi")
10160 (version "1.16")
10161 (source (origin
10162 (method url-fetch)
10163 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10164 "jansi-project-" version ".tar.gz"))
10165 (sha256
10166 (base32
10167 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10168 (build-system ant-build-system)
10169 (arguments
10170 `(#:jar-name "jansi.jar"
10171 #:source-dir "jansi/src/main/java"
10172 #:test-dir "jansi/src/test"
10173 #:phases
10174 (modify-phases %standard-phases
10175 (add-after 'check 'clear-term
10176 (lambda _
10177 (invoke "echo" "-e" "\\e[0m"))))))
10178 (inputs
10179 `(("java-jansi-native" ,java-jansi-native)))
10180 (native-inputs
10181 `(("java-junit" ,java-junit)
10182 ("java-hamcrest-core" ,java-hamcrest-core)))
10183 (home-page "https://fusesource.github.io/jansi/")
10184 (synopsis "Portable ANSI escape sequences")
10185 (description "Jansi is a Java library that allows you to use ANSI escape
10186 sequences to format your console output which works on every platform.")
10187 (license license:asl2.0)))
10188
10189 (define-public java-jboss-el-api-spec
10190 (package
10191 (name "java-jboss-el-api-spec")
10192 (version "3.0")
10193 (source (origin
10194 (method url-fetch)
10195 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10196 "archive/jboss-el-api_" version
10197 "_spec-1.0.7.Final.tar.gz"))
10198 (sha256
10199 (base32
10200 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10201 (build-system ant-build-system)
10202 (arguments
10203 `(#:jar-name "java-jboss-el-api_spec.jar"
10204 #:jdk ,icedtea-8))
10205 (inputs
10206 `(("java-junit" ,java-junit)))
10207 (home-page "https://github.com/jboss/jboss-el-api_spec")
10208 (synopsis "JSR-341 expression language 3.0 API")
10209 (description "This package contains an implementation of the JSR-341
10210 specification for the expression language 3.0. It implements an expression
10211 language inspired by ECMAScript and XPath. This language is used with
10212 JavaServer Pages (JSP).")
10213 ;; Either GPL2 only or CDDL.
10214 (license (list license:gpl2 license:cddl1.1))))
10215
10216 (define-public java-jboss-interceptors-api-spec
10217 (package
10218 (name "java-jboss-interceptors-api-spec")
10219 (version "1.2")
10220 (source (origin
10221 (method url-fetch)
10222 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10223 "archive/jboss-interceptors-api_" version
10224 "_spec-1.0.0.Final.tar.gz"))
10225 (sha256
10226 (base32
10227 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10228 (build-system ant-build-system)
10229 (arguments
10230 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10231 #:jdk ,icedtea-8
10232 #:source-dir "."
10233 #:tests? #f)); no tests
10234 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10235 (synopsis "Interceptors 1.2 API classes from JSR 318")
10236 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10237 API. Interceptors are used to interpose on business method invocations and
10238 specific events.")
10239 ;; Either GPL2 only or CDDL.
10240 (license (list license:gpl2 license:cddl1.1))))
10241
10242 (define-public java-cdi-api
10243 (package
10244 (name "java-cdi-api")
10245 (version "2.0")
10246 (source (origin
10247 (method url-fetch)
10248 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10249 version ".tar.gz"))
10250 (file-name (string-append name "-" version ".tar.gz"))
10251 (sha256
10252 (base32
10253 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10254 (build-system ant-build-system)
10255 (arguments
10256 `(#:source-dir "api/src/main/java"
10257 #:jar-name "java-cdi-api.jar"
10258 #:test-dir "api/src/test"
10259 #:jdk ,icedtea-8
10260 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10261 (inputs
10262 `(("java-javax-inject" ,java-javax-inject)
10263 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10264 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10265 (native-inputs
10266 `(("java-testng" ,java-testng)
10267 ("java-hamcrest-core" ,java-hamcrest-core)))
10268 (home-page "http://cdi-spec.org/")
10269 (synopsis "Contexts and Dependency Injection APIs")
10270 (description "Java-cdi-api contains the required APIs for Contexts and
10271 Dependency Injection (CDI).")
10272 (license license:asl2.0)))
10273
10274 (define-public java-joda-convert
10275 (package
10276 (name "java-joda-convert")
10277 (version "1.9.2")
10278 (source (origin
10279 (method url-fetch)
10280 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10281 version ".tar.gz"))
10282 (file-name (string-append name "-" version ".tar.gz"))
10283 (sha256
10284 (base32
10285 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10286 (build-system ant-build-system)
10287 (arguments
10288 `(#:jar-name (string-append ,name "-" ,version ".jar")
10289 #:source-dir "src/main/java"
10290 #:test-include (list "**/Test*.java")
10291 ;; Contains only interfaces and base classes (no test)
10292 #:test-exclude (list "**/test*/**.java")))
10293 (inputs
10294 `(("java-guava" ,java-guava)))
10295 (native-inputs
10296 `(("java-junit" ,java-junit)
10297 ("java-hamcrest-core" ,java-hamcrest-core)))
10298 (home-page "https://www.joda.org/joda-convert/")
10299 (synopsis "Conversion between Objects and Strings")
10300 (description "Joda-Convert provides a small set of classes to aid
10301 conversion between Objects and Strings. It is not intended to tackle the
10302 wider problem of Object to Object transformation.")
10303 (license license:asl2.0)))
10304
10305 (define-public java-joda-time
10306 (package
10307 (name "java-joda-time")
10308 (version "2.9.9")
10309 (source (origin
10310 (method url-fetch)
10311 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10312 version ".tar.gz"))
10313 (file-name (string-append name "-" version ".tar.gz"))
10314 (sha256
10315 (base32
10316 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10317 (build-system ant-build-system)
10318 (arguments
10319 `(#:jar-name "java-joda-time.jar"
10320 #:source-dir "src/main/java"
10321 #:test-include (list "**/Test*.java")
10322 ;; There is no runnable test in these files
10323 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10324 #:phases
10325 (modify-phases %standard-phases
10326 (add-after 'build 'build-resources
10327 (lambda _
10328 (mkdir-p "build/classes/org/joda/time/tz/data")
10329 (mkdir-p "build/classes/org/joda/time/format")
10330 ;; This will produce the following exception:
10331 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10332 ;; which is normal, because it doesn't exist yet. It still generates
10333 ;; the same file as in the binary one can find on maven.
10334 (invoke "java" "-cp"
10335 (string-append "build/classes:" (getenv "CLASSPATH"))
10336 "org.joda.time.tz.ZoneInfoCompiler"
10337 "-src" "src/main/java/org/joda/time/tz/src"
10338 "-dst" "build/classes/org/joda/time/tz/data"
10339 "africa" "antarctica" "asia" "australasia"
10340 "europe" "northamerica" "southamerica"
10341 "pacificnew" "etcetera" "backward" "systemv")
10342 (for-each (lambda (f)
10343 (copy-file f (string-append
10344 "build/classes/org/joda/time/format/"
10345 (basename f))))
10346 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10347 #t))
10348 (add-before 'install 'regenerate-jar
10349 (lambda _
10350 ;; We need to regenerate the jar file to add generated data.
10351 (delete-file "build/jar/java-joda-time.jar")
10352 (invoke "ant" "jar")))
10353 (add-before 'check 'copy-test-resources
10354 (lambda _
10355 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10356 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10357 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10358 (copy-recursively "src/test/resources" "build/test-classes")
10359 #t)))))
10360 (inputs
10361 `(("java-joda-convert" ,java-joda-convert)))
10362 (native-inputs
10363 `(("java-junit" ,java-junit)
10364 ("java-hamcrest-core" ,java-hamcrest-core)
10365 ("tzdata" ,tzdata)))
10366 (home-page "https://www.joda.org/joda-time/")
10367 (synopsis "Replacement for the Java date and time classes")
10368 (description "Joda-Time is a replacement for the Java date and time
10369 classes prior to Java SE 8.")
10370 (license license:asl2.0)))
10371
10372 (define-public java-xerces
10373 (package
10374 (name "java-xerces")
10375 (version "2.11.0")
10376 (source
10377 (origin
10378 (method url-fetch)
10379 (uri (string-append "mirror://apache/xerces/j/source/"
10380 "Xerces-J-src." version ".tar.gz"))
10381 (sha256
10382 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10383 (patches (search-patches
10384 "java-xerces-xjavac_taskdef.patch"
10385 "java-xerces-build_dont_unzip.patch"
10386 "java-xerces-bootclasspath.patch"))))
10387 (build-system ant-build-system)
10388 (arguments
10389 `(#:tests? #f;; Test files are not present
10390 #:test-target "test"
10391 #:jdk ,icedtea-8
10392 #:phases
10393 (modify-phases %standard-phases
10394 (add-after 'unpack 'create-build.properties
10395 (lambda* (#:key inputs #:allow-other-keys)
10396 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10397 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10398 (with-output-to-file "build.properties"
10399 (lambda _
10400 (format #t
10401 "jar.jaxp = ~a/share/java/jaxp.jar~@
10402 jar.apis-ext = ~a/share/java/jaxp.jar~@
10403 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10404 jaxp jaxp resolver)))
10405 ;; Make xerces use our version of jaxp in tests
10406 (substitute* "build.xml"
10407 (("xml-apis.jar")
10408 (string-append jaxp "/share/java/jaxp.jar"))
10409 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10410 "${jar.apis}")))
10411 #t))
10412 (replace 'install (install-jars "build")))))
10413 (inputs
10414 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10415 ("java-jaxp" ,java-jaxp)))
10416 (home-page "https://xerces.apache.org/xerces2-j/")
10417 (synopsis "Validating XML parser for Java with DOM level 3 support")
10418 (description "The Xerces2 Java parser is the reference implementation of
10419 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10420 processor.
10421
10422 Xerces2-J supports the following standards and APIs:
10423
10424 @itemize
10425 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10426 @item Namespaces in XML Recommendation
10427 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10428 Range Recommendations
10429 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10430 @item Java APIs for XML Processing (JAXP) 1.2.01
10431 @item XML Schema 1.0 Structures and Datatypes Recommendations
10432 @item Experimental implementation of the Document Object Model (DOM) Level 3
10433 Core and Load/Save Working Drafts
10434 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10435 Candidate Recommendation
10436 @end itemize
10437
10438 Xerces is now able to parse documents written according to the XML 1.1
10439 Candidate Recommendation, except that it does not yet provide an option to
10440 enable normalization checking as described in section 2.13 of this
10441 specification. It also handles namespaces according to the XML Namespaces 1.1
10442 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10443 the DOM level 3 load/save API's are in use.")
10444 (license license:asl2.0)))
10445
10446 (define-public java-jakarta-regexp
10447 (package
10448 (name "java-jakarta-regexp")
10449 (version "1.5")
10450 (source
10451 (origin
10452 (method url-fetch)
10453 (uri (string-append
10454 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10455 version ".tar.gz"))
10456 (sha256
10457 (base32
10458 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10459 (build-system ant-build-system)
10460 (arguments
10461 `(#:test-target "test"
10462 #:phases
10463 (modify-phases %standard-phases
10464 (replace 'install
10465 (lambda* (#:key outputs #:allow-other-keys)
10466 (let* ((out (assoc-ref outputs "out"))
10467 (out-share (string-append out "/share/java")))
10468 (mkdir-p out-share)
10469 (for-each (lambda (name)
10470 (install-file name out-share))
10471 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10472 #t))))))
10473 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10474 (synopsis "Regular expression parser generator for Java.")
10475 (description "@code{jakarta-regexp} is an old regular expression parser
10476 generator for Java.")
10477 (license license:asl2.0)))
10478
10479 (define-public java-jline
10480 (package
10481 (name "java-jline")
10482 (version "1.0")
10483 (source (origin
10484 (method url-fetch)
10485 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10486 version ".tar.gz"))
10487 (sha256
10488 (base32
10489 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10490 (build-system ant-build-system)
10491 (arguments
10492 `(#:jar-name "jline.jar"
10493 #:source-dir "src/main/java"
10494 #:test-dir "src/test"
10495 #:phases
10496 (modify-phases %standard-phases
10497 (add-before 'build 'copy-resources
10498 (lambda _
10499 (copy-recursively "src/main/resources" "build/classes")
10500 #t)))))
10501 (native-inputs
10502 `(("java-junit" ,java-junit)))
10503 (home-page "https://jline.github.io")
10504 (synopsis "Console input handling library")
10505 (description "JLine is a Java library for handling console input. It is
10506 similar in functionality to BSD editline and GNU readline but with additional
10507 features that bring it on par with the Z shell line editor.")
10508 (license license:bsd-3)))
10509
10510 (define-public java-jline-2
10511 (package
10512 (inherit java-jline)
10513 (version "2.14.5")
10514 (source (origin
10515 (method url-fetch)
10516 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10517 version ".tar.gz"))
10518 (sha256
10519 (base32
10520 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10521 (arguments
10522 `(#:jdk ,icedtea-8
10523 ,@(package-arguments java-jline)))
10524 (inputs
10525 `(("java-jansi" ,java-jansi)
10526 ("java-jansi-native" ,java-jansi-native)))
10527 (native-inputs
10528 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10529 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10530 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10531 ("java-powermock-api-support" ,java-powermock-api-support)
10532 ("java-powermock-core" ,java-powermock-core)
10533 ("java-powermock-reflect" ,java-powermock-reflect)
10534 ("java-easymock" ,java-easymock)
10535 ("java-jboss-javassist" ,java-jboss-javassist)
10536 ("java-objenesis" ,java-objenesis)
10537 ("java-asm" ,java-asm)
10538 ("java-hamcrest-core" ,java-hamcrest-core)
10539 ("java-cglib" ,java-cglib)
10540 ("java-junit" ,java-junit)
10541 ("java-hawtjni" ,java-hawtjni)))))
10542
10543 (define-public java-xmlunit
10544 (package
10545 (name "java-xmlunit")
10546 (version "2.5.1")
10547 (source (origin
10548 (method url-fetch)
10549 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10550 version ".tar.gz"))
10551 (file-name (string-append name "-" version ".tar.gz"))
10552 (sha256
10553 (base32
10554 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10555 (build-system ant-build-system)
10556 (arguments
10557 `(#:jar-name "java-xmlunit.jar"
10558 #:source-dir "xmlunit-core/src/main/java"
10559 #:test-dir "xmlunit-core/src/test"
10560 #:phases
10561 (modify-phases %standard-phases
10562 (add-before 'check 'copy-test-resources
10563 (lambda* (#:key inputs #:allow-other-keys)
10564 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10565 #t)))))
10566 (native-inputs
10567 `(("java-junit" ,java-junit)
10568 ("java-mockito-1" ,java-mockito-1)
10569 ("java-hamcrest-all" ,java-hamcrest-all)
10570 ("java-objenesis" ,java-objenesis)
10571 ("java-asm" ,java-asm)
10572 ("java-cglib" ,java-cglib)
10573 ("resources"
10574 ,(origin
10575 (method git-fetch)
10576 (uri (git-reference
10577 (url "https://github.com/xmlunit/test-resources.git")
10578 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10579 (file-name "java-xmlunit-test-resources")
10580 (sha256
10581 (base32
10582 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10583 (home-page "http://www.xmlunit.org/")
10584 (synopsis "XML output testing")
10585 (description "XMLUnit provides you with the tools to verify the XML you
10586 emit is the one you want to create. It provides helpers to validate against
10587 an XML Schema, assert the values of XPath queries or compare XML documents
10588 against expected outcomes.")
10589 (license license:asl2.0)))
10590
10591 (define-public java-xmlunit-legacy
10592 (package
10593 (inherit java-xmlunit)
10594 (name "java-xmlunit-legacy")
10595 (arguments
10596 `(#:jar-name "java-xmlunit-legacy.jar"
10597 #:source-dir "xmlunit-legacy/src/main/java"
10598 #:test-dir "xmlunit-legacy/src/test"))
10599 (inputs
10600 `(("java-xmlunit" ,java-xmlunit)
10601 ("java-junit" ,java-junit)))
10602 (native-inputs
10603 `(("java-mockito-1" ,java-mockito-1)))))
10604
10605 (define-public java-xmlunit-matchers
10606 (package
10607 (inherit java-xmlunit)
10608 (name "java-xmlunit-matchers")
10609 (arguments
10610 `(#:jar-name "java-xmlunit-matchers.jar"
10611 #:source-dir "xmlunit-matchers/src/main/java"
10612 #:test-dir "xmlunit-matchers/src/test"
10613 #:test-exclude
10614 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10615 (list "**/ValidationMatcherTest.java")
10616 #:phases
10617 (modify-phases %standard-phases
10618 (add-before 'build 'copy-test-class
10619 (lambda _
10620 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10621 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10622 #t))
10623 (add-before 'build 'fix-test-resources-path
10624 (lambda _
10625 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10626 (("../test-resources") "test-resources"))
10627 #t))
10628 (add-before 'check 'copy-test-resources
10629 (lambda* (#:key inputs #:allow-other-keys)
10630 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10631 #t)))))
10632 (inputs
10633 `(("java-xmlunit" ,java-xmlunit)
10634 ("java-junit" ,java-junit)))))
10635
10636 (define-public java-openchart2
10637 (package
10638 (name "java-openchart2")
10639 (version "1.4.3")
10640 (source (origin
10641 (method url-fetch)
10642 (uri (string-append "http://download.approximatrix.com/openchart2/"
10643 "openchart2-" version ".source.zip"))
10644 (sha256
10645 (base32
10646 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10647 (build-system ant-build-system)
10648 (arguments
10649 `(#:test-target "test"
10650 #:phases
10651 (modify-phases %standard-phases
10652 (add-after 'unpack 'fix-junit-errors
10653 (lambda _
10654 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10655 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10656 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10657 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10658 "model/DefaultChartDataModelConstraintsTest.java"
10659 "model/MultiScatterDataModelConstraintsTest.java"
10660 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10661 (("(assertEquals[^;]+);" before _)
10662 (string-append (string-drop-right before 2) ", 1E-6);"))))
10663 #t))
10664 (replace 'install (install-jars ".")))))
10665 (native-inputs
10666 `(("unzip" ,unzip)
10667 ("java-junit" ,java-junit)
10668 ("java-hamcrest-core" ,java-hamcrest-core)))
10669 (home-page "https://approximatrix.com/products/openchart2/")
10670 (synopsis "Simple plotting for Java")
10671 (description "Openchart2 provides a simple, yet powerful, interface for
10672 Java programmers to create two-dimensional charts and plots. The library
10673 features an assortment of graph styles, including advanced scatter plots, bar
10674 graphs, and pie charts.")
10675 (license license:lgpl2.1+)))
10676
10677 (define-public java-commons-httpclient
10678 (package
10679 (name "java-commons-httpclient")
10680 (version "3.1")
10681 (source (origin
10682 (method url-fetch)
10683 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10684 "commons-httpclient/source/commons-httpclient-"
10685 version "-src.tar.gz"))
10686 (sha256
10687 (base32
10688 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10689 (build-system ant-build-system)
10690 (arguments
10691 `(#:build-target "compile"
10692 #:test-target "test"
10693 #:tests? #f; requires junit-textui (junit 3)
10694 #:phases
10695 (modify-phases %standard-phases
10696 (add-before 'build 'fix-accent
10697 (lambda _
10698 (for-each (lambda (file)
10699 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10700 (substitute* file
10701 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10702 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10703 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10704 "src/test/org/apache/commons/httpclient/TestHttps.java"
10705 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10706 #t))
10707 (replace 'install
10708 (lambda* (#:key outputs #:allow-other-keys)
10709 (invoke "ant" "dist"
10710 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10711 "/share/java"))
10712 #t)))))
10713 (propagated-inputs
10714 `(("java-commons-logging" ,java-commons-logging-minimal)
10715 ("java-commons-codec" ,java-commons-codec)))
10716 (home-page "https://hc.apache.org")
10717 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10718 (description "This package contains an HTTP/1.1 compliant HTTP agent
10719 implementation. It also provides reusable components for client-side
10720 authentication, HTTP state management, and HTTP connection management.")
10721 (license license:asl2.0)))
10722
10723 (define-public java-commons-vfs
10724 (package
10725 (name "java-commons-vfs")
10726 (version "2.2")
10727 (source (origin
10728 (method url-fetch)
10729 (uri (string-append "mirror://apache/commons/vfs/source/"
10730 "commons-vfs2-distribution-" version "-src.tar.gz"))
10731 (file-name (string-append name "-" version ".tar.gz"))
10732 (sha256
10733 (base32
10734 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10735 (modules '((guix build utils)))
10736 (snippet
10737 '(begin
10738 (for-each delete-file
10739 (find-files "." "\\.jar$"))
10740 #t))))
10741 (build-system ant-build-system)
10742 (arguments
10743 `(#:jar-name "commons-vfs.jar"
10744 #:source-dir "commons-vfs2/src/main/java"
10745 #:test-dir "commons-vfs2/src/test"
10746 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10747 #:tests? #f
10748 #:phases
10749 (modify-phases %standard-phases
10750 (add-before 'build 'remove-hadoop-and-webdav
10751 ; Remove these files as they are not required and depend on difficult
10752 ; packages.
10753 (lambda _
10754 (for-each delete-file-recursively
10755 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10756 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10757 #t)))))
10758 (inputs
10759 `(("java-commons-collections4" ,java-commons-collections4)
10760 ("java-commons-compress" ,java-commons-compress)
10761 ("java-commons-httpclient" ,java-commons-httpclient)
10762 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10763 ("java-commons-net" ,java-commons-net)
10764 ("java-jsch" ,java-jsch)))
10765 (home-page "https://commons.apache.org/proper/commons-vfs/")
10766 (synopsis "Java file system library")
10767 (description "Commons VFS provides a single API for accessing various
10768 different file systems. It presents a uniform view of the files from various
10769 different sources, such as the files on local disk, on an HTTP server, or
10770 inside a Zip archive.")
10771 (license license:asl2.0)))
10772
10773 (define-public java-jakarta-oro
10774 (package
10775 (name "java-jakarta-oro")
10776 (version "2.0.8")
10777 (source (origin
10778 (method url-fetch)
10779 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10780 "jakarta-oro-" version ".tar.gz"))
10781 (sha256
10782 (base32
10783 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10784 (modules '((guix build utils)))
10785 (snippet
10786 `(begin
10787 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10788 #t))))
10789 (build-system ant-build-system)
10790 (arguments
10791 `(#:build-target "package"
10792 #:tests? #f; tests are run as part of the build process
10793 #:phases
10794 (modify-phases %standard-phases
10795 (replace 'install
10796 (install-jars ,(string-append "jakarta-oro-" version))))))
10797 (home-page "https://jakarta.apache.org/oro/")
10798 (synopsis "Text-processing for Java")
10799 (description "The Jakarta-ORO Java classes are a set of text-processing
10800 Java classes that provide Perl5 compatible regular expressions, AWK-like
10801 regular expressions, glob expressions, and utility classes for performing
10802 substitutions, splits, filtering filenames, etc. This library is the successor
10803 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10804 from ORO, Inc.")
10805 (license license:asl1.1)))
10806
10807 (define-public java-native-access
10808 (package
10809 (name "java-native-access")
10810 (version "4.5.1")
10811 (source (origin
10812 (method url-fetch)
10813 (uri (string-append "https://github.com/java-native-access/jna/"
10814 "archive/" version ".tar.gz"))
10815 (file-name (string-append name "-" version ".tar.gz"))
10816 (sha256
10817 (base32
10818 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10819 (modules '((guix build utils)))
10820 (snippet
10821 `(begin
10822 (for-each delete-file (find-files "." ".*.jar"))
10823 (delete-file-recursively "native/libffi")
10824 (delete-file-recursively "dist")
10825 #t))))
10826 (build-system ant-build-system)
10827 (arguments
10828 `(#:tests? #f; FIXME: tests require reflections.jar
10829 #:test-target "test"
10830 #:make-flags (list "-Ddynlink.native=true")
10831 #:phases
10832 (modify-phases %standard-phases
10833 (add-before 'build 'fix-build.xml
10834 (lambda* (#:key inputs #:allow-other-keys)
10835 (substitute* "build.xml"
10836 ;; Since we removed the bundled ant.jar, give the correct path
10837 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10838 ;; We removed generated native libraries. We can only rebuild one
10839 ;; so don't fail if we can't find a native library for another architecture.
10840 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10841 ;; Copy test dependencies
10842 (copy-file (string-append (assoc-ref inputs "java-junit")
10843 "/share/java/junit.jar")
10844 "lib/junit.jar")
10845 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10846 "/share/java/hamcrest-core.jar")
10847 "lib/hamcrest-core.jar")
10848 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10849 #t))
10850 (add-before 'build 'build-native
10851 (lambda _
10852 (invoke "ant" "-Ddynlink.native=true" "native")
10853 #t))
10854 (replace 'install
10855 (install-jars "build")))))
10856 (inputs
10857 `(("libffi" ,libffi)
10858 ("libx11" ,libx11)
10859 ("libxt" ,libxt)))
10860 (native-inputs
10861 `(("java-junit" ,java-junit)
10862 ("java-hamcrest-core" ,java-hamcrest-core)))
10863 (home-page "https://github.com/java-native-access/jna")
10864 (synopsis "Access to native shared libraries from Java")
10865 (description "JNA provides Java programs easy access to native shared
10866 libraries without writing anything but Java code - no JNI or native code is
10867 required. JNA allows you to call directly into native functions using natural
10868 Java method invocation.")
10869 ;; Java Native Access project (JNA) is dual-licensed under 2
10870 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10871 (license (list
10872 license:asl2.0
10873 license:lgpl2.1+))))
10874
10875 (define-public java-native-access-platform
10876 (package
10877 (inherit java-native-access)
10878 (name "java-native-access-platform")
10879 (arguments
10880 `(#:test-target "test"
10881 #:tests? #f; require jna-test.jar
10882 #:phases
10883 (modify-phases %standard-phases
10884 (add-before 'build 'chdir
10885 (lambda _
10886 (chdir "contrib/platform")
10887 #t))
10888 (add-after 'chdir 'fix-ant
10889 (lambda* (#:key inputs #:allow-other-keys)
10890 (substitute* "nbproject/project.properties"
10891 (("../../build/jna.jar")
10892 (string-append (assoc-ref inputs "java-native-access")
10893 "/share/java/jna.jar"))
10894 (("../../lib/hamcrest-core-.*.jar")
10895 (string-append (assoc-ref inputs "java-hamcrest-core")
10896 "/share/java/hamcrest-core.jar"))
10897 (("../../lib/junit.jar")
10898 (string-append (assoc-ref inputs "java-junit")
10899 "/share/java/junit.jar")))
10900 #t))
10901 (replace 'install
10902 (install-jars "dist")))))
10903 (inputs
10904 `(("java-native-access" ,java-native-access)))
10905 (synopsis "Cross-platform mappings for jna")
10906 (description "java-native-access-platfrom has cross-platform mappings
10907 and mappings for a number of commonly used platform functions, including a
10908 large number of Win32 mappings as well as a set of utility classes that
10909 simplify native access.")))
10910
10911 (define-public java-jsch-agentproxy-core
10912 (package
10913 (name "java-jsch-agentproxy-core")
10914 (version "0.0.8")
10915 (source (origin
10916 (method url-fetch)
10917 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10918 version ".tar.gz"))
10919 (file-name (string-append name "-" version ".tar.gz"))
10920 (sha256
10921 (base32
10922 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10923 (build-system ant-build-system)
10924 (arguments
10925 `(#:jar-name "jsch-agentproxy-core.jar"
10926 #:source-dir "jsch-agent-proxy-core/src/main/java"
10927 #:tests? #f)); no tests
10928 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10929 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10930 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10931 and Pageant included Putty. It will be easily integrated into JSch, and users
10932 will be allowed to use these programs for authentication.")
10933 (license license:bsd-3)))
10934
10935 (define-public java-jsch-agentproxy-sshagent
10936 (package
10937 (inherit java-jsch-agentproxy-core)
10938 (name "java-jsch-agentproxy-sshagent")
10939 (arguments
10940 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10941 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10942 #:tests? #f)); no tests
10943 (inputs
10944 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10945 (synopsis "Proxy to ssh-agent")
10946 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10947 and Pageant included in Putty. This component contains the code for a proxy to
10948 ssh-agent.")))
10949
10950 (define-public java-jsch-agentproxy-usocket-jna
10951 (package
10952 (inherit java-jsch-agentproxy-core)
10953 (name "java-jsch-agentproxy-usocket-jna")
10954 (arguments
10955 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10956 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10957 #:tests? #f)); no tests
10958 (inputs
10959 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10960 ("java-native-access" ,java-native-access)))
10961 (synopsis "USocketFactory implementation using JNA")
10962 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10963 and Pageant included in Putty. This component contains an implementation of
10964 USocketFactory using @dfn{JNA} (Java Native Access).")))
10965
10966 (define-public java-jsch-agentproxy-pageant
10967 (package
10968 (inherit java-jsch-agentproxy-core)
10969 (name "java-jsch-agentproxy-pageant")
10970 (arguments
10971 `(#:jar-name "jsch-agentproxy-pageant.jar"
10972 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10973 #:tests? #f)); no tests
10974 (inputs
10975 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10976 ("java-native-access" ,java-native-access)
10977 ("java-native-access-platform" ,java-native-access-platform)))
10978 (synopsis "Proxy to pageant")
10979 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10980 and Pageant included in Putty. This component contains the code for a proxy to
10981 pageant.")))
10982
10983 (define-public java-jsch-agentproxy-usocket-nc
10984 (package
10985 (inherit java-jsch-agentproxy-core)
10986 (name "java-jsch-agentproxy-usocket-nc")
10987 (arguments
10988 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10989 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10990 #:tests? #f)); no tests
10991 (inputs
10992 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10993 (synopsis "USocketFactory implementation using netcat")
10994 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10995 and Pageant included in Putty. This component contains an implementation of
10996 USocketFactory using netcat.")))
10997
10998 (define-public java-jsch-agentproxy-connector-factory
10999 (package
11000 (inherit java-jsch-agentproxy-core)
11001 (name "java-jsch-agentproxy-connector-factory")
11002 (arguments
11003 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11004 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11005 #:tests? #f)); no tests
11006 (inputs
11007 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11008 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11009 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11010 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11011 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11012 (synopsis "Connector factory for jsch agent proxy")
11013 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11014 and Pageant included in Putty. This component contains a connector factory.")))
11015
11016 (define-public java-jsch-agentproxy-jsch
11017 (package
11018 (inherit java-jsch-agentproxy-core)
11019 (name "java-jsch-agentproxy-jsch")
11020 (arguments
11021 `(#:jar-name "jsch-agentproxy-jsch.jar"
11022 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11023 #:tests? #f)); no tests
11024 (inputs
11025 `(("java-jsch" ,java-jsch)
11026 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11027 (synopsis "JSch integration library for agentproxy")
11028 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11029 and Pageant included in Putty. This component contains a library to use
11030 jsch-agent-proxy with JSch.")))
11031
11032 (define-public java-apache-ivy
11033 (package
11034 (name "java-apache-ivy")
11035 (version "2.4.0")
11036 (source (origin
11037 (method url-fetch)
11038 (uri (string-append "mirror://apache//ant/ivy/" version
11039 "/apache-ivy-" version "-src.tar.gz"))
11040 (sha256
11041 (base32
11042 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11043 (patches
11044 (search-patches
11045 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11046 (build-system ant-build-system)
11047 (arguments
11048 `(#:jar-name "ivy.jar"
11049 #:tests? #f
11050 #:phases
11051 (modify-phases %standard-phases
11052 (add-before 'build 'remove-example
11053 (lambda _
11054 (delete-file-recursively "src/example")
11055 #t))
11056 (add-before 'build 'copy-resources
11057 (lambda _
11058 (with-directory-excursion "src/java"
11059 (for-each (lambda (file)
11060 (install-file file (string-append "../../build/classes/" (dirname file))))
11061 (append
11062 (find-files "." ".*.css")
11063 (find-files "." ".*.ent")
11064 (find-files "." ".*.html")
11065 (find-files "." ".*.properties")
11066 (find-files "." ".*.xsd")
11067 (find-files "." ".*.xsl")
11068 (find-files "." ".*.xml"))))
11069 #t))
11070 (add-before 'build 'fix-vfs
11071 (lambda _
11072 (substitute*
11073 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11074 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11075 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11076 #t))
11077 (add-before 'install 'copy-manifest
11078 (lambda _
11079 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11080 #t))
11081 (add-before 'install 'repack
11082 (lambda _
11083 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
11084 "-C" "build/classes" ".")))
11085 (add-after 'install 'install-bin
11086 (lambda* (#:key outputs #:allow-other-keys)
11087 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11088 (ivy (string-append bin "/ivy"))
11089 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11090 (mkdir-p bin)
11091 (with-output-to-file ivy
11092 (lambda _
11093 (display (string-append
11094 "#!" (which "sh") "\n"
11095 "if [[ -z $CLASSPATH ]]; then\n"
11096 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11097 "else\n"
11098 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11099 "fi\n"
11100 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11101 (chmod ivy #o755)
11102 #t))))))
11103 (inputs
11104 `(("java-bouncycastle" ,java-bouncycastle)
11105 ("java-commons-cli" ,java-commons-cli)
11106 ("java-commons-collections" ,java-commons-collections)
11107 ("java-commons-httpclient" ,java-commons-httpclient)
11108 ("java-commons-lang" ,java-commons-lang)
11109 ("java-commons-vfs" ,java-commons-vfs)
11110 ("java-jakarta-oro" ,java-jakarta-oro)
11111 ("java-jsch" ,java-jsch)
11112 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11113 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11114 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11115 ("java-junit" ,java-junit)))
11116 (home-page "https://ant.apache.org/ivy")
11117 (synopsis "Dependency manager for the Java programming language")
11118 (description "Ivy is a tool for managing (recording, tracking, resolving
11119 and reporting) project dependencies. It is characterized by the following:
11120
11121 @itemize
11122 @item flexibility and configurability - Ivy is essentially process agnostic
11123 and is not tied to any methodology or structure. Instead it provides the
11124 necessary flexibility and configurability to be adapted to a broad range
11125 of dependency management and build processes.
11126 @item tight integration with Apache Ant - while available as a standalone tool,
11127 Ivy works particularly well with Apache Ant providing a number of
11128 powerful Ant tasks ranging from dependency resolution to dependency
11129 reporting and publication.
11130 @end itemize")
11131 (license license:asl2.0)))
11132
11133 (define-public java-eclipse-sisu-inject
11134 (package
11135 (name "java-eclipse-sisu-inject")
11136 (version "0.3.3")
11137 (source (origin
11138 (method git-fetch)
11139 (uri (git-reference
11140 (url "https://github.com/eclipse/sisu.inject/")
11141 (commit "releases/0.3.3")))
11142 (file-name (git-file-name name version))
11143 (sha256
11144 (base32
11145 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
11146 (build-system ant-build-system)
11147 (arguments
11148 `(#:jar-name "eclipse-sisu-inject.jar"
11149 #:source-dir "org.eclipse.sisu.inject/src"
11150 #:jdk ,icedtea-8
11151 #:tests? #f)); no tests
11152 (inputs
11153 `(("java-guice" ,java-guice)
11154 ("java-guice-servlet" ,java-guice-servlet)
11155 ("java-javax-inject" ,java-javax-inject)
11156 ("java-javaee-servletapi" ,java-javaee-servletapi)
11157 ("java-junit" ,java-junit)
11158 ("java-slf4j-api" ,java-slf4j-api)
11159 ("java-jsr305" ,java-jsr305)
11160 ("java-jsr250" ,java-jsr250)
11161 ("java-cdi-api" ,java-cdi-api)
11162 ("java-osgi-framework" ,java-osgi-framework)
11163 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11164 ("java-testng" ,java-testng)))
11165 (home-page "https://www.eclipse.org/sisu/")
11166 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11167 (description "Sisu is a modular JSR330-based container that supports
11168 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11169 Google-Guice to perform dependency injection and provide the core JSR330
11170 support, but removes the need to write explicit bindings in Guice modules.
11171 Integration with other containers via the Eclipse Extension Registry and the
11172 OSGi Service Registry is a goal of this project.")
11173 (license license:epl1.0)))
11174
11175 (define-public java-eclipse-sisu-plexus
11176 (package
11177 (name "java-eclipse-sisu-plexus")
11178 (version "0.3.4")
11179 (source (origin
11180 (method git-fetch)
11181 (uri (git-reference
11182 (url "https://github.com/eclipse/sisu.plexus.git")
11183 (commit (string-append "releases/" version))))
11184 (file-name (git-file-name name version))
11185 (sha256
11186 (base32
11187 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
11188 (modules '((guix build utils)))
11189 (snippet
11190 '(begin
11191 (for-each delete-file (find-files "." ".*.jar"))
11192 (rename-file "org.eclipse.sisu.plexus.tests/src"
11193 "org.eclipse.sisu.plexus.tests/java")
11194 #t))))
11195 (build-system ant-build-system)
11196 (arguments
11197 `(#:jar-name "eclipse-sisu-plexus.jar"
11198 #:source-dir "org.eclipse.sisu.plexus/src"
11199 #:test-dir "org.eclipse.sisu.plexus.tests"
11200 #:test-exclude
11201 (list
11202 ;; This test fails probably because we can't generate the necessary
11203 ;; meta-inf files.
11204 "**/PlexusLoggingTest.*"
11205 ;; FIXME: This test fails because of some injection error
11206 "**/PlexusRequirementTest.*")
11207 #:jdk ,icedtea-8
11208 #:phases
11209 (modify-phases %standard-phases
11210 (add-before 'build 'copy-resources
11211 (lambda _
11212 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11213 "build/classes/META-INF/plexus")
11214 #t))
11215 (add-before 'check 'build-test-jar
11216 (lambda _
11217 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11218 (mkdir "build")
11219 (with-directory-excursion "java"
11220 (apply invoke "javac" "-cp"
11221 (string-append (getenv "CLASSPATH")
11222 ":../../../../../build/classes")
11223 (find-files "." ".*.java"))
11224 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11225 (find-files "." ".*.jar")))
11226 (mkdir-p "build/META-INF/plexus")
11227 (copy-file "resources/META-INF/plexus/components.xml"
11228 "build/META-INF/plexus/components.xml")
11229 (with-directory-excursion "build"
11230 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11231 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11232 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11233 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11234 (("resources/component-jar")
11235 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11236 #t)))))
11237 (inputs
11238 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11239 ("java-plexus-util" ,java-plexus-utils)
11240 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11241 ("java-osgi-framework" ,java-osgi-framework)
11242 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11243 ("java-guice" ,java-guice)
11244 ("java-javax-inject" ,java-javax-inject)
11245 ("java-slf4j-api" ,java-slf4j-api)
11246 ("java-junit" ,java-junit)))
11247 (native-inputs
11248 `(("java-guava" ,java-guava)
11249 ("java-aopalliance" ,java-aopalliance)
11250 ("java-cglib" ,java-cglib)
11251 ("java-asm" ,java-asm)))
11252 (home-page "https://www.eclipse.org/sisu/")
11253 (synopsis "Plexus support for the sisu container")
11254 (description "Sisu is a modular JSR330-based container that supports
11255 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11256 adds Plexus support to the Sisu-Inject container.")
11257 (license license:epl1.0)))
11258
11259 (define-public java-commons-compiler
11260 (package
11261 (name "java-commons-compiler")
11262 (version "3.0.8")
11263 (source (origin
11264 (method git-fetch)
11265 (uri (git-reference
11266 (url "https://github.com/janino-compiler/janino")
11267 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11268 (file-name (string-append name "-" version))
11269 (sha256
11270 (base32
11271 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11272 (modules '((guix build utils)))
11273 (snippet
11274 '(begin
11275 (for-each delete-file
11276 (find-files "." "\\.jar$"))
11277 #t))))
11278 (build-system ant-build-system)
11279 (arguments
11280 `(#:jar-name "commons-compiler.jar"
11281 #:source-dir "commons-compiler/src/main"
11282 #:tests? #f)); no tests
11283 (home-page "https://github.com/janino-compiler/janino")
11284 (synopsis "Java compiler")
11285 (description "Commons-compiler contains an API for janino, including the
11286 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11287 and @code{ISimpleCompiler} interfaces.")
11288 (license license:bsd-3)))
11289
11290 (define-public java-janino
11291 (package
11292 (inherit java-commons-compiler)
11293 (name "java-janino")
11294 (arguments
11295 `(#:jar-name "janino.jar"
11296 #:source-dir "src/main/java"
11297 #:phases
11298 (modify-phases %standard-phases
11299 (add-before 'configure 'chdir
11300 (lambda _
11301 (chdir "janino")
11302 #t)))))
11303 (inputs
11304 `(("java-commons-compiler" ,java-commons-compiler)))
11305 (native-inputs
11306 `(("java-junit" ,java-junit)
11307 ("java-hamcrest-core" ,java-hamcrest-core)))
11308 (description "Janino is a Java compiler. Janino can compile a set of
11309 source files to a set of class files like @code{javac}, but also compile a
11310 Java expression, block, class body or source file in memory, load the bytecode
11311 and execute it directly in the same JVM. @code{janino} can also be used for
11312 static code analysis or code manipulation.")))
11313
11314 (define-public java-logback-core
11315 (package
11316 (name "java-logback-core")
11317 (version "1.2.3")
11318 (source (origin
11319 (method url-fetch)
11320 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11321 version ".tar.gz"))
11322 (file-name (string-append name "-" version ".tar.gz"))
11323 (sha256
11324 (base32
11325 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11326 (modules '((guix build utils)))
11327 (snippet
11328 '(begin
11329 (delete-file-recursively "logback-access/lib")
11330 #t))))
11331 (build-system ant-build-system)
11332 (arguments
11333 `(#:jar-name "logback.jar"
11334 #:source-dir "src/main/java"
11335 #:test-dir "src/test"
11336 #:test-exclude
11337 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11338 ;; which creates FastClasses
11339 (list "**/AllCoreTest.*"
11340 "**/AutoFlushingObjectWriterTest.*"
11341 "**/PackageTest.*"
11342 "**/ResilientOutputStreamTest.*"
11343 ;; And we still don't want to run abstract classes
11344 "**/Abstract*.*")
11345 #:phases
11346 (modify-phases %standard-phases
11347 (add-before 'configure 'chdir
11348 (lambda _
11349 (chdir "logback-core")
11350 #t)))))
11351 (inputs
11352 `(("java-javax-mail" ,java-javax-mail)
11353 ("servlet" ,java-javaee-servletapi)
11354 ("java-commons-compiler" ,java-commons-compiler)
11355 ("java-janino" ,java-janino)))
11356 (native-inputs
11357 `(("java-junit" ,java-junit)
11358 ("java-hamcrest-core" ,java-hamcrest-core)
11359 ("java-mockito-1" ,java-mockito-1)
11360 ("java-cglib" ,java-cglib)
11361 ("java-asm" ,java-asm)
11362 ("java-objenesis" ,java-objenesis)
11363 ("java-joda-time" ,java-joda-time)))
11364 (home-page "https://logback.qos.ch")
11365 (synopsis "Logging for java")
11366 (description "Logback is intended as a successor to the popular log4j project.
11367 This module lays the groundwork for the other two modules.")
11368 ;; Either epl1.0 or lgpl2.1
11369 (license (list license:epl1.0
11370 license:lgpl2.1))))
11371
11372 (define-public java-logback-classic
11373 (package
11374 (inherit java-logback-core)
11375 (name "java-logback-classic")
11376 (arguments
11377 `(#:jar-name "logback-classic.jar"
11378 #:source-dir "src/main/java"
11379 #:test-dir "src/test"
11380 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11381 #:jdk ,icedtea-8
11382 #:phases
11383 (modify-phases %standard-phases
11384 (add-before 'configure 'chdir
11385 (lambda _
11386 (chdir "logback-classic")
11387 #t))
11388 (replace 'build
11389 (lambda* (#:key inputs #:allow-other-keys)
11390 (mkdir-p "build/classes")
11391 (setenv "CLASSPATH"
11392 (string-join
11393 (apply append (map (lambda (input)
11394 (find-files (assoc-ref inputs input)
11395 ".*.jar"))
11396 '("java-logback-core" "java-slf4j-api"
11397 "java-commons-compiler" "servlet"
11398 "groovy")))
11399 ":"))
11400 (apply invoke "groovyc" "-d" "build/classes" "-j"
11401 (find-files "src/main/" ".*\\.(groovy|java)$"))
11402 (invoke "ant" "jar")
11403 #t)))))
11404 (inputs
11405 `(("java-logback-core" ,java-logback-core)
11406 ("java-slf4j-api" ,java-slf4j-api)
11407 ,@(package-inputs java-logback-core)))
11408 (native-inputs
11409 `(("groovy" ,groovy)))
11410 (description "Logback is intended as a successor to the popular log4j project.
11411 This module can be assimilated to a significantly improved version of log4j.
11412 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11413 can readily switch back and forth between logback and other logging frameworks
11414 such as log4j or @code{java.util.logging} (JUL).")))
11415
11416 (define-public java-jgit
11417 (package
11418 (name "java-jgit")
11419 (version "4.7.0.201704051617-r")
11420 (source (origin
11421 (method url-fetch)
11422 (uri (string-append "https://repo1.maven.org/maven2/"
11423 "org/eclipse/jgit/org.eclipse.jgit/"
11424 version "/org.eclipse.jgit-"
11425 version "-sources.jar"))
11426 (sha256
11427 (base32
11428 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11429 (build-system ant-build-system)
11430 (arguments
11431 `(#:tests? #f ; There are no tests to run.
11432 #:jar-name "jgit.jar"
11433 ;; JGit must be built with a JDK supporting Java 8.
11434 #:jdk ,icedtea-8
11435 ;; Target our older default JDK.
11436 #:make-flags (list "-Dtarget=1.7")
11437 #:phases
11438 (modify-phases %standard-phases
11439 ;; The jar file generated by the default build.xml does not include
11440 ;; the text properties files, so we need to add them.
11441 (add-after 'build 'add-properties
11442 (lambda* (#:key jar-name #:allow-other-keys)
11443 (with-directory-excursion "src"
11444 (apply invoke "jar" "-uf"
11445 (string-append "../build/jar/" jar-name)
11446 (find-files "." "\\.properties$")))
11447 #t)))))
11448 (inputs
11449 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11450 ("java-javaewah" ,java-javaewah)
11451 ("java-jsch" ,java-jsch)
11452 ("java-slf4j-api" ,java-slf4j-api)))
11453 (home-page "https://eclipse.org/jgit/")
11454 (synopsis "Java library implementing the Git version control system")
11455 (description "JGit is a lightweight, pure Java library implementing the
11456 Git version control system, providing repository access routines, support for
11457 network protocols, and core version control algorithms.")
11458 (license license:edl1.0)))
11459
11460 ;; For axoloti. This package can still be built with icedtea-7, which is
11461 ;; currently used as the default JDK.
11462 (define-public java-jgit-4.2
11463 (package (inherit java-jgit)
11464 (version "4.2.0.201601211800-r")
11465 (source (origin
11466 (method url-fetch)
11467 (uri (string-append "https://repo1.maven.org/maven2/"
11468 "org/eclipse/jgit/org.eclipse.jgit/"
11469 version "/org.eclipse.jgit-"
11470 version "-sources.jar"))
11471 (sha256
11472 (base32
11473 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11474 (build-system ant-build-system)
11475 (arguments
11476 (substitute-keyword-arguments (package-arguments java-jgit)
11477 ;; Build for default JDK.
11478 ((#:jdk _) icedtea-7)
11479 ((#:phases phases)
11480 `(modify-phases ,phases
11481 (add-after 'unpack 'use-latest-javaewah-API
11482 (lambda _
11483 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11484 (("wordinbits") "WORD_IN_BITS"))
11485 #t))))))
11486 (inputs
11487 `(("java-javaewah" ,java-javaewah)
11488 ("java-jsch" ,java-jsch)
11489 ("java-slf4j-api" ,java-slf4j-api)))))
11490
11491 (define-public abcl
11492 (package
11493 (name "abcl")
11494 (version "1.6.0")
11495 (source
11496 (origin
11497 (method url-fetch)
11498 (uri (string-append "https://abcl.org/releases/"
11499 version "/abcl-src-" version ".tar.gz"))
11500 (sha256
11501 (base32
11502 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
11503 (patches
11504 (search-patches
11505 "abcl-fix-build-xml.patch"))))
11506 (build-system ant-build-system)
11507 (native-inputs
11508 `(("java-junit" ,java-junit)))
11509 (arguments
11510 `(#:build-target "abcl.jar"
11511 #:test-target "abcl.test"
11512 #:phases
11513 (modify-phases %standard-phases
11514 (replace 'install
11515 (lambda* (#:key outputs #:allow-other-keys)
11516 (let ((share (string-append (assoc-ref outputs "out")
11517 "/share/java/"))
11518 (bin (string-append (assoc-ref outputs "out")
11519 "/bin/")))
11520 (mkdir-p share)
11521 (install-file "dist/abcl.jar" share)
11522 (install-file "dist/abcl-contrib.jar" share)
11523 (mkdir-p bin)
11524 (with-output-to-file (string-append bin "abcl")
11525 (lambda _
11526 (let ((classpath (string-append
11527 share "abcl.jar"
11528 ":"
11529 share "abcl-contrib.jar")))
11530 (display (string-append
11531 "#!" (which "sh") "\n"
11532 "if [[ -z $CLASSPATH ]]; then\n"
11533 " cp=\"" classpath "\"\n"
11534 "else\n"
11535 " cp=\"" classpath ":$CLASSPATH\"\n"
11536 "fi\n"
11537 "exec " (which "java")
11538 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11539 (chmod (string-append bin "abcl") #o755)
11540 #t))))))
11541 (home-page "https://abcl.org/")
11542 (synopsis "Common Lisp Implementation on the JVM")
11543 (description
11544 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11545 Lisp language featuring both an interpreter and a compiler, running in the
11546 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11547 in any Java application. Additionally, it can be used to implement (parts of)
11548 the application using Java to Lisp integration APIs.")
11549 (license (list license:gpl2+
11550 ;; named-readtables is released under 3 clause BSD
11551 license:bsd-3
11552 ;; jfli is released under CPL 1.0
11553 license:cpl1.0))))
11554
11555 (define-public java-jsonp-api
11556 (package
11557 (name "java-jsonp-api")
11558 (version "1.1.6")
11559 (source (origin
11560 (method git-fetch)
11561 (uri (git-reference
11562 (url "https://github.com/eclipse-ee4j/jsonp")
11563 (commit (string-append "1.1-" version "-RELEASE"))))
11564 (file-name (git-file-name name version))
11565 (sha256
11566 (base32
11567 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
11568 (build-system ant-build-system)
11569 (arguments
11570 `(#:jar-name "jsonp-api.jar"
11571 #:tests? #f
11572 #:source-dir "api/src/main/java"
11573 #:test-dir "api/src/test"))
11574 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11575 (synopsis "JSON Processing in Java")
11576 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11577 parse, generate, transform and query) JSON messages. It produces and
11578 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11579 and allows to build a Java object model for JSON text using API classes
11580 (similar to DOM API for XML).")
11581 ;; either gpl2 only with classpath exception, or epl2.0.
11582 (license (list license:gpl2
11583 license:epl2.0))))
11584
11585 (define-public java-jsonp-impl
11586 (package
11587 (inherit java-jsonp-api)
11588 (name "java-jsonp-impl")
11589 (arguments
11590 `(#:jar-name "jsonp-impl.jar"
11591 #:tests? #f
11592 #:source-dir "impl/src/main/java"
11593 #:test-dir "impl/src/test"
11594 #:phases
11595 (modify-phases %standard-phases
11596 (add-before 'build 'copy-resources
11597 (lambda _
11598 (copy-recursively
11599 "impl/src/main/resources/"
11600 "build/classes")
11601 #t)))))
11602 (propagated-inputs
11603 `(("java-jsonp-api" ,java-jsonp-api)))
11604 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11605 parse, generate, transform and query) JSON messages. This package contains
11606 a reference implementation of that API.")))
11607
11608 (define-public java-xmp
11609 (package
11610 (name "java-xmp")
11611 (version "5.1.3")
11612 (source (origin
11613 (method url-fetch)
11614 (uri (string-append "http://download.macromedia.com/pub/developer"
11615 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11616 (sha256
11617 (base32
11618 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11619 (build-system ant-build-system)
11620 (arguments
11621 `(#:build-target "build"
11622 #:tests? #f; no tests
11623 #:phases
11624 (modify-phases %standard-phases
11625 (add-after 'unpack 'chdir
11626 (lambda _
11627 (chdir "XMPCore")
11628 #t))
11629 (add-before 'build 'fix-timestamp
11630 (lambda _
11631 (substitute* "build.xml"
11632 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11633 #t))
11634 (replace 'install
11635 (install-jars "."))
11636 (add-after 'install 'install-doc
11637 (lambda* (#:key outputs #:allow-other-keys)
11638 (copy-recursively
11639 "docs"
11640 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11641 #t)))))
11642 (native-inputs
11643 `(("unzip" ,unzip)))
11644 (home-page "https://www.adobe.com/devnet/xmp.html")
11645 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11646 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11647 technology that allows you to embed data about a file, known as metadata,
11648 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11649 library and the API is similar.")
11650 (license license:bsd-3)))
11651
11652 (define-public java-metadata-extractor
11653 (package
11654 (name "java-metadata-extractor")
11655 (version "2.11.0")
11656 (source (origin
11657 (method git-fetch)
11658 (uri (git-reference
11659 (url "https://github.com/drewnoakes/metadata-extractor")
11660 (commit version)))
11661 (file-name (git-file-name name version))
11662 (sha256
11663 (base32
11664 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11665 (build-system ant-build-system)
11666 (arguments
11667 `(#:jar-name "metadata-extractor.jar"
11668 #:source-dir "Source"
11669 #:test-dir "Tests"
11670 #:phases
11671 (modify-phases %standard-phases
11672 (add-before 'check 'fix-test-dir
11673 (lambda _
11674 (substitute* "build.xml"
11675 (("/java\">") "\">"))
11676 #t)))))
11677 (propagated-inputs
11678 `(("java-xmp" ,java-xmp)))
11679 (native-inputs
11680 `(("java-hamcrest-core" ,java-hamcrest-core)
11681 ("java-junit" ,java-junit)))
11682 (home-page "https://github.com/drewnoakes/metadata-extractor")
11683 (synopsis "Extract metadata from image and video files")
11684 (description "Metadata-extractor is a straightforward Java library for
11685 reading metadata from image files. It is able to read metadata in Exif,
11686 IPTC, XMP, ICC and more formats.")
11687 (license license:asl2.0)))
11688
11689 (define-public java-svg-salamander
11690 (package
11691 (name "java-svg-salamander")
11692 (version "1.1.2")
11693 (source (origin
11694 (method git-fetch)
11695 (uri (git-reference
11696 (url "https://github.com/blackears/svgSalamander")
11697 (commit (string-append "v" version))))
11698 (file-name (git-file-name name version))
11699 (sha256
11700 (base32
11701 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11702 (modules '((guix build utils)))
11703 (snippet
11704 '(begin
11705 (for-each delete-file (find-files "." ".*.jar"))
11706 #t))
11707 (patches
11708 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11709 (build-system ant-build-system)
11710 (arguments
11711 `(#:tests? #f; no tests
11712 #:phases
11713 (modify-phases %standard-phases
11714 (add-after 'unpack 'chdir
11715 (lambda _
11716 (chdir "svg-core")
11717 #t))
11718 (add-before 'build 'copy-jars
11719 (lambda* (#:key inputs #:allow-other-keys)
11720 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11721 "../libraries/javacc.jar")
11722 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11723 "../libraries/ant.jar")
11724 #t))
11725 (replace 'install
11726 (install-jars "dist")))))
11727 (native-inputs
11728 `(("javacc" ,javacc)))
11729 (home-page "https://github.com/blackears/svgSalamander")
11730 (synopsis "SVG engine for Java")
11731 (description "SVG Salamander is an SVG engine for Java that's designed
11732 to be small, fast, and allow programmers to use it with a minimum of fuss.
11733 It's in particular targeted for making it easy to integrate SVG into Java
11734 games and making it much easier for artists to design 2D game content - from
11735 rich interactive menus to charts and graphcs to complex animations.")
11736 (license license:bsd-2)))
11737
11738 (define-public java-jboss-transaction-api-spec
11739 (package
11740 (name "java-jboss-transaction-api-spec")
11741 (version "1.2+1.1.1")
11742 (source (origin
11743 (method git-fetch)
11744 (uri (git-reference
11745 (url "https://github.com/jboss/jboss-transaction-api_spec")
11746 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11747 (file-name (git-file-name name version))
11748 (sha256
11749 (base32
11750 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11751 (build-system ant-build-system)
11752 (arguments
11753 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11754 #:source-dir "src/main/java"
11755 #:tests? #f)); no tests
11756 (inputs
11757 `(("java-cdi-api" ,java-cdi-api)
11758 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11759 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11760 (synopsis "Generic transaction management API in Java")
11761 (description "Java-jboss-transaction-api-spec implements the Transactions
11762 API. A transaction is a unit of work containing one or more operations
11763 involving one or more shared resources having ACID (Atomicity, Consistency,
11764 Isolation and Durability) properties.")
11765 ;; either gpl2 only with classpath exception or cddl.
11766 (license (list license:gpl2 license:cddl1.0))))