gnu: java-plexus-interpolation: Update to 1.26.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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-2020 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, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
17 ;;;
18 ;;; This file is part of GNU Guix.
19 ;;;
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
24 ;;;
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
29 ;;;
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33 (define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module (guix utils)
41 #:use-module (guix build-system ant)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system trivial)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages attr)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages certs)
50 #:use-module (gnu packages cpio)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages elf)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages gawk)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
58 #:use-module (gnu packages ghostscript) ;lcms
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages groovy)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages guile)
63 #:use-module (gnu packages icu4c)
64 #:use-module (gnu packages image)
65 #:use-module (gnu packages java-compression)
66 #:use-module (gnu packages libffi)
67 #:use-module (gnu packages linux) ;alsa
68 #:use-module (gnu packages maths)
69 #:use-module (gnu packages maven-parent-pom)
70 #:use-module (gnu packages nss)
71 #:use-module (gnu packages onc-rpc)
72 #:use-module (gnu packages web)
73 #:use-module (gnu packages wget)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages perl)
76 #:use-module (gnu packages popt)
77 #:use-module (gnu packages kerberos)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
80 #:use-module (gnu packages texinfo)
81 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
82 #:use-module (srfi srfi-11)
83 #:use-module (ice-9 match))
84
85 \f
86 ;;;
87 ;;; Java bootstrap toolchain.
88 ;;;
89
90 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
91 ;; use it to build a simple version of GNU Classpath, the Java standard
92 ;; library. We chose version 0.93 because it is the last version that can be
93 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
94 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
95 ;; the last version of JamVM that works with a version of GNU classpath that
96 ;; does not require ECJ. These three packages make up the bootstrap JDK.
97
98 ;; This is sufficient to build an older version of Ant, which is needed to
99 ;; build an older version of ECJ, an incremental Java compiler, both of which
100 ;; are written in Java.
101 ;;
102 ;; ECJ is needed to build the latest release (0.99) and the development
103 ;; version of GNU Classpath. The development version of GNU Classpath has
104 ;; much more support for Java 1.6 than the latest release, but we need to
105 ;; build 0.99 first to get a working version of javah. ECJ, the development
106 ;; version of GNU Classpath, and the latest version of JamVM make up the
107 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
108 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
109 ;; Icedtea 3.x.
110
111 (define-public libantlr3c
112 (package
113 (name "libantlr3c")
114 (version "3.4")
115 (source
116 (origin
117 (method url-fetch)
118 (uri
119 (string-append "https://www.antlr3.org/download/C/"
120 name "-" version ".tar.gz"))
121 (sha256
122 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
123 (build-system gnu-build-system)
124 (arguments
125 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
126 #:phases (modify-phases %standard-phases
127 (replace 'configure
128 (lambda* (#:key build target native-inputs inputs outputs
129 (configure-flags '()) out-of-source? system
130 #:allow-other-keys)
131 (let ((configure (assoc-ref %standard-phases 'configure))
132 (enable-64bit? (member system '("aarch64-linux"
133 "x86_64-linux"
134 "mips64el-linux"))))
135 (configure #:build build #:target target
136 #:native-inputs native-inputs
137 #:inputs inputs #:outputs outputs
138 #:configure-flags `(,(if enable-64bit?
139 "--enable-64bit"
140 '())
141 ,@configure-flags)
142 #:out-of-source? out-of-source?)))))))
143 (synopsis "ANTLR C Library")
144 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
145 Tool for Language Recognition v3).")
146 (home-page "https://www.antlr3.org/")
147 (license license:bsd-3)))
148
149 (define jikes
150 (package
151 (name "jikes")
152 (version "1.22")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
156 version "/jikes-" version ".tar.bz2"))
157 (sha256
158 (base32
159 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
160 (build-system gnu-build-system)
161 (home-page "http://jikes.sourceforge.net/")
162 (synopsis "Compiler for the Java language")
163 (description "Jikes is a compiler that translates Java source files as
164 defined in The Java Language Specification into the bytecoded instruction set
165 and binary format defined in The Java Virtual Machine Specification.")
166 (license license:ibmpl1.0)))
167
168 (define-public drip
169 ;; Last release is from 2014, with a few important commits afterwards.
170 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
171 (package
172 (name "drip")
173 (version (git-version "0.2.4" "1" commit))
174 (source (origin
175 (method git-fetch)
176 (uri (git-reference
177 (url "https://github.com/ninjudd/drip")
178 (commit commit)))
179 (file-name (git-file-name name version))
180 (sha256
181 (base32
182 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
183 (build-system gnu-build-system)
184 (native-inputs
185 `(("jdk" ,icedtea "jdk")))
186 (arguments
187 `(#:tests? #f ; No tests.
188 #:phases
189 (modify-phases %standard-phases
190 (delete 'configure)
191 (add-before 'install 'fix-wrapper
192 (lambda* (#:key inputs #:allow-other-keys)
193 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
194 (substitute* "bin/drip"
195 (("jps") jps)
196 (("brew update && brew upgrade drip") "guix pull && guix install drip")
197 ;; No need to make:
198 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
199 ;; No need to include source:
200 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
201 "true"))
202 #t)))
203 (replace 'install
204 (lambda* (#:key outputs #:allow-other-keys)
205 (let* ((out (assoc-ref outputs "out"))
206 (bin (string-append out "/bin"))
207 (share (string-append out "/share/drip")))
208 (mkdir-p bin)
209 (for-each
210 (lambda (file)
211 (install-file (string-append "bin/" file) bin))
212 '("drip" "drip_daemon" "drip_proxy"))
213 (install-file "drip.jar" share)
214 (substitute* (string-append bin "/drip")
215 (("drip_dir=\\$bin_dir/..")
216 (string-append "drip_dir=" share)))
217 #t))))))
218 (home-page "https://github.com/ninjudd/drip")
219 (synopsis "Faster Java Virtual Machine launching")
220 (description "Drip is a launcher for the Java Virtual Machine that
221 provides much faster startup times than the @command{java} command. The @command{drip}
222 script is intended to be a drop-in replacement for the @command{java} command,
223 only faster.")
224 (license license:epl1.0))))
225
226 ;; This is the last version of GNU Classpath that can be built without ECJ.
227 (define classpath-bootstrap
228 (package
229 (name "classpath")
230 (version "0.93")
231 (source (origin
232 (method url-fetch)
233 (uri (string-append "mirror://gnu/classpath/classpath-"
234 version ".tar.gz"))
235 (sha256
236 (base32
237 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
238 (patches (search-patches "classpath-aarch64-support.patch"))))
239 (build-system gnu-build-system)
240 (arguments
241 `(#:configure-flags
242 (list (string-append "JAVAC="
243 (assoc-ref %build-inputs "jikes")
244 "/bin/jikes")
245 "--disable-Werror"
246 "--disable-gmp"
247 "--disable-gtk-peer"
248 "--disable-gconf-peer"
249 "--disable-plugin"
250 "--disable-dssi"
251 "--disable-alsa"
252 "--disable-gjdoc")
253 #:phases
254 (modify-phases %standard-phases
255 ;; XXX: This introduces a memory leak as we remove a call to free up
256 ;; memory for the file name string. This was necessary because of a
257 ;; runtime error that would have prevented us from building
258 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
259 ;; for the gnarly details.
260 (add-after 'unpack 'remove-call-to-free
261 (lambda _
262 (substitute* "native/jni/java-io/java_io_VMFile.c"
263 (("result = cpio_isFileExists.*" m)
264 (string-append m "\n//")))
265 #t))
266 (add-after 'install 'install-data
267 (lambda _ (invoke "make" "install-data"))))))
268 (native-inputs
269 `(("jikes" ,jikes)
270 ("fastjar" ,fastjar)
271 ("libltdl" ,libltdl)
272 ("pkg-config" ,pkg-config)))
273 (home-page "https://www.gnu.org/software/classpath/")
274 (synopsis "Essential libraries for Java")
275 (description "GNU Classpath is a project to create core class libraries
276 for use with runtimes, compilers and tools for the Java programming
277 language.")
278 ;; GPLv2 or later, with special linking exception.
279 (license license:gpl2+)))
280
281 ;; This is the last version of JamVM that works with a version of GNU
282 ;; classpath that does not require ECJ.
283 (define jamvm-1-bootstrap
284 (package
285 (name "jamvm")
286 (version "1.5.1")
287 (source (origin
288 (method url-fetch)
289 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
290 "JamVM%20" version "/jamvm-"
291 version ".tar.gz"))
292 (patches (search-patches "jamvm-arm.patch"))
293 (sha256
294 (base32
295 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
296 (snippet
297 '(begin
298 ;; Remove precompiled software.
299 (delete-file "lib/classes.zip")
300 #t))))
301 (build-system gnu-build-system)
302 (arguments
303 `(#:configure-flags
304 (list (string-append "--with-classpath-install-dir="
305 (assoc-ref %build-inputs "classpath"))
306 "--disable-int-caching"
307 "--enable-runtime-reloc-checks"
308 "--enable-ffi")))
309 (inputs
310 `(("classpath" ,classpath-bootstrap)
311 ("jikes" ,jikes)
312 ("libffi" ,libffi)
313 ("zip" ,zip)
314 ("zlib" ,zlib)))
315 (home-page "http://jamvm.sourceforge.net/")
316 (synopsis "Small Java Virtual Machine")
317 (description "JamVM is a Java Virtual Machine conforming to the JVM
318 specification edition 2 (blue book). It is extremely small. However, unlike
319 other small VMs it supports the full spec, including object finalisation and
320 JNI.")
321 (license license:gpl2+)))
322
323 (define ant-bootstrap
324 (package
325 (name "ant-bootstrap")
326 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
327 ;; are not supported. The 1.8.x series is the last to use only features
328 ;; supported by Jikes.
329 (version "1.8.4")
330 (source (origin
331 (method url-fetch)
332 (uri (string-append "mirror://apache/"
333 "ant/source/apache-ant-"
334 version "-src.tar.bz2"))
335 (sha256
336 (base32
337 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
338 (build-system gnu-build-system)
339 (arguments
340 `(#:imported-modules ((guix build syscalls)
341 ,@%gnu-build-system-modules)
342 #:modules ((srfi srfi-1)
343 (guix build gnu-build-system)
344 (guix build utils)
345 (guix build syscalls))
346 #:tests? #f ; no "check" target
347 #:phases
348 (modify-phases %standard-phases
349 (delete 'bootstrap)
350 (delete 'configure)
351 (replace 'build
352 (lambda* (#:key inputs #:allow-other-keys)
353 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
354 (setenv "JAVACMD"
355 (string-append (assoc-ref inputs "jamvm")
356 "/bin/jamvm"))
357 (setenv "JAVAC"
358 (string-append (assoc-ref inputs "jikes")
359 "/bin/jikes"))
360 (setenv "CLASSPATH"
361 (string-append (assoc-ref inputs "jamvm")
362 "/lib/rt.jar"))
363
364 ;; Ant complains if this file doesn't exist.
365 (setenv "HOME" "/tmp")
366 (with-output-to-file "/tmp/.ant.properties"
367 (lambda _ (display "")))
368
369 ;; Use jikes instead of javac for <javac ...> tags in build.xml
370 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
371
372 ;; jikes produces lots of warnings, but they are not very
373 ;; interesting, so we silence them.
374 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
375
376 ;; Without these JamVM options the build may freeze.
377 (substitute* "bootstrap.sh"
378 (("^\"\\$\\{JAVACMD\\}\" " m)
379 ,@(if (string-prefix? "armhf" (or (%current-system)
380 (%current-target-system)))
381 `((string-append m "-Xnocompact "))
382 `((string-append m "-Xnocompact -Xnoinlining ")))))
383
384 ;; Disable tests because we are bootstrapping and thus don't have
385 ;; any of the dependencies required to build and run the tests.
386 (substitute* "build.xml"
387 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
388 (invoke "bash" "bootstrap.sh"
389 (string-append "-Ddist.dir="
390 (assoc-ref %outputs "out")))))
391 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
392 (lambda* (#:key outputs #:allow-other-keys)
393 (define (repack-archive jar)
394 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
395 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
396 (with-directory-excursion dir
397 (invoke "unzip" jar))
398 (delete-file jar)
399 ;; XXX: copied from (gnu build install)
400 (for-each (lambda (file)
401 (let ((s (lstat file)))
402 (unless (eq? (stat:type s) 'symlink)
403 (utime file 0 0 0 0))))
404 (find-files dir #:directories? #t))
405 ;; It is important that the manifest appears first.
406 (with-directory-excursion dir
407 (let* ((files (find-files "." ".*" #:directories? #t))
408 ;; To ensure that the reference scanner can
409 ;; detect all store references in the jars
410 ;; we disable compression with the "-0" option.
411 (command (if (file-exists? manifest)
412 `("zip" "-0" "-X" ,jar ,manifest
413 ,@files)
414 `("zip" "-0" "-X" ,jar ,@files))))
415 (apply invoke command)))))
416 (for-each repack-archive
417 (find-files
418 (string-append (assoc-ref %outputs "out") "/lib")
419 "\\.jar$"))
420 #t))
421 (delete 'install))))
422 (native-inputs
423 `(("jikes" ,jikes)
424 ("jamvm" ,jamvm-1-bootstrap)
425 ("unzip" ,unzip)
426 ("zip" ,zip)))
427 (home-page "https://ant.apache.org")
428 (synopsis "Build tool for Java")
429 (description
430 "Ant is a platform-independent build tool for Java. It is similar to
431 make but is implemented using the Java language, requires the Java platform,
432 and is best suited to building Java projects. Ant uses XML to describe the
433 build process and its dependencies, whereas Make uses Makefile format.")
434 (license license:asl2.0)))
435
436 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
437 ;; compiler for Java 1.5.
438 (define ecj-bootstrap
439 (package
440 (name "ecj-bootstrap")
441 (version "3.2.2")
442 (source (origin
443 (method url-fetch)
444 (uri (string-append "http://archive.eclipse.org/eclipse/"
445 "downloads/drops/R-" version
446 "-200702121330/ecjsrc.zip"))
447 (sha256
448 (base32
449 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
450 ;; It would be so much easier if we could use the ant-build-system, but we
451 ;; cannot as we don't have ant at this point. We use ecj for
452 ;; bootstrapping the JDK.
453 (build-system gnu-build-system)
454 (arguments
455 `(#:modules ((guix build gnu-build-system)
456 (guix build utils)
457 (srfi srfi-1))
458 #:tests? #f ; there are no tests
459 #:phases
460 (modify-phases %standard-phases
461 (replace 'configure
462 (lambda* (#:key inputs #:allow-other-keys)
463 (setenv "CLASSPATH"
464 (string-join
465 (cons (string-append (assoc-ref inputs "jamvm")
466 "/lib/rt.jar")
467 (find-files (string-append
468 (assoc-ref inputs "ant-bootstrap")
469 "/lib")
470 "\\.jar$"))
471 ":"))
472 #t))
473 (replace 'build
474 (lambda* (#:key inputs #:allow-other-keys)
475 ;; The unpack phase enters the "org" directory by mistake.
476 (chdir "..")
477
478 ;; Create a simple manifest to make ecj executable.
479 (with-output-to-file "manifest"
480 (lambda _
481 (display "Manifest-Version: 1.0
482 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
483
484 ;; Compile it all!
485 (and (apply invoke "jikes"
486 (find-files "." "\\.java$"))
487 (invoke "fastjar" "cvfm"
488 "ecj-bootstrap.jar" "manifest" "."))))
489 (replace 'install
490 (lambda* (#:key outputs #:allow-other-keys)
491 (let ((share (string-append (assoc-ref outputs "out")
492 "/share/java/")))
493 (mkdir-p share)
494 (install-file "ecj-bootstrap.jar" share)
495 #t))))))
496 (native-inputs
497 `(("ant-bootstrap" ,ant-bootstrap)
498 ("unzip" ,unzip)
499 ("jikes" ,jikes)
500 ("jamvm" ,jamvm-1-bootstrap)
501 ("fastjar" ,fastjar)))
502 (home-page "https://eclipse.org")
503 (synopsis "Eclipse Java development tools core batch compiler")
504 (description "This package provides the Eclipse Java core batch compiler
505 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
506 requirement for all GNU Classpath releases after version 0.93.")
507 (license license:epl1.0)))
508
509 (define ecj-javac-wrapper
510 (package (inherit ecj-bootstrap)
511 (name "ecj-javac-wrapper")
512 (source #f)
513 (build-system trivial-build-system)
514 (arguments
515 `(#:modules ((guix build utils))
516 #:builder
517 (begin
518 (use-modules (guix build utils))
519 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
520 (target (string-append bin "/javac"))
521 (guile (string-append (assoc-ref %build-inputs "guile")
522 "/bin/guile"))
523 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
524 "/share/java/ecj-bootstrap.jar"))
525 (java (string-append (assoc-ref %build-inputs "jamvm")
526 "/bin/jamvm"))
527 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
528 "/share/classpath")))
529 (string-append jvmlib "/glibj.zip:"
530 jvmlib "/tools.zip"))))
531 (mkdir-p bin)
532 (with-output-to-file target
533 (lambda _
534 (format #t "#!~a --no-auto-compile\n!#\n" guile)
535 (write
536 `(begin (use-modules (ice-9 match)
537 (ice-9 receive)
538 (ice-9 hash-table)
539 (srfi srfi-1)
540 (srfi srfi-26))
541 (define defaults
542 '(("-bootclasspath" ,bootcp)
543 ("-source" "1.5")
544 ("-target" "1.5")
545 ("-cp" ".")))
546 (define (main args)
547 (let ((classpath (getenv "CLASSPATH")))
548 (setenv "CLASSPATH"
549 (string-join (list ,ecj
550 ,(string-append (assoc-ref %build-inputs "jamvm")
551 "/lib/rt.jar")
552 (or classpath ""))
553 ":")))
554 (receive (vm-args other-args)
555 ;; Separate VM arguments from arguments to ECJ.
556 (partition (cut string-prefix? "-J" <>)
557 (fold (lambda (default acc)
558 (if (member (first default) acc)
559 acc (append default acc)))
560 args defaults))
561 (apply system* ,java
562 (append
563 ;; Remove "-J" prefix
564 (map (cut string-drop <> 2) vm-args)
565 '("org.eclipse.jdt.internal.compiler.batch.Main")
566 (cons "-nowarn" other-args)))))
567 ;; Entry point
568 (let ((args (cdr (command-line))))
569 (if (null? args)
570 (format (current-error-port) "javac: no arguments given!\n")
571 (main args)))))))
572 (chmod target #o755)
573 #t))))
574 (native-inputs
575 `(("guile" ,guile-2.2)
576 ("ecj-bootstrap" ,ecj-bootstrap)
577 ("jamvm" ,jamvm-1-bootstrap)
578 ("classpath" ,classpath-bootstrap)))
579 (description "This package provides a wrapper around the @dfn{Eclipse
580 compiler for Java} (ecj) with a command line interface that is compatible with
581 the standard javac executable.")))
582
583 ;; The classpath-bootstrap was built without a virtual machine, so it does not
584 ;; provide a wrapper for javah. We cannot build the development version of
585 ;; Classpath without javah.
586 (define classpath-0.99
587 (package (inherit classpath-bootstrap)
588 (version "0.99")
589 (source (origin
590 (method url-fetch)
591 (uri (string-append "mirror://gnu/classpath/classpath-"
592 version ".tar.gz"))
593 (sha256
594 (base32
595 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
596 (patches (search-patches "classpath-aarch64-support.patch"))))
597 (arguments
598 `(#:configure-flags
599 (list (string-append "--with-ecj-jar="
600 (assoc-ref %build-inputs "ecj-bootstrap")
601 "/share/java/ecj-bootstrap.jar")
602 (string-append "JAVAC="
603 (assoc-ref %build-inputs "ecj-javac-wrapper")
604 "/bin/javac")
605 (string-append "JAVA="
606 (assoc-ref %build-inputs "jamvm")
607 "/bin/jamvm")
608 "GCJ_JAVAC_TRUE=no"
609 "ac_cv_prog_java_works=yes" ; trust me
610 "--disable-Werror"
611 "--disable-gmp"
612 "--disable-gtk-peer"
613 "--disable-gconf-peer"
614 "--disable-plugin"
615 "--disable-dssi"
616 "--disable-alsa"
617 "--disable-gjdoc")
618 #:phases
619 (modify-phases %standard-phases
620 (add-after 'install 'install-data
621 (lambda _ (invoke "make" "install-data"))))))
622 (native-inputs
623 `(("ecj-bootstrap" ,ecj-bootstrap)
624 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
625 ("fastjar" ,fastjar)
626 ("jamvm" ,jamvm-1-bootstrap)
627 ("classpath" ,classpath-bootstrap)
628 ("libltdl" ,libltdl)
629 ("pkg-config" ,pkg-config)))))
630
631 ;; We need this because classpath-bootstrap does not provide all of the tools
632 ;; we need to build classpath-devel.
633 (define classpath-jamvm-wrappers
634 (package (inherit classpath-0.99)
635 (name "classpath-jamvm-wrappers")
636 (source #f)
637 (build-system trivial-build-system)
638 (arguments
639 `(#:modules ((guix build utils))
640 #:builder
641 (begin
642 (use-modules (guix build utils))
643 (let* ((bash (assoc-ref %build-inputs "bash"))
644 (jamvm (assoc-ref %build-inputs "jamvm"))
645 (classpath (assoc-ref %build-inputs "classpath"))
646 (bin (string-append (assoc-ref %outputs "out")
647 "/bin/")))
648 (mkdir-p bin)
649 (for-each (lambda (tool)
650 (with-output-to-file (string-append bin tool)
651 (lambda _
652 ,@(if (string-prefix? "armhf" (or (%current-system)
653 (%current-target-system)))
654 `((format #t "#!~a/bin/sh
655 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
656 gnu.classpath.tools.~a.~a $@"
657 bash jamvm classpath tool
658 (if (string=? "native2ascii" tool)
659 "Native2ASCII" "Main")))
660 `((format #t "#!~a/bin/sh
661 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
662 gnu.classpath.tools.~a.~a $@"
663 bash jamvm classpath tool
664 (if (string=? "native2ascii" tool)
665 "Native2ASCII" "Main"))))))
666 (chmod (string-append bin tool) #o755))
667 (list "javah"
668 "rmic"
669 "rmid"
670 "orbd"
671 "rmiregistry"
672 "native2ascii"))
673 #t))))
674 (native-inputs
675 `(("bash" ,bash)
676 ("jamvm" ,jamvm-1-bootstrap)
677 ("classpath" ,classpath-0.99)))
678 (inputs '())
679 (synopsis "Executables from GNU Classpath")
680 (description "This package provides wrappers around the tools provided by
681 the GNU Classpath library. They are executed by the JamVM virtual
682 machine.")))
683
684 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
685 ;; then Classpath has gained much more support for Java 1.6.
686 (define-public classpath-devel
687 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
688 (revision "1"))
689 (package (inherit classpath-bootstrap)
690 (version (string-append "0.99-" revision "." (string-take commit 9)))
691 (source (origin
692 (method git-fetch)
693 (uri (git-reference
694 (url "https://git.savannah.gnu.org/git/classpath.git")
695 (commit commit)))
696 (file-name (string-append "classpath-" version "-checkout"))
697 (sha256
698 (base32
699 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
700 (arguments
701 `(#:make-flags
702 ;; Ensure that the initial heap size is smaller than the maximum
703 ;; size. By default only Xmx is set, which can lead to invalid
704 ;; memory settings on some machines with a lot of memory.
705 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
706 #:configure-flags
707 (list (string-append "--with-ecj-jar="
708 (assoc-ref %build-inputs "ecj-bootstrap")
709 "/share/java/ecj-bootstrap.jar")
710 (string-append "--with-javac="
711 (assoc-ref %build-inputs "ecj-javac-wrapper")
712 "/bin/javac")
713 (string-append "JAVA="
714 (assoc-ref %build-inputs "jamvm")
715 "/bin/jamvm")
716 "GCJ_JAVAC_TRUE=no"
717 "ac_cv_prog_java_works=yes" ; trust me
718 "--disable-Werror"
719 "--disable-gmp"
720 "--disable-gtk-peer"
721 "--disable-gconf-peer"
722 "--disable-plugin"
723 "--disable-dssi"
724 "--disable-alsa"
725 "--disable-gjdoc")
726 #:phases
727 (modify-phases %standard-phases
728 ;; XXX The bootstrap phase executes autogen.sh, which fails after
729 ;; complaining about the lack of gettext.
730 (replace 'bootstrap
731 (lambda _ (invoke "autoreconf" "-vif")))
732 (add-after 'unpack 'remove-unsupported-annotations
733 (lambda _
734 (substitute* (find-files "java" "\\.java$")
735 (("@Override") ""))
736 #t))
737 (add-after 'install 'install-data
738 (lambda _ (invoke "make" "install-data"))))))
739 (native-inputs
740 `(("autoconf" ,autoconf)
741 ("automake" ,automake)
742 ("libtool" ,libtool)
743 ("gettext" ,gettext-minimal)
744 ("texinfo" ,texinfo)
745 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
746 ("ecj-bootstrap" ,ecj-bootstrap)
747 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
748 ("fastjar" ,fastjar)
749 ("jamvm" ,jamvm-1-bootstrap)
750 ("libltdl" ,libltdl)
751 ("pkg-config" ,pkg-config))))))
752
753 (define jamvm
754 (package (inherit jamvm-1-bootstrap)
755 (version "2.0.0")
756 (source (origin
757 (method url-fetch)
758 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
759 "JamVM%20" version "/jamvm-"
760 version ".tar.gz"))
761 (sha256
762 (base32
763 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
764 (patches
765 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"))
766 (snippet
767 '(begin
768 ;; Remove precompiled software.
769 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
770 #t))))
771 (build-system gnu-build-system)
772 (arguments
773 `(#:configure-flags
774 (list (string-append "--with-classpath-install-dir="
775 (assoc-ref %build-inputs "classpath")))))
776 (inputs
777 `(("classpath" ,classpath-devel)
778 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
779 ("zip" ,zip)
780 ("zlib" ,zlib)))))
781
782 (define ecj-javac-wrapper-final
783 (package (inherit ecj-javac-wrapper)
784 (native-inputs
785 `(("guile" ,guile-2.2)
786 ("ecj-bootstrap" ,ecj-bootstrap)
787 ("jamvm" ,jamvm)
788 ("classpath" ,classpath-devel)))))
789
790 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
791 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
792 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
793 ;; which uses Java 6 only.
794 (define-public icedtea-6
795 (package
796 (name "icedtea")
797 (version "1.13.13")
798 (source (origin
799 (method url-fetch)
800 (uri (string-append
801 "http://icedtea.wildebeest.org/download/source/icedtea6-"
802 version ".tar.xz"))
803 (sha256
804 (base32
805 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
806 (modules '((guix build utils)))
807 (snippet
808 '(begin
809 (substitute* "Makefile.in"
810 ;; do not leak information about the build host
811 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
812 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
813 #t))))
814 (build-system gnu-build-system)
815 (outputs '("out" ; Java Runtime Environment
816 "jdk" ; Java Development Kit
817 "doc")) ; all documentation
818 (arguments
819 `(;; There are many failing tests and many are known to fail upstream.
820 #:tests? #f
821
822 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
823 ;; gremlin) doesn't support it yet, so skip this phase.
824 #:validate-runpath? #f
825
826 #:modules ((guix build utils)
827 (guix build gnu-build-system)
828 (srfi srfi-19))
829
830 #:configure-flags
831 `("--enable-bootstrap"
832 "--enable-nss"
833 "--without-rhino"
834 "--with-parallel-jobs"
835 "--disable-downloading"
836 "--disable-tests"
837 ,(string-append "--with-ecj="
838 (assoc-ref %build-inputs "ecj")
839 "/share/java/ecj-bootstrap.jar")
840 ,(string-append "--with-jar="
841 (assoc-ref %build-inputs "fastjar")
842 "/bin/fastjar")
843 ,(string-append "--with-jdk-home="
844 (assoc-ref %build-inputs "classpath"))
845 ,(string-append "--with-java="
846 (assoc-ref %build-inputs "jamvm")
847 "/bin/jamvm"))
848 #:phases
849 (modify-phases %standard-phases
850 (replace 'unpack
851 (lambda* (#:key source inputs #:allow-other-keys)
852 (invoke "tar" "xvf" source)
853 (chdir (string-append "icedtea6-" ,version))
854 (mkdir "openjdk")
855 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
856 ;; The convenient OpenJDK source bundle is no longer
857 ;; available for download, so we have to take the sources
858 ;; from the Mercurial repositories and change the Makefile
859 ;; to avoid tests for the OpenJDK zip archive.
860 (with-directory-excursion "openjdk"
861 (for-each (lambda (part)
862 (mkdir part)
863 (copy-recursively
864 (assoc-ref inputs
865 (string-append part "-src"))
866 part))
867 '("jdk" "corba"
868 "langtools" "jaxp" "jaxws")))
869 (with-directory-excursion "openjdk"
870 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
871 (rename-file "hg-checkout" "hotspot"))
872 (substitute* "patches/freetypeversion.patch"
873 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
874 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
875 (substitute* "Makefile.in"
876 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
877 "echo \"trust me\";")
878 ;; The contents of the bootstrap directory must be
879 ;; writeable but when copying from the store they are
880 ;; not.
881 (("mkdir -p lib/rt" line)
882 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
883 (invoke "chmod" "-R" "u+w" "openjdk")))
884 (add-after 'unpack 'use-classpath
885 (lambda* (#:key inputs #:allow-other-keys)
886 (let ((jvmlib (assoc-ref inputs "classpath"))
887 (jamvm (assoc-ref inputs "jamvm")))
888 ;; Classpath does not provide rt.jar.
889 (substitute* "Makefile.in"
890 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
891 (string-append jvmlib "/share/classpath/glibj.zip")))
892 ;; Make sure we can find all classes.
893 (setenv "CLASSPATH"
894 (string-append jvmlib "/share/classpath/glibj.zip:"
895 jvmlib "/share/classpath/tools.zip:"
896 jamvm "/lib/rt.jar"))
897 (setenv "JAVACFLAGS"
898 (string-append "-cp "
899 jvmlib "/share/classpath/glibj.zip:"
900 jvmlib "/share/classpath/tools.zip")))
901 #t))
902 (add-after 'unpack 'patch-patches
903 (lambda _
904 ;; shebang in patches so that they apply cleanly
905 (substitute* '("patches/jtreg-jrunscript.patch"
906 "patches/hotspot/hs23/drop_unlicensed_test.patch")
907 (("#!/bin/sh") (string-append "#!" (which "sh"))))
908 #t))
909 (add-after 'unpack 'patch-paths
910 (lambda* (#:key inputs #:allow-other-keys)
911 ;; buildtree.make generates shell scripts, so we need to replace
912 ;; the generated shebang
913 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
914 (("/bin/sh") (which "bash")))
915
916 (let ((corebin (string-append
917 (assoc-ref inputs "coreutils") "/bin/"))
918 (binbin (string-append
919 (assoc-ref inputs "binutils") "/bin/"))
920 (grepbin (string-append
921 (assoc-ref inputs "grep") "/bin/")))
922 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
923 "openjdk/corba/make/common/shared/Defs-linux.gmk")
924 (("UNIXCOMMAND_PATH = /bin/")
925 (string-append "UNIXCOMMAND_PATH = " corebin))
926 (("USRBIN_PATH = /usr/bin/")
927 (string-append "USRBIN_PATH = " corebin))
928 (("DEVTOOLS_PATH *= */usr/bin/")
929 (string-append "DEVTOOLS_PATH = " corebin))
930 (("COMPILER_PATH *= */usr/bin/")
931 (string-append "COMPILER_PATH = "
932 (assoc-ref inputs "gcc") "/bin/"))
933 (("DEF_OBJCOPY *=.*objcopy")
934 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
935
936 ;; fix path to alsa header
937 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
938 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
939 (string-append "ALSA_INCLUDE="
940 (assoc-ref inputs "alsa-lib")
941 "/include/alsa/version.h")))
942
943 ;; fix hard-coded utility paths
944 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
945 "openjdk/corba/make/common/shared/Defs-utils.gmk")
946 (("ECHO *=.*echo")
947 (string-append "ECHO = " (which "echo")))
948 (("^GREP *=.*grep")
949 (string-append "GREP = " (which "grep")))
950 (("EGREP *=.*egrep")
951 (string-append "EGREP = " (which "egrep")))
952 (("CPIO *=.*cpio")
953 (string-append "CPIO = " (which "cpio")))
954 (("READELF *=.*readelf")
955 (string-append "READELF = " (which "readelf")))
956 (("^ *AR *=.*ar")
957 (string-append "AR = " (which "ar")))
958 (("^ *TAR *=.*tar")
959 (string-append "TAR = " (which "tar")))
960 (("AS *=.*as")
961 (string-append "AS = " (which "as")))
962 (("LD *=.*ld")
963 (string-append "LD = " (which "ld")))
964 (("STRIP *=.*strip")
965 (string-append "STRIP = " (which "strip")))
966 (("NM *=.*nm")
967 (string-append "NM = " (which "nm")))
968 (("^SH *=.*sh")
969 (string-append "SH = " (which "bash")))
970 (("^FIND *=.*find")
971 (string-append "FIND = " (which "find")))
972 (("LDD *=.*ldd")
973 (string-append "LDD = " (which "ldd")))
974 (("NAWK *=.*(n|g)awk")
975 (string-append "NAWK = " (which "gawk")))
976 (("XARGS *=.*xargs")
977 (string-append "XARGS = " (which "xargs")))
978 (("UNZIP *=.*unzip")
979 (string-append "UNZIP = " (which "unzip")))
980 (("ZIPEXE *=.*zip")
981 (string-append "ZIPEXE = " (which "zip")))
982 (("SED *=.*sed")
983 (string-append "SED = " (which "sed"))))
984
985 ;; Some of these timestamps cause problems as they are more than
986 ;; 10 years ago, failing the build process.
987 (substitute*
988 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
989 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
990 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
991 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
992 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
993 #t)))
994 (add-before 'configure 'set-additional-paths
995 (lambda* (#:key inputs #:allow-other-keys)
996 (setenv "CPATH"
997 (string-append (assoc-ref inputs "libxrender")
998 "/include/X11/extensions" ":"
999 (assoc-ref inputs "libxtst")
1000 "/include/X11/extensions" ":"
1001 (assoc-ref inputs "libxinerama")
1002 "/include/X11/extensions" ":"
1003 (or (getenv "CPATH") "")))
1004 (setenv "ALT_CUPS_HEADERS_PATH"
1005 (string-append (assoc-ref inputs "cups")
1006 "/include"))
1007 (setenv "ALT_FREETYPE_HEADERS_PATH"
1008 (string-append (assoc-ref inputs "freetype")
1009 "/include"))
1010 (setenv "ALT_FREETYPE_LIB_PATH"
1011 (string-append (assoc-ref inputs "freetype")
1012 "/lib"))
1013 #t))
1014 (add-before 'build 'disable-os-version-check
1015 ;; allow build on linux major version change
1016 (lambda _
1017 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1018 #t))
1019 (replace 'install
1020 (lambda* (#:key outputs #:allow-other-keys)
1021 (let ((doc (string-append (assoc-ref outputs "doc")
1022 "/share/doc/icedtea"))
1023 (jre (assoc-ref outputs "out"))
1024 (jdk (assoc-ref outputs "jdk")))
1025 (copy-recursively "openjdk.build/docs" doc)
1026 (copy-recursively "openjdk.build/j2re-image" jre)
1027 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1028 #t)))))
1029 (native-inputs
1030 `(("ant" ,ant-bootstrap)
1031 ("alsa-lib" ,alsa-lib)
1032 ("attr" ,attr)
1033 ("classpath" ,classpath-devel)
1034 ("coreutils" ,coreutils)
1035 ("cpio" ,cpio)
1036 ("cups" ,cups)
1037 ("ecj" ,ecj-bootstrap)
1038 ("ecj-javac" ,ecj-javac-wrapper-final)
1039 ("fastjar" ,fastjar)
1040 ("fontconfig" ,fontconfig)
1041 ("freetype" ,freetype)
1042 ("gtk" ,gtk+-2)
1043 ("gawk" ,gawk)
1044 ("giflib" ,giflib)
1045 ("grep" ,grep)
1046 ("jamvm" ,jamvm)
1047 ("lcms" ,lcms)
1048 ("libjpeg" ,libjpeg-turbo)
1049 ("libnsl" ,libnsl)
1050 ("libpng" ,libpng)
1051 ("libtool" ,libtool)
1052 ("libx11" ,libx11)
1053 ("libxcomposite" ,libxcomposite)
1054 ("libxi" ,libxi)
1055 ("libxinerama" ,libxinerama)
1056 ("libxrender" ,libxrender)
1057 ("libxslt" ,libxslt) ;for xsltproc
1058 ("libxt" ,libxt)
1059 ("libxtst" ,libxtst)
1060 ("mit-krb5" ,mit-krb5)
1061 ("nss" ,nss)
1062 ("nss-certs" ,nss-certs)
1063 ("perl" ,perl)
1064 ("pkg-config" ,pkg-config)
1065 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1066 ("unzip" ,unzip)
1067 ("wget" ,wget)
1068 ("which" ,which)
1069 ("zip" ,zip)
1070 ("zlib" ,zlib)
1071 ("openjdk-src"
1072 ,(origin
1073 (method hg-fetch)
1074 (uri (hg-reference
1075 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1076 (changeset "jdk6-b41")))
1077 (sha256
1078 (base32
1079 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1080 ("jdk-src"
1081 ,(origin
1082 (method hg-fetch)
1083 (uri (hg-reference
1084 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1085 (changeset "jdk6-b41")))
1086 (sha256
1087 (base32
1088 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1089 ("hotspot-src"
1090 ,(origin
1091 (method hg-fetch)
1092 (uri (hg-reference
1093 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1094 (changeset "jdk6-b41")))
1095 (sha256
1096 (base32
1097 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1098 (patches
1099 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1100 ("corba-src"
1101 ,(origin
1102 (method hg-fetch)
1103 (uri (hg-reference
1104 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1105 (changeset "jdk6-b41")))
1106 (sha256
1107 (base32
1108 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1109 ("langtools-src"
1110 ,(origin
1111 (method hg-fetch)
1112 (uri (hg-reference
1113 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1114 (changeset "jdk6-b41")))
1115 (sha256
1116 (base32
1117 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1118 ("jaxp-src"
1119 ,(origin
1120 (method hg-fetch)
1121 (uri (hg-reference
1122 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1123 (changeset "jdk6-b41")))
1124 (sha256
1125 (base32
1126 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1127 ("jaxws-src"
1128 ,(origin
1129 (method hg-fetch)
1130 (uri (hg-reference
1131 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1132 (changeset "jdk6-b41")))
1133 (sha256
1134 (base32
1135 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1136 (home-page "http://icedtea.classpath.org")
1137 (synopsis "Java development kit")
1138 (description
1139 "This package provides the OpenJDK built with the IcedTea build harness.
1140 This version of the OpenJDK is no longer maintained and is only used for
1141 bootstrapping purposes.")
1142 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1143 ;; same license as both GNU Classpath and OpenJDK.
1144 (license license:gpl2+)))
1145
1146 (define-public icedtea-7
1147 (let* ((version "2.6.13")
1148 (drop (lambda (name hash)
1149 (origin
1150 (method url-fetch)
1151 (uri (string-append
1152 "http://icedtea.classpath.org/download/drops"
1153 "/icedtea7/" version "/" name ".tar.bz2"))
1154 (sha256 (base32 hash))))))
1155 (package
1156 (name "icedtea")
1157 (version version)
1158 (source (origin
1159 (method url-fetch)
1160 (uri (string-append
1161 "http://icedtea.wildebeest.org/download/source/icedtea-"
1162 version ".tar.xz"))
1163 (sha256
1164 (base32
1165 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1166 (modules '((guix build utils)))
1167 (snippet
1168 '(begin
1169 (substitute* "Makefile.in"
1170 ;; do not leak information about the build host
1171 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1172 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1173 #t))))
1174 (build-system gnu-build-system)
1175 (outputs '("out" ; Java Runtime Environment
1176 "jdk" ; Java Development Kit
1177 "doc")) ; all documentation
1178 (arguments
1179 `(;; There are many test failures. Some are known to
1180 ;; fail upstream, others relate to not having an X
1181 ;; server running at test time, yet others are a
1182 ;; complete mystery to me.
1183
1184 ;; hotspot: passed: 241; failed: 45; error: 2
1185 ;; langtools: passed: 1,934; failed: 26
1186 ;; jdk: unknown
1187 #:tests? #f
1188
1189 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1190 ;; gremlin) doesn't support it yet, so skip this phase.
1191 #:validate-runpath? #f
1192
1193 ;; Apparently, the C locale is needed for some of the tests.
1194 #:locale "C"
1195
1196 #:modules ((guix build utils)
1197 (guix build gnu-build-system)
1198 (ice-9 match)
1199 (ice-9 popen)
1200 (srfi srfi-19)
1201 (srfi srfi-26))
1202
1203 #:configure-flags
1204 ;; TODO: package pcsc and sctp, and add to inputs
1205 `("--disable-system-pcsc"
1206 "--disable-system-sctp"
1207 "--enable-bootstrap"
1208 "--enable-nss"
1209 "--without-rhino"
1210 "--disable-downloading"
1211 "--disable-tests" ;they are run in the check phase instead
1212 "--with-openjdk-src-dir=./openjdk.src"
1213 ,(string-append "--with-jdk-home="
1214 (assoc-ref %build-inputs "jdk")))
1215
1216 #:phases
1217 (modify-phases %standard-phases
1218 (replace 'unpack
1219 (lambda* (#:key source inputs #:allow-other-keys)
1220 (let ((target (string-append "icedtea-" ,version))
1221 (unpack (lambda* (name #:optional dir)
1222 (let ((dir (or dir
1223 (string-drop-right name 5))))
1224 (mkdir dir)
1225 (invoke "tar" "xvf"
1226 (assoc-ref inputs name)
1227 "-C" dir
1228 "--strip-components=1")))))
1229 (mkdir target)
1230 (invoke "tar" "xvf" source
1231 "-C" target "--strip-components=1")
1232 (chdir target)
1233 (unpack "openjdk-src" "openjdk.src")
1234 (with-directory-excursion "openjdk.src"
1235 (for-each unpack
1236 (filter (cut string-suffix? "-drop" <>)
1237 (map (match-lambda
1238 ((name . _) name))
1239 inputs))))
1240 #t)))
1241 (add-after 'unpack 'patch-bitrot
1242 (lambda _
1243 (substitute* '("patches/boot/revert-6973616.patch"
1244 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1245 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1246 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1247 ;; As of attr 2.4.48 this header is no longer
1248 ;; included. It is provided by the libc instead.
1249 (substitute* '("configure"
1250 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1251 (("attr/xattr.h") "sys/xattr.h"))
1252 #t))
1253 (add-after 'unpack 'fix-x11-extension-include-path
1254 (lambda* (#:key inputs #:allow-other-keys)
1255 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1256 (((string-append "\\$\\(firstword \\$\\(wildcard "
1257 "\\$\\(OPENWIN_HOME\\)"
1258 "/include/X11/extensions\\).*$"))
1259 (string-append (assoc-ref inputs "libxrender")
1260 "/include/X11/extensions"
1261 " -I" (assoc-ref inputs "libxtst")
1262 "/include/X11/extensions"
1263 " -I" (assoc-ref inputs "libxinerama")
1264 "/include/X11/extensions"))
1265 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1266 #t))
1267 (add-after 'unpack 'patch-paths
1268 (lambda _
1269 ;; buildtree.make generates shell scripts, so we need to replace
1270 ;; the generated shebang
1271 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1272 (("/bin/sh") (which "bash")))
1273
1274 (let ((corebin (string-append
1275 (assoc-ref %build-inputs "coreutils") "/bin/"))
1276 (binbin (string-append
1277 (assoc-ref %build-inputs "binutils") "/bin/"))
1278 (grepbin (string-append
1279 (assoc-ref %build-inputs "grep") "/bin/")))
1280 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1281 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1282 (("UNIXCOMMAND_PATH = /bin/")
1283 (string-append "UNIXCOMMAND_PATH = " corebin))
1284 (("USRBIN_PATH = /usr/bin/")
1285 (string-append "USRBIN_PATH = " corebin))
1286 (("DEVTOOLS_PATH *= */usr/bin/")
1287 (string-append "DEVTOOLS_PATH = " corebin))
1288 (("COMPILER_PATH *= */usr/bin/")
1289 (string-append "COMPILER_PATH = "
1290 (assoc-ref %build-inputs "gcc") "/bin/"))
1291 (("DEF_OBJCOPY *=.*objcopy")
1292 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1293
1294 ;; fix path to alsa header
1295 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1296 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1297 (string-append "ALSA_INCLUDE="
1298 (assoc-ref %build-inputs "alsa-lib")
1299 "/include/alsa/version.h")))
1300
1301 ;; fix hard-coded utility paths
1302 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1303 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1304 (("ECHO *=.*echo")
1305 (string-append "ECHO = " (which "echo")))
1306 (("^GREP *=.*grep")
1307 (string-append "GREP = " (which "grep")))
1308 (("EGREP *=.*egrep")
1309 (string-append "EGREP = " (which "egrep")))
1310 (("CPIO *=.*cpio")
1311 (string-append "CPIO = " (which "cpio")))
1312 (("READELF *=.*readelf")
1313 (string-append "READELF = " (which "readelf")))
1314 (("^ *AR *=.*ar")
1315 (string-append "AR = " (which "ar")))
1316 (("^ *TAR *=.*tar")
1317 (string-append "TAR = " (which "tar")))
1318 (("AS *=.*as")
1319 (string-append "AS = " (which "as")))
1320 (("LD *=.*ld")
1321 (string-append "LD = " (which "ld")))
1322 (("STRIP *=.*strip")
1323 (string-append "STRIP = " (which "strip")))
1324 (("NM *=.*nm")
1325 (string-append "NM = " (which "nm")))
1326 (("^SH *=.*sh")
1327 (string-append "SH = " (which "bash")))
1328 (("^FIND *=.*find")
1329 (string-append "FIND = " (which "find")))
1330 (("LDD *=.*ldd")
1331 (string-append "LDD = " (which "ldd")))
1332 (("NAWK *=.*(n|g)awk")
1333 (string-append "NAWK = " (which "gawk")))
1334 (("XARGS *=.*xargs")
1335 (string-append "XARGS = " (which "xargs")))
1336 (("UNZIP *=.*unzip")
1337 (string-append "UNZIP = " (which "unzip")))
1338 (("ZIPEXE *=.*zip")
1339 (string-append "ZIPEXE = " (which "zip")))
1340 (("SED *=.*sed")
1341 (string-append "SED = " (which "sed"))))
1342
1343 ;; Some of these timestamps cause problems as they are more than
1344 ;; 10 years ago, failing the build process.
1345 (substitute*
1346 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1347 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1348 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1349 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1350 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1351 #t))
1352 (add-before 'configure 'set-additional-paths
1353 (lambda* (#:key inputs #:allow-other-keys)
1354 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1355 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1356 (string-append "ALSA_INCLUDE="
1357 (assoc-ref inputs "alsa-lib")
1358 "/include/alsa/version.h")))
1359 (setenv "CC" "gcc")
1360 (setenv "CPATH"
1361 (string-append (assoc-ref inputs "libxcomposite")
1362 "/include/X11/extensions" ":"
1363 (assoc-ref inputs "libxrender")
1364 "/include/X11/extensions" ":"
1365 (assoc-ref inputs "libxtst")
1366 "/include/X11/extensions" ":"
1367 (assoc-ref inputs "libxinerama")
1368 "/include/X11/extensions" ":"
1369 (or (getenv "CPATH") "")))
1370 (setenv "ALT_OBJCOPY" (which "objcopy"))
1371 (setenv "ALT_CUPS_HEADERS_PATH"
1372 (string-append (assoc-ref inputs "cups")
1373 "/include"))
1374 (setenv "ALT_FREETYPE_HEADERS_PATH"
1375 (string-append (assoc-ref inputs "freetype")
1376 "/include"))
1377 (setenv "ALT_FREETYPE_LIB_PATH"
1378 (string-append (assoc-ref inputs "freetype")
1379 "/lib"))
1380 #t))
1381 (add-before 'build 'disable-os-version-check
1382 ;; allow build on linux major version change
1383 (lambda _
1384 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1385 #t))
1386 (add-before 'check 'fix-test-framework
1387 (lambda _
1388 ;; Fix PATH in test environment
1389 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1390 (("PATH=/bin:/usr/bin")
1391 (string-append "PATH=" (getenv "PATH"))))
1392 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1393 (("/usr/bin/env") (which "env")))
1394 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1395 (("/bin/rm") (which "rm"))
1396 (("/bin/cp") (which "cp"))
1397 (("/bin/mv") (which "mv")))
1398 #t))
1399 (add-before 'check 'fix-hotspot-tests
1400 (lambda _
1401 (with-directory-excursion "openjdk.src/hotspot/test/"
1402 (substitute* "jprt.config"
1403 (("PATH=\"\\$\\{path4sdk\\}\"")
1404 (string-append "PATH=" (getenv "PATH")))
1405 (("make=/usr/bin/make")
1406 (string-append "make=" (which "make"))))
1407 (substitute* '("runtime/6626217/Test6626217.sh"
1408 "runtime/7110720/Test7110720.sh")
1409 (("/bin/rm") (which "rm"))
1410 (("/bin/cp") (which "cp"))
1411 (("/bin/mv") (which "mv"))))
1412 #t))
1413 (add-before 'check 'fix-jdk-tests
1414 (lambda _
1415 (with-directory-excursion "openjdk.src/jdk/test/"
1416 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1417 (("/bin/pwd") (which "pwd")))
1418 (substitute* "com/sun/jdi/ShellScaffold.sh"
1419 (("/bin/kill") (which "kill")))
1420 (substitute* "start-Xvfb.sh"
1421 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1422 (("/usr/bin/nohup") (which "nohup")))
1423 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1424 (("/bin/rm") (which "rm")))
1425 (substitute* "tools/launcher/MultipleJRE.sh"
1426 (("echo \"#!/bin/sh\"")
1427 (string-append "echo \"#!" (which "rm") "\""))
1428 (("/usr/bin/zip") (which "zip")))
1429 (substitute* "com/sun/jdi/OnThrowTest.java"
1430 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1431 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1432 (("/usr/bin/uptime") (which "uptime")))
1433 (substitute* "java/lang/ProcessBuilder/Basic.java"
1434 (("/usr/bin/env") (which "env"))
1435 (("/bin/false") (which "false"))
1436 (("/bin/true") (which "true"))
1437 (("/bin/cp") (which "cp"))
1438 (("/bin/sh") (which "sh")))
1439 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1440 (("/bin/sh") (which "sh")))
1441 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1442 (("/usr/bin/perl") (which "perl"))
1443 (("/bin/ps") (which "ps"))
1444 (("/bin/true") (which "true")))
1445 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1446 (("/usr/bin/tee") (which "tee")))
1447 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1448 (("/bin/true") (which "true")))
1449 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1450 (("/bin/cat") (which "cat")))
1451 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1452 (("/bin/sh") (which "sh"))
1453 (("/bin/true") (which "true"))
1454 (("/bin/kill") (which "kill")))
1455 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1456 (("/usr/bin/echo") (which "echo")))
1457 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1458 (("/usr/bin/cat") (which "cat")))
1459 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1460 (("/bin/cat") (which "cat"))
1461 (("/bin/sleep") (which "sleep"))
1462 (("/bin/sh") (which "sh")))
1463 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1464 (("/bin/cat") (which "cat")))
1465 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1466 (("/bin/chmod") (which "chmod")))
1467 (substitute* "java/util/zip/ZipFile/Assortment.java"
1468 (("/bin/sh") (which "sh"))))
1469 #t))
1470 (replace 'check
1471 (lambda _
1472 ;; The "make check-*" targets always return zero, so we need to
1473 ;; check for errors in the associated log files to determine
1474 ;; whether any tests have failed.
1475 (use-modules (ice-9 rdelim))
1476 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1477 (checker (lambda (port)
1478 (let loop ()
1479 (let ((line (read-line port)))
1480 (cond
1481 ((eof-object? line) #t)
1482 ((regexp-exec error-pattern line)
1483 (error "test failed"))
1484 (else (loop)))))))
1485 (run-test (lambda (test)
1486 (invoke "make" test)
1487 (call-with-input-file
1488 (string-append "test/" test ".log")
1489 checker))))
1490 (when #f ; skip tests
1491 (run-test "check-hotspot")
1492 (run-test "check-langtools")
1493 (run-test "check-jdk"))
1494 #t)))
1495 (replace 'install
1496 (lambda* (#:key outputs #:allow-other-keys)
1497 (let ((doc (string-append (assoc-ref outputs "doc")
1498 "/share/doc/icedtea"))
1499 (jre (assoc-ref outputs "out"))
1500 (jdk (assoc-ref outputs "jdk")))
1501 (copy-recursively "openjdk.build/docs" doc)
1502 (copy-recursively "openjdk.build/j2re-image" jre)
1503 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1504 #t))
1505 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1506 ;; But that shared object is located in the server/ folder, so it
1507 ;; cannot be found. This phase creates a symbolic link in the
1508 ;; lib/amd64 folder so that the other libraries can find it.
1509 ;;
1510 ;; See:
1511 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1512 ;;
1513 ;; FIXME: Find the bug in the build system, so that this symlink is
1514 ;; not needed.
1515 (add-after 'install 'install-libjvm
1516 (lambda* (#:key inputs outputs #:allow-other-keys)
1517 (let* ((lib-path (string-append (assoc-ref outputs "out")
1518 ;; See 'INSTALL_ARCH_DIR' in
1519 ;; 'configure'.
1520 ,(match (%current-system)
1521 ("i686-linux"
1522 "/lib/i386")
1523 ("x86_64-linux"
1524 "/lib/amd64")
1525 ("armhf-linux"
1526 "/lib/arm")
1527 ("aarch64-linux"
1528 "/lib/aarch64")
1529 ;; We need a catch-all, dropping
1530 ;; '-linux' works in most cases.
1531 (_
1532 (string-append
1533 "/lib/"
1534 (string-drop-right
1535 (%current-system) 6)))))))
1536 (symlink (string-append lib-path "/server/libjvm.so")
1537 (string-append lib-path "/libjvm.so")))
1538 #t))
1539 ;; By default IcedTea only generates an empty keystore. In order to
1540 ;; be able to use certificates in Java programs we need to generate a
1541 ;; keystore from a set of certificates. For convenience we use the
1542 ;; certificates from the nss-certs package.
1543 (add-after 'install 'install-keystore
1544 (lambda* (#:key inputs outputs #:allow-other-keys)
1545 (let* ((keystore "cacerts")
1546 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1547 "/etc/ssl/certs"))
1548 (keytool (string-append (assoc-ref outputs "jdk")
1549 "/bin/keytool")))
1550 (define (extract-cert file target)
1551 (call-with-input-file file
1552 (lambda (in)
1553 (call-with-output-file target
1554 (lambda (out)
1555 (let loop ((line (read-line in 'concat))
1556 (copying? #f))
1557 (cond
1558 ((eof-object? line) #t)
1559 ((string-prefix? "-----BEGIN" line)
1560 (display line out)
1561 (loop (read-line in 'concat) #t))
1562 ((string-prefix? "-----END" line)
1563 (display line out)
1564 #t)
1565 (else
1566 (when copying? (display line out))
1567 (loop (read-line in 'concat) copying?)))))))))
1568 (define (import-cert cert)
1569 (format #t "Importing certificate ~a\n" (basename cert))
1570 (let ((temp "tmpcert"))
1571 (extract-cert cert temp)
1572 (let ((port (open-pipe* OPEN_WRITE keytool
1573 "-import"
1574 "-alias" (basename cert)
1575 "-keystore" keystore
1576 "-storepass" "changeit"
1577 "-file" temp)))
1578 (display "yes\n" port)
1579 (when (not (zero? (status:exit-val (close-pipe port))))
1580 (format #t "failed to import ~a\n" cert)))
1581 (delete-file temp)))
1582
1583 ;; This is necessary because the certificate directory contains
1584 ;; files with non-ASCII characters in their names.
1585 (setlocale LC_ALL "en_US.utf8")
1586 (setenv "LC_ALL" "en_US.utf8")
1587
1588 (for-each import-cert (find-files certs-dir "\\.pem$"))
1589 (mkdir-p (string-append (assoc-ref outputs "out")
1590 "/lib/security"))
1591 (mkdir-p (string-append (assoc-ref outputs "jdk")
1592 "/jre/lib/security"))
1593
1594 ;; The cacerts files we are going to overwrite are chmod'ed as
1595 ;; read-only (444) in icedtea-8 (which derives from this
1596 ;; package). We have to change this so we can overwrite them.
1597 (chmod (string-append (assoc-ref outputs "out")
1598 "/lib/security/" keystore) #o644)
1599 (chmod (string-append (assoc-ref outputs "jdk")
1600 "/jre/lib/security/" keystore) #o644)
1601
1602 (install-file keystore
1603 (string-append (assoc-ref outputs "out")
1604 "/lib/security"))
1605 (install-file keystore
1606 (string-append (assoc-ref outputs "jdk")
1607 "/jre/lib/security"))
1608 #t))))))
1609 (native-inputs
1610 `(("openjdk-src"
1611 ,(drop "openjdk"
1612 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1613 ("corba-drop"
1614 ,(drop "corba"
1615 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1616 ("jaxp-drop"
1617 ,(drop "jaxp"
1618 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1619 ("jaxws-drop"
1620 ,(drop "jaxws"
1621 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1622 ("jdk-drop"
1623 ,(drop "jdk"
1624 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1625 ("langtools-drop"
1626 ,(drop "langtools"
1627 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1628 ("hotspot-drop"
1629 ,(origin
1630 (method url-fetch)
1631 (uri (string-append
1632 "http://icedtea.classpath.org/downloads/drops"
1633 "/icedtea7/" version "/hotspot.tar.bz2"))
1634 (sha256
1635 (base32
1636 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1637 (patches (search-patches
1638 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1639 ("ant" ,ant-bootstrap)
1640 ("attr" ,attr)
1641 ("coreutils" ,coreutils)
1642 ("diffutils" ,diffutils) ;for tests
1643 ("gawk" ,gawk)
1644 ("grep" ,grep)
1645 ("libtool" ,libtool)
1646 ("pkg-config" ,pkg-config)
1647 ("wget" ,wget)
1648 ("which" ,which)
1649 ("cpio" ,cpio)
1650 ("zip" ,zip)
1651 ("unzip" ,unzip)
1652 ("fastjar" ,fastjar)
1653 ("libxslt" ,libxslt) ;for xsltproc
1654 ("nss-certs" ,nss-certs)
1655 ("perl" ,perl)
1656 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1657 ("jdk" ,icedtea-6 "jdk")))
1658 (inputs
1659 `(("alsa-lib" ,alsa-lib)
1660 ("cups" ,cups)
1661 ("libx11" ,libx11)
1662 ("libxcomposite" ,libxcomposite)
1663 ("libxt" ,libxt)
1664 ("libxtst" ,libxtst)
1665 ("libxi" ,libxi)
1666 ("libxinerama" ,libxinerama)
1667 ("libxrender" ,libxrender)
1668 ("libjpeg" ,libjpeg-turbo)
1669 ("libpng" ,libpng)
1670 ("mit-krb5" ,mit-krb5)
1671 ("nss" ,nss)
1672 ("giflib" ,giflib)
1673 ("fontconfig" ,fontconfig)
1674 ("freetype" ,freetype)
1675 ("lcms" ,lcms)
1676 ("zlib" ,zlib)
1677 ("gtk" ,gtk+-2)))
1678 (home-page "http://icedtea.classpath.org")
1679 (synopsis "Java development kit")
1680 (description
1681 "This package provides the Java development kit OpenJDK built with the
1682 IcedTea build harness.")
1683
1684 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1685 (supported-systems (delete "mips64el-linux" %supported-systems))
1686
1687 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1688 ;; same license as both GNU Classpath and OpenJDK.
1689 (license license:gpl2+))))
1690
1691 (define-public icedtea-8
1692 (let* ((version "3.7.0")
1693 (drop (lambda (name hash)
1694 (origin
1695 (method url-fetch)
1696 (uri (string-append
1697 "http://icedtea.classpath.org/download/drops"
1698 "/icedtea8/" version "/" name ".tar.xz"))
1699 (sha256 (base32 hash))))))
1700 (package (inherit icedtea-7)
1701 (version "3.7.0")
1702 (source (origin
1703 (method url-fetch)
1704 (uri (string-append
1705 "http://icedtea.wildebeest.org/download/source/icedtea-"
1706 version ".tar.xz"))
1707 (sha256
1708 (base32
1709 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1710 (modules '((guix build utils)))
1711 (snippet
1712 '(begin
1713 (substitute* '("configure"
1714 "acinclude.m4")
1715 ;; Do not embed build time
1716 (("(DIST_ID=\"Custom build).*$" _ prefix)
1717 (string-append prefix "\"\n"))
1718 ;; Do not leak information about the build host
1719 (("DIST_NAME=\"\\$build_os\"")
1720 "DIST_NAME=\"guix\""))
1721 #t))))
1722 (arguments
1723 `(#:imported-modules
1724 ((guix build ant-build-system)
1725 (guix build syscalls)
1726 ,@%gnu-build-system-modules)
1727 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1728 ((#:modules modules)
1729 `((guix build utils)
1730 (guix build gnu-build-system)
1731 ((guix build ant-build-system) #:prefix ant:)
1732 (ice-9 match)
1733 (ice-9 popen)
1734 (srfi srfi-19)
1735 (srfi srfi-26)))
1736 ((#:configure-flags flags)
1737 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1738 `( ;;"--disable-bootstrap"
1739 "--enable-bootstrap"
1740 "--enable-nss"
1741 "--disable-downloading"
1742 "--disable-system-pcsc"
1743 "--disable-system-sctp"
1744 "--disable-tests" ;they are run in the check phase instead
1745 "--with-openjdk-src-dir=./openjdk.src"
1746 ,(string-append "--with-jdk-home=" jdk))))
1747 ((#:phases phases)
1748 `(modify-phases ,phases
1749 (delete 'fix-x11-extension-include-path)
1750 (delete 'patch-paths)
1751 (delete 'set-additional-paths)
1752 (delete 'patch-patches)
1753 (delete 'patch-bitrot)
1754 ;; Prevent the keytool from recording the current time when
1755 ;; adding certificates at build time.
1756 (add-after 'unpack 'patch-keystore
1757 (lambda _
1758 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1759 (("date = new Date\\(\\);")
1760 "\
1761 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1762 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1763 new Date();"))
1764 #t))
1765 (add-after 'unpack 'patch-jni-libs
1766 ;; Hardcode dynamically loaded libraries.
1767 (lambda _
1768 (let* ((library-path (search-path-as-string->list
1769 (getenv "LIBRARY_PATH")))
1770 (find-library (lambda (name)
1771 (search-path
1772 library-path
1773 (string-append "lib" name ".so")))))
1774 (for-each
1775 (lambda (file)
1776 (catch 'decoding-error
1777 (lambda ()
1778 (substitute* file
1779 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1780 _ name version)
1781 (format #f "\"~a\"" (find-library name)))
1782 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1783 (format #f "\"~a\"" (find-library name)))))
1784 (lambda _
1785 ;; Those are safe to skip.
1786 (format (current-error-port)
1787 "warning: failed to substitute: ~a~%"
1788 file))))
1789 (find-files "openjdk.src/jdk/src/solaris/native"
1790 "\\.c|\\.h"))
1791 #t)))
1792 (replace 'install
1793 (lambda* (#:key outputs #:allow-other-keys)
1794 (let ((doc (string-append (assoc-ref outputs "doc")
1795 "/share/doc/icedtea"))
1796 (jre (assoc-ref outputs "out"))
1797 (jdk (assoc-ref outputs "jdk")))
1798 (copy-recursively "openjdk.build/docs" doc)
1799 (copy-recursively "openjdk.build/images/j2re-image" jre)
1800 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1801 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1802 ;; support via NSS.
1803 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1804 (string-append jre "/lib/security/nss.cfg"))
1805 #t)))
1806 (add-after 'install 'strip-jar-timestamps
1807 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1808 (native-inputs
1809 `(("jdk" ,icedtea-7 "jdk")
1810 ("openjdk-src"
1811 ,(drop "openjdk"
1812 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1813 ("aarch32-drop"
1814 ,(drop "aarch32"
1815 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1816 ("corba-drop"
1817 ,(drop "corba"
1818 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1819 ("jaxp-drop"
1820 ,(drop "jaxp"
1821 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1822 ("jaxws-drop"
1823 ,(drop "jaxws"
1824 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1825 ("jdk-drop"
1826 ,(drop "jdk"
1827 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1828 ("langtools-drop"
1829 ,(drop "langtools"
1830 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1831 ("hotspot-drop"
1832 ,(origin
1833 (method url-fetch)
1834 (uri (string-append
1835 "http://icedtea.classpath.org/download/drops"
1836 "/icedtea8/" version "/hotspot.tar.xz"))
1837 (sha256
1838 (base32
1839 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1840 (patches (search-patches
1841 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1842 ("nashorn-drop"
1843 ,(drop "nashorn"
1844 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1845 ("shenandoah-drop"
1846 ,(drop "shenandoah"
1847 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1848 ,@(fold alist-delete (package-native-inputs icedtea-7)
1849 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1850 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1851
1852 (define-public openjdk9
1853 (package
1854 (name "openjdk")
1855 (version "9.181")
1856 (source (origin
1857 (method url-fetch)
1858 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1859 (file-name (string-append name "-" version ".tar.bz2"))
1860 (sha256
1861 (base32
1862 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1863 (modules '((guix build utils)))
1864 (snippet
1865 `(begin
1866 (for-each delete-file
1867 (find-files "." ".*.(bin|exe|jar)$"))
1868 #t))))
1869 (build-system gnu-build-system)
1870 (outputs '("out" "jdk" "doc"))
1871 (arguments
1872 `(#:tests? #f; require jtreg
1873 #:make-flags '("all")
1874 #:imported-modules
1875 ((guix build syscalls)
1876 ,@%gnu-build-system-modules)
1877 #:phases
1878 (modify-phases %standard-phases
1879 (add-after 'patch-source-shebangs 'fix-java-shebangs
1880 (lambda _
1881 ;; This file was "fixed" by patch-source-shebangs, but it requires
1882 ;; this exact first line.
1883 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1884 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1885 #t))
1886 (replace 'configure
1887 (lambda* (#:key inputs outputs #:allow-other-keys)
1888 ;; TODO: unbundle libpng and lcms
1889 (invoke "bash" "./configure"
1890 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1891 "--disable-freetype-bundling"
1892 "--disable-warnings-as-errors"
1893 "--disable-hotspot-gtest"
1894 "--with-giflib=system"
1895 "--with-libjpeg=system"
1896 (string-append "--prefix=" (assoc-ref outputs "out")))
1897 #t))
1898 (add-before 'build 'write-source-revision-file
1899 (lambda _
1900 (with-output-to-file ".src-rev"
1901 (lambda _
1902 (display ,version)))
1903 #t))
1904 (replace 'build
1905 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1906 (apply invoke "make"
1907 `(,@(if parallel-build?
1908 (list (string-append "JOBS="
1909 (number->string (parallel-job-count))))
1910 '())
1911 ,@make-flags))))
1912 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1913 ;; But that shared object is located in the server/ folder, so it
1914 ;; cannot be found. This phase creates a symbolic link in the
1915 ;; lib/ folder so that the other libraries can find it.
1916 ;;
1917 ;; See:
1918 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1919 ;;
1920 ;; FIXME: Find the bug in the build system, so that this symlink is
1921 ;; not needed.
1922 (add-after 'install 'install-libjvm
1923 (lambda* (#:key inputs outputs #:allow-other-keys)
1924 (let* ((lib-out (string-append (assoc-ref outputs "out")
1925 "/lib"))
1926 (lib-jdk (string-append (assoc-ref outputs "jdk")
1927 "/lib")))
1928 (symlink (string-append lib-jdk "/server/libjvm.so")
1929 (string-append lib-jdk "/libjvm.so"))
1930 (symlink (string-append lib-out "/server/libjvm.so")
1931 (string-append lib-out "/libjvm.so")))
1932 #t))
1933 (replace 'install
1934 (lambda* (#:key outputs #:allow-other-keys)
1935 (let ((out (assoc-ref outputs "out"))
1936 (jdk (assoc-ref outputs "jdk"))
1937 (doc (assoc-ref outputs "doc"))
1938 (images (car (find-files "build" ".*-server-release"
1939 #:directories? #t))))
1940 (copy-recursively (string-append images "/images/jdk") jdk)
1941 (copy-recursively (string-append images "/images/jre") out)
1942 (copy-recursively (string-append images "/images/docs") doc))
1943 #t))
1944 (add-after 'install 'strip-zip-timestamps
1945 (lambda* (#:key outputs #:allow-other-keys)
1946 (use-modules (guix build syscalls))
1947 (for-each (lambda (zip)
1948 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1949 (with-directory-excursion dir
1950 (invoke "unzip" zip))
1951 (delete-file zip)
1952 (for-each (lambda (file)
1953 (let ((s (lstat file)))
1954 (unless (eq? (stat:type s) 'symlink)
1955 (format #t "reset ~a~%" file)
1956 (utime file 0 0 0 0))))
1957 (find-files dir #:directories? #t))
1958 (with-directory-excursion dir
1959 (let ((files (find-files "." ".*" #:directories? #t)))
1960 (apply invoke "zip" "-0" "-X" zip files)))))
1961 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1962 #t)))))
1963 (inputs
1964 `(("alsa-lib" ,alsa-lib)
1965 ("cups" ,cups)
1966 ("fontconfig" ,fontconfig)
1967 ("freetype" ,freetype)
1968 ("giflib" ,giflib)
1969 ("lcms" ,lcms)
1970 ("libelf" ,libelf)
1971 ("libjpeg" ,libjpeg-turbo)
1972 ("libice" ,libice)
1973 ("libpng" ,libpng)
1974 ("libx11" ,libx11)
1975 ("libxcomposite" ,libxcomposite)
1976 ("libxi" ,libxi)
1977 ("libxinerama" ,libxinerama)
1978 ("libxrender" ,libxrender)
1979 ("libxt" ,libxt)
1980 ("libxtst" ,libxtst)))
1981 (native-inputs
1982 `(("icedtea-8" ,icedtea-8)
1983 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1984 ;; XXX: The build system fails with newer versions of GNU Make.
1985 ("make@4.2" ,gnu-make-4.2)
1986 ("unzip" ,unzip)
1987 ("which" ,which)
1988 ("zip" ,zip)))
1989 (home-page "https://openjdk.java.net/projects/jdk9/")
1990 (synopsis "Java development kit")
1991 (description
1992 "This package provides the Java development kit OpenJDK.")
1993 (license license:gpl2+)))
1994
1995 (define-public openjdk10
1996 (package
1997 (inherit openjdk9)
1998 (name "openjdk")
1999 (version "10.46")
2000 (source (origin
2001 (method url-fetch)
2002 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2003 (file-name (string-append name "-" version ".tar.bz2"))
2004 (sha256
2005 (base32
2006 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2007 (patches (search-patches
2008 "openjdk-10-idlj-reproducibility.patch"))
2009 (modules '((guix build utils)))
2010 (snippet
2011 `(begin
2012 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2013 #t))))
2014 (arguments
2015 (substitute-keyword-arguments (package-arguments openjdk9)
2016 ((#:phases phases)
2017 `(modify-phases ,phases
2018 (replace 'fix-java-shebangs
2019 (lambda _
2020 ;; This file was "fixed" by patch-source-shebangs, but it requires
2021 ;; this exact first line.
2022 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2023 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2024 #t))
2025 (replace 'configure
2026 (lambda* (#:key inputs outputs #:allow-other-keys)
2027 (invoke "bash" "./configure"
2028 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2029 "--disable-freetype-bundling"
2030 "--disable-warnings-as-errors"
2031 "--disable-hotspot-gtest"
2032 "--with-giflib=system"
2033 "--with-libjpeg=system"
2034 "--with-native-debug-symbols=zipped"
2035 (string-append "--prefix=" (assoc-ref outputs "out")))
2036 #t))))))
2037 (native-inputs
2038 `(("openjdk9" ,openjdk9)
2039 ("openjdk9:jdk" ,openjdk9 "jdk")
2040 ("make@4.2" ,gnu-make-4.2)
2041 ("unzip" ,unzip)
2042 ("which" ,which)
2043 ("zip" ,zip)))))
2044
2045 (define-public openjdk11
2046 (package
2047 (name "openjdk")
2048 (version "11.28")
2049 (source (origin
2050 (method url-fetch)
2051 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2052 (file-name (string-append name "-" version ".tar.bz2"))
2053 (sha256
2054 (base32
2055 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2056 (modules '((guix build utils)))
2057 (snippet
2058 `(begin
2059 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2060 #t))))
2061 (build-system gnu-build-system)
2062 (outputs '("out" "jdk" "doc"))
2063 (arguments
2064 `(#:imported-modules
2065 ((guix build syscalls)
2066 (ice-9 binary-ports)
2067 (rnrs bytevectors)
2068 ,@%gnu-build-system-modules)
2069 #:tests? #f; requires jtreg
2070 ;; TODO package jtreg
2071 #:configure-flags
2072 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2073 "--disable-warnings-as-errors"
2074 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2075 "--with-native-debug-symbols=zipped"
2076 ;; do not use the bundled libraries
2077 "--with-giflib=system"
2078 "--with-lcms=system"
2079 "--with-libjpeg=system"
2080 "--with-libpng=system"
2081 "--with-version-pre="
2082 ;; allow the build system to locate the system freetype
2083 ,(string-append "--with-freetype-include="
2084 (assoc-ref %build-inputs "freetype") "/include")
2085 ,(string-append "--with-freetype-lib="
2086 (assoc-ref %build-inputs "freetype") "/lib"))
2087 #:phases
2088 (modify-phases %standard-phases
2089 (add-after 'patch-source-shebangs 'fix-java-shebangs
2090 (lambda _
2091 ;; This file was "fixed" by patch-source-shebangs, but it requires
2092 ;; this exact first line.
2093 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2094 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2095 #t))
2096 (add-before 'build 'write-source-revision-file
2097 (lambda _
2098 (with-output-to-file ".src-rev"
2099 (lambda _
2100 (display ,version)))
2101 #t))
2102 (replace 'build
2103 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2104 (apply invoke "make" "all"
2105 `(,@(if parallel-build?
2106 (list (string-append "JOBS="
2107 (number->string (parallel-job-count))))
2108 '())
2109 ,@make-flags))))
2110 ;; jdk 11 does not build jre by default any more
2111 ;; building it anyways
2112 ;; for further information see:
2113 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2114 (add-after 'build 'build-jre
2115 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2116 (apply invoke "make" "legacy-jre-image"
2117 `(,@(if parallel-build?
2118 (list (string-append "JOBS="
2119 (number->string (parallel-job-count))))
2120 '())
2121 ,@make-flags))))
2122 (replace 'install
2123 (lambda* (#:key outputs #:allow-other-keys)
2124 (let ((out (assoc-ref outputs "out"))
2125 (jdk (assoc-ref outputs "jdk"))
2126 (doc (assoc-ref outputs "doc"))
2127 (images (car (find-files "build" ".*-server-release"
2128 #:directories? #t))))
2129 (copy-recursively (string-append images "/images/jdk") jdk)
2130 (copy-recursively (string-append images "/images/jre") out)
2131 (copy-recursively (string-append images "/images/docs") doc))
2132 #t))
2133 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2134 ;; But that shared object is located in the server/ folder, so it
2135 ;; cannot be found. This phase creates a symbolic link in the
2136 ;; lib/ folder so that the other libraries can find it.
2137 ;;
2138 ;; See:
2139 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2140 ;;
2141 ;; FIXME: Find the bug in the build system, so that this symlink is
2142 ;; not needed.
2143 (add-after 'install 'install-libjvm
2144 (lambda* (#:key inputs outputs #:allow-other-keys)
2145 (let* ((lib-out (string-append (assoc-ref outputs "out")
2146 "/lib"))
2147 (lib-jdk (string-append (assoc-ref outputs "jdk")
2148 "/lib")))
2149 (symlink (string-append lib-jdk "/server/libjvm.so")
2150 (string-append lib-jdk "/libjvm.so"))
2151 (symlink (string-append lib-out "/server/libjvm.so")
2152 (string-append lib-out "/libjvm.so")))
2153 #t))
2154 (add-after 'install 'strip-character-data-timestamps
2155 (lambda* (#:key outputs #:allow-other-keys)
2156 (use-modules (guix build syscalls))
2157 (let ((archive (string-append
2158 (assoc-ref outputs "jdk") "/lib/src.zip"))
2159 (dir (mkdtemp! "zip-contents.XXXXXX")))
2160 (with-directory-excursion dir
2161 (invoke "unzip" archive))
2162 (delete-file archive)
2163 (with-directory-excursion dir
2164 (let ((char-data-files (find-files "." "CharacterData.*")))
2165 (for-each (lambda (file)
2166 (substitute* file
2167 (((string-append "This file was generated "
2168 "AUTOMATICALLY from a template "
2169 "file.*"))
2170 (string-append "This file was generated "
2171 "AUTOMATICALLY from a template "
2172 "file"))))
2173 char-data-files)))
2174 (with-directory-excursion dir
2175 (let ((files (find-files "." ".*" #:directories? #t)))
2176 (apply invoke "zip" "-0" "-X" archive files))))))
2177 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2178 (lambda* (#:key outputs #:allow-other-keys)
2179 (use-modules (guix build syscalls)
2180 (ice-9 binary-ports)
2181 (rnrs bytevectors))
2182 (letrec ((repack-archive
2183 (lambda (archive)
2184 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2185 (with-directory-excursion dir
2186 (invoke "unzip" archive))
2187 (delete-file archive)
2188 (for-each (compose repack-archive canonicalize-path)
2189 (find-files dir "(ct.sym|.*.jar)$"))
2190 (let ((reset-file-timestamp
2191 (lambda (file)
2192 (let ((s (lstat file)))
2193 (unless (eq? (stat:type s) 'symlink)
2194 (format #t "reset ~a~%" file)
2195 (utime file 0 0 0 0))))))
2196 (for-each reset-file-timestamp
2197 (find-files dir #:directories? #t)))
2198 (with-directory-excursion dir
2199 (let ((files (find-files "." ".*" #:directories? #t)))
2200 (apply invoke "zip" "-0" "-X" archive files)))))))
2201 (for-each repack-archive
2202 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2203 (for-each repack-archive
2204 (find-files (assoc-ref outputs "jdk")
2205 ".*.(zip|jar|diz)$"))
2206 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2207 (let ((repack-jmod
2208 (lambda (file-name)
2209 (call-with-input-file file-name
2210 (lambda (file)
2211 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2212 (if (equal? (get-bytevector-n
2213 file (bytevector-length header))
2214 header)
2215 (let* ((header-length (bytevector-length header))
2216 (temp-file (mkstemp!
2217 (string-copy
2218 "temp-file.XXXXXX")))
2219 (temp-filename (port-filename temp-file))
2220 (content-length
2221 (- (stat:size (stat file))
2222 header-length)))
2223 (sendfile temp-file file content-length header-length)
2224 (delete-file file-name)
2225 (close-port temp-file)
2226 (repack-archive (canonicalize-path temp-filename))
2227 (call-with-output-file file-name
2228 (lambda (file)
2229 (put-bytevector file header)
2230 (call-with-input-file temp-filename
2231 (lambda (temp-file)
2232 (sendfile
2233 file temp-file
2234 (stat:size (stat temp-file)) 0)))))))))))))
2235 (for-each repack-jmod
2236 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2237 #t)))
2238 (add-after 'install 'remove-timestamp-from-api-summary
2239 (lambda* (#:key outputs #:allow-other-keys)
2240 (substitute* (string-append (assoc-ref outputs "doc")
2241 "/api/overview-summary.html")
2242 (("Generated by javadoc \\(11-internal\\).*$")
2243 "Generated by javadoc (11-internal) -->\n"))
2244 #t)))))
2245 (inputs
2246 `(("alsa-lib" ,alsa-lib)
2247 ("cups" ,cups)
2248 ("fontconfig" ,fontconfig)
2249 ("freetype" ,freetype)
2250 ("giflib" ,giflib)
2251 ("lcms" ,lcms)
2252 ("libjpeg" ,libjpeg-turbo)
2253 ("libpng" ,libpng)
2254 ("libx11" ,libx11)
2255 ("libxext" ,libxext)
2256 ("libxrender" ,libxrender)
2257 ("libxt" ,libxt)
2258 ("libxtst" ,libxtst)))
2259 (native-inputs
2260 `(("autoconf" ,autoconf)
2261 ("openjdk10" ,openjdk10)
2262 ("openjdk10:jdk" ,openjdk10 "jdk")
2263 ("make" ,gnu-make-4.2)
2264 ("pkg-config" ,pkg-config)
2265 ("unzip" ,unzip)
2266 ("which" ,which)
2267 ("zip" ,zip)))
2268 (home-page "https://openjdk.java.net/projects/jdk/11/")
2269 (synopsis "Java development kit")
2270 (description
2271 "This package provides the Java development kit OpenJDK.")
2272 (license license:gpl2+)))
2273
2274 (define-public openjdk12
2275 (package
2276 (inherit openjdk11)
2277 (name "openjdk")
2278 (version "12.33")
2279 (source (origin
2280 (method url-fetch)
2281 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2282 (file-name (string-append name "-" version ".tar.bz2"))
2283 (sha256
2284 (base32
2285 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2286 (modules '((guix build utils)))
2287 (snippet
2288 `(begin
2289 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2290 #t))))
2291 (inputs
2292 `(("alsa-lib" ,alsa-lib)
2293 ("cups" ,cups)
2294 ("fontconfig" ,fontconfig)
2295 ("freetype" ,freetype)
2296 ("giflib" ,giflib)
2297 ("lcms" ,lcms)
2298 ("libjpeg" ,libjpeg-turbo)
2299 ("libpng" ,libpng)
2300 ("libx11" ,libx11)
2301 ("libxext" ,libxext)
2302 ("libxrandr" ,libxrandr)
2303 ("libxrender" ,libxrender)
2304 ("libxt" ,libxt)
2305 ("libxtst" ,libxtst)))
2306 (native-inputs
2307 `(("autoconf" ,autoconf)
2308 ("openjdk11" ,openjdk11)
2309 ("openjdk11:jdk" ,openjdk11 "jdk")
2310 ("make@4.2" ,gnu-make-4.2)
2311 ("pkg-config" ,pkg-config)
2312 ("unzip" ,unzip)
2313 ("which" ,which)
2314 ("zip" ,zip)))
2315 (home-page "https://openjdk.java.net/projects/jdk/12")))
2316
2317 (define-public openjdk13
2318 (package
2319 (inherit openjdk12)
2320 (name "openjdk")
2321 (version "13.0")
2322 (source (origin
2323 (method url-fetch)
2324 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2325 (file-name (string-append name "-" version ".tar.bz2"))
2326 (sha256
2327 (base32
2328 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2329 (modules '((guix build utils)))
2330 (snippet
2331 `(begin
2332 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2333 #t))))
2334 (inputs
2335 `(("alsa-lib" ,alsa-lib)
2336 ("cups" ,cups)
2337 ("fontconfig" ,fontconfig)
2338 ("freetype" ,freetype)
2339 ("giflib" ,giflib)
2340 ("lcms" ,lcms)
2341 ("libjpeg" ,libjpeg-turbo)
2342 ("libpng" ,libpng)
2343 ("libx11" ,libx11)
2344 ("libxext" ,libxext)
2345 ("libxrandr" ,libxrandr)
2346 ("libxrender" ,libxrender)
2347 ("libxt" ,libxt)
2348 ("libxtst" ,libxtst)))
2349 (native-inputs
2350 `(("autoconf" ,autoconf)
2351 ("openjdk12:jdk" ,openjdk12 "jdk")
2352 ("make@4.2" ,gnu-make-4.2)
2353 ("pkg-config" ,pkg-config)
2354 ("unzip" ,unzip)
2355 ("which" ,which)
2356 ("zip" ,zip)))
2357 (home-page "https://openjdk.java.net/projects/jdk/13")))
2358
2359 (define-public openjdk14
2360 (package
2361 (inherit openjdk13)
2362 (name "openjdk")
2363 (version "14.0")
2364 (source (origin
2365 (method url-fetch)
2366 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2367 (file-name (string-append name "-" version ".tar.bz2"))
2368 (sha256
2369 (base32
2370 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2371 (modules '((guix build utils)))
2372 (snippet
2373 `(begin
2374 ;; The m4 macro uses 'help' to search for builtins, which is
2375 ;; not available in bash-minimal
2376 (substitute* "make/autoconf/basics.m4"
2377 (("if help") "if command -v"))
2378 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2379 #t))))
2380 (inputs
2381 `(("alsa-lib" ,alsa-lib)
2382 ("cups" ,cups)
2383 ("fontconfig" ,fontconfig)
2384 ("freetype" ,freetype)
2385 ("giflib" ,giflib)
2386 ("lcms" ,lcms)
2387 ("libjpeg" ,libjpeg-turbo)
2388 ("libpng" ,libpng)
2389 ("libx11" ,libx11)
2390 ("libxext" ,libxext)
2391 ("libxrandr" ,libxrandr)
2392 ("libxrender" ,libxrender)
2393 ("libxt" ,libxt)
2394 ("libxtst" ,libxtst)))
2395 (native-inputs
2396 `(("autoconf" ,autoconf)
2397 ("make@4.2" ,gnu-make-4.2)
2398 ("openjdk13:jdk" ,openjdk13 "jdk")
2399 ("pkg-config" ,pkg-config)
2400 ("unzip" ,unzip)
2401 ("which" ,which)
2402 ("zip" ,zip)))
2403 (home-page "https://openjdk.java.net/projects/jdk/14")))
2404
2405 (define-public icedtea icedtea-8)
2406
2407 \f
2408 (define-public ant/java8
2409 (package (inherit ant-bootstrap)
2410 (name "ant")
2411 (version "1.10.1")
2412 (source (origin
2413 (method url-fetch)
2414 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2415 version "-src.tar.gz"))
2416 (sha256
2417 (base32
2418 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2419 (modules '((guix build utils)))
2420 (snippet
2421 '(begin
2422 (for-each delete-file
2423 (find-files "lib/optional" "\\.jar$"))
2424 #t))))
2425 (arguments
2426 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2427 ((#:phases phases)
2428 `(modify-phases ,phases
2429 (add-after 'unpack 'remove-scripts
2430 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2431 ;; wrappers.
2432 (lambda _
2433 (for-each delete-file
2434 (find-files "src/script"
2435 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2436 #t))
2437 (replace 'build
2438 (lambda* (#:key inputs outputs #:allow-other-keys)
2439 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2440
2441 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2442 ;; Ant to build. This is necessary in addition to disabling the
2443 ;; "check" phase, because the dependency on "test-jar" would always
2444 ;; result in the tests to be run.
2445 (substitute* "build.xml"
2446 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2447 (invoke "bash" "bootstrap.sh"
2448 (string-append "-Ddist.dir="
2449 (assoc-ref outputs "out")))))))))
2450 (native-inputs
2451 `(("jdk" ,icedtea-8 "jdk")
2452 ("zip" ,zip)
2453 ("unzip" ,unzip)))))
2454
2455 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2456 ;; requires Java 8.
2457 (define-public ant
2458 (package (inherit ant/java8)
2459 (version "1.9.9")
2460 (source (origin
2461 (method url-fetch)
2462 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2463 version "-src.tar.gz"))
2464 (sha256
2465 (base32
2466 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2467 (native-inputs
2468 `(("jdk" ,icedtea-7 "jdk")
2469 ("zip" ,zip)
2470 ("unzip" ,unzip)))))
2471
2472 (define-public ant-apache-bcel
2473 (package
2474 (inherit ant/java8)
2475 (name "ant-apache-bcel")
2476 (arguments
2477 (substitute-keyword-arguments (package-arguments ant/java8)
2478 ((#:phases phases)
2479 `(modify-phases ,phases
2480 (add-after 'unpack 'link-bcel
2481 (lambda* (#:key inputs #:allow-other-keys)
2482 (for-each (lambda (file)
2483 (symlink file
2484 (string-append "lib/optional/"
2485 (basename file))))
2486 (find-files (assoc-ref inputs "java-commons-bcel")
2487 "\\.jar$"))
2488 #t))
2489 (add-after 'build 'install
2490 (lambda* (#:key outputs #:allow-other-keys)
2491 (let* ((out (assoc-ref outputs "out"))
2492 (share (string-append out "/share/java"))
2493 (bin (string-append out "/bin"))
2494 (lib (string-append out "/lib")))
2495 (mkdir-p share)
2496 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2497 (delete-file-recursively bin)
2498 (delete-file-recursively lib)
2499 #t)))))))
2500 (inputs
2501 `(("java-commons-bcel" ,java-commons-bcel)
2502 ,@(package-inputs ant/java8)))))
2503
2504 (define-public ant-junit
2505 (package
2506 (inherit ant/java8)
2507 (name "ant-junit")
2508 (arguments
2509 (substitute-keyword-arguments (package-arguments ant/java8)
2510 ((#:phases phases)
2511 `(modify-phases ,phases
2512 (add-after 'unpack 'link-junit
2513 (lambda* (#:key inputs #:allow-other-keys)
2514 (for-each (lambda (file)
2515 (symlink file
2516 (string-append "lib/optional/"
2517 (basename file))))
2518 (find-files (assoc-ref inputs "java-junit")
2519 "\\.jar$"))
2520 #t))
2521 (add-after 'build 'install
2522 (lambda* (#:key outputs #:allow-other-keys)
2523 (let* ((out (assoc-ref outputs "out"))
2524 (share (string-append out "/share/java"))
2525 (bin (string-append out "/bin"))
2526 (lib (string-append out "/lib")))
2527 (mkdir-p share)
2528 (install-file (string-append lib "/ant-junit.jar") share)
2529 (delete-file-recursively bin)
2530 (delete-file-recursively lib)
2531 #t)))))))
2532 (inputs
2533 `(("java-junit" ,java-junit)
2534 ,@(package-inputs ant/java8)))))
2535
2536 (define-public java-openjfx-build
2537 (package
2538 (name "java-openjfx-build")
2539 ;; This is a java-8 version
2540 (version "8.202")
2541 (source (origin
2542 (method hg-fetch)
2543 (uri (hg-reference
2544 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2545 (changeset (string-append
2546 (string-join (string-split version #\.) "u")
2547 "-ga"))))
2548 (file-name (string-append name "-" version "-checkout"))
2549 (modules '((guix build utils)))
2550 (snippet
2551 '(begin
2552 ;; Delete included gradle jar
2553 (delete-file-recursively "gradle/wrapper")
2554 #t))
2555 (sha256
2556 (base32
2557 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2558 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2559 (build-system ant-build-system)
2560 (arguments
2561 `(#:jar-name "java-openjfx.jar"
2562 #:source-dir "buildSrc/src/main/java"
2563 #:test-dir "buildSrc/src/test"
2564 #:phases
2565 (modify-phases %standard-phases
2566 (add-before 'configure 'generate-jsl-parser
2567 (lambda _
2568 (invoke "antlr3" "-o"
2569 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2570 "buildSrc/src/main/antlr/JSL.g"))))))
2571 (inputs
2572 `(("antlr3" ,antlr3)
2573 ("java-stringtemplate" ,java-stringtemplate)))
2574 (native-inputs
2575 `(("java-junit" ,java-junit)
2576 ("java-hamcrest-core" ,java-hamcrest-core)))
2577 (home-page "https://openjfx.io")
2578 (synopsis "Graphical application toolkit in Java")
2579 (description "OpenJFX is a client application platform for desktop,
2580 mobile and embedded systems built on Java. Its goal is to produce a
2581 modern, efficient, and fully featured toolkit for developing rich client
2582 applications. This package contains base classes for the OpenJFX
2583 distribution and helper classes for building other parts of the
2584 distribution.")
2585 (license license:gpl2))) ;gpl2 only, with classpath exception
2586
2587 (define-public java-openjfx-base
2588 (package (inherit java-openjfx-build)
2589 (name "java-openjfx-base")
2590 (arguments
2591 `(#:jar-name "java-openjfx-base.jar"
2592 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2593 #:test-dir "modules/base/src/test"
2594 #:phases
2595 (modify-phases %standard-phases
2596 (add-before 'check 'remove-empty-file
2597 (lambda _
2598 (with-directory-excursion "modules/base/src/test/java"
2599 ;; These files are completely commented, but junit expects them to
2600 ;; contain a class, so tests fail.
2601 (delete-file
2602 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2603 (delete-file
2604 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2605 (delete-file "javafx/beans/property/PropertiesTest.java")
2606 (delete-file
2607 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2608 ;; This one fails
2609 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2610 #t)))))
2611 (propagated-inputs
2612 `(("java-openjfx-build" ,java-openjfx-build)))
2613 (description "OpenJFX is a client application platform for desktop,
2614 mobile and embedded systems built on Java. Its goal is to produce a
2615 modern, efficient, and fully featured toolkit for developing rich client
2616 applications. This package contains base classes for the OpenJFX
2617 distribution.")))
2618
2619 (define-public java-openjfx-graphics
2620 (package (inherit java-openjfx-build)
2621 (name "java-openjfx-graphics")
2622 (arguments
2623 `(#:jar-name "java-openjfx-graphics.jar"
2624 #:source-dir "modules/graphics/src/main/java"
2625 #:tests? #f; require X
2626 #:test-dir "modules/graphics/src/test"))
2627 (propagated-inputs
2628 `(("java-openjfx-base" ,java-openjfx-base)
2629 ("java-swt" ,java-swt)))
2630 (description "OpenJFX is a client application platform for desktop,
2631 mobile and embedded systems built on Java. Its goal is to produce a
2632 modern, efficient, and fully featured toolkit for developing rich client
2633 applications. This package contains graphics-related classes for the
2634 OpenJFX distribution.")))
2635
2636 (define-public java-openjfx-media
2637 (package (inherit java-openjfx-build)
2638 (name "java-openjfx-media")
2639 (propagated-inputs
2640 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2641 (arguments
2642 `(#:jar-name "java-openjfx-media.jar"
2643 #:source-dir "modules/media/src/main/java"
2644 #:tests? #f)); no tests
2645 (description "OpenJFX is a client application platform for desktop,
2646 mobile and embedded systems built on Java. Its goal is to produce a
2647 modern, efficient, and fully featured toolkit for developing rich client
2648 applications. This package contains media-related classes for the
2649 OpenJFX distribution.")))
2650
2651 (define-public javacc-4
2652 (package
2653 (name "javacc")
2654 (version "4.1")
2655 (source (origin
2656 (method git-fetch)
2657 (uri (git-reference
2658 (url "https://github.com/javacc/javacc")
2659 (commit "release_41")))
2660 (file-name (string-append "javacc-" version "-checkout"))
2661 (sha256
2662 (base32
2663 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2664 (modules '((guix build utils)))
2665 ;; delete bundled jars
2666 (snippet '(begin (delete-file-recursively "lib") #t))))
2667 (build-system ant-build-system)
2668 ;; Tests fail with
2669 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2670 ;; JAVACODE failed
2671 (arguments
2672 `(#:tests? #f
2673 #:phases
2674 (modify-phases %standard-phases
2675 ;; Delete tests to avoid build failure (we don't run them anyway).
2676 (add-after 'unpack 'delete-tests
2677 (lambda _
2678 (for-each delete-file
2679 '("src/org/javacc/JavaCCTestCase.java"
2680 "src/org/javacc/parser/ExpansionTest.java"
2681 "src/org/javacc/parser/OptionsTest.java"
2682 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2683 (for-each delete-file-recursively
2684 '("src/org/javacc/parser/test"
2685 "src/org/javacc/jjdoc/test"))
2686 #t))
2687 (replace 'install (install-jars "bin/lib")))))
2688 (home-page "https://javacc.org/")
2689 (synopsis "Java parser generator")
2690 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2691 generator for use with Java applications. A parser generator is a tool that
2692 reads a grammar specification and converts it to a Java program that can
2693 recognize matches to the grammar. In addition to the parser generator itself,
2694 JavaCC provides other standard capabilities related to parser generation such
2695 as tree building (via a tool called JJTree included with JavaCC), actions,
2696 debugging, etc.")
2697 (license license:bsd-3)))
2698
2699 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2700 ;; in the bootstrap/ directory.
2701 (define-public javacc-3
2702 (package
2703 (inherit javacc-4)
2704 (version "3.2")
2705 (source (origin
2706 (method git-fetch)
2707 (uri (git-reference
2708 (url "https://github.com/javacc/javacc.git")
2709 (commit "release_32")))
2710 (file-name (string-append "javacc-" version "-checkout"))
2711 (sha256
2712 (base32
2713 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2714 (arguments
2715 `(#:tests? #f
2716 #:phases
2717 (modify-phases %standard-phases
2718 (add-before 'build 'set-java-version
2719 (lambda _
2720 (for-each
2721 (lambda (file)
2722 (substitute* file
2723 (("debug=") "source=\"1.4\" debug=")))
2724 (find-files "." "build.xml"))
2725 #t))
2726 (replace 'install (install-jars "bin/lib")))))))
2727
2728 (define-public javacc
2729 (package
2730 (inherit javacc-4)
2731 (version "7.0.4")
2732 (source
2733 (origin
2734 (method git-fetch)
2735 (uri (git-reference
2736 (url "https://github.com/javacc/javacc")
2737 (commit version)))
2738 (file-name (git-file-name "javacc" version))
2739 (sha256
2740 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2741 (modules '((guix build utils)))
2742 ;; Delete bundled jars.
2743 (snippet '(begin (for-each delete-file-recursively
2744 '("bootstrap" "lib"))
2745 #t))))
2746 (arguments
2747 `(#:make-flags ; bootstrap from javacc-4
2748 (list (string-append "-Dbootstrap-jar="
2749 (assoc-ref %build-inputs "javacc")
2750 "/share/java/javacc.jar"))
2751 #:test-target "test"
2752 #:phases
2753 (modify-phases %standard-phases
2754 (replace 'install (install-jars "target"))
2755 (add-after 'install 'install-bin
2756 (lambda* (#:key outputs inputs #:allow-other-keys)
2757 (let* ((out (assoc-ref outputs "out"))
2758 (dir (string-append out "/share/java"))
2759 (bin (string-append out "/bin"))
2760 (javacc (string-append bin "/javacc")))
2761 (mkdir-p bin)
2762 (with-output-to-file javacc
2763 (lambda _
2764 (display
2765 (string-append "#!/bin/sh\n"
2766 (assoc-ref inputs "jdk") "/bin/java"
2767 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2768 (chmod javacc #o755)
2769 ;; symlink to different names to affect the first argument and
2770 ;; change the behavior of the jar file.
2771 (symlink javacc (string-append bin "/jjdoc"))
2772 (symlink javacc (string-append bin "/jjtree"))
2773 #t))))))
2774
2775 (native-inputs
2776 `(("javacc" ,javacc-4)))))
2777
2778 ;; This is the last 3.x release of ECJ
2779 (define-public java-ecj-3
2780 (package
2781 (name "java-ecj")
2782 (version "3.8.2")
2783 (source (origin
2784 (method url-fetch)
2785 (uri (string-append "http://archive.eclipse.org/eclipse/"
2786 "downloads/drops/R-" version
2787 "-201301310800/ecjsrc-" version ".jar"))
2788 (sha256
2789 (base32
2790 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2791 (build-system ant-build-system)
2792 (arguments
2793 `(#:tests? #f ; none included
2794 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2795 #:make-flags (list "-f" "src/build.xml")
2796 #:build-target "build"
2797 #:phases
2798 (modify-phases %standard-phases
2799 (add-after 'unpack 'fix-manifest
2800 (lambda _
2801 ;; Record the main class to make ecj executable.
2802 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2803 (lambda (in out)
2804 (display "Manifest-Version: 1.0
2805 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2806 out)))
2807 #t))
2808 (replace 'install (install-jars ".")))))
2809 (home-page "https://eclipse.org")
2810 (synopsis "Eclipse Java development tools core batch compiler")
2811 (description "This package provides the Eclipse Java core batch compiler.")
2812 (license license:epl1.0)))
2813
2814 ;; This is needed for java-cisd-args4j
2815 (define-public java-ecj-3.5
2816 (package (inherit java-ecj-3)
2817 (version "3.5.1")
2818 (source (origin
2819 (method url-fetch/zipbomb)
2820 (uri (string-append "http://archive.eclipse.org/eclipse/"
2821 "downloads/drops/R-" version
2822 "-200909170800/ecjsrc-" version ".zip"))
2823 (sha256
2824 (base32
2825 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2826 (build-system ant-build-system)
2827 (arguments
2828 `(#:tests? #f ; none included
2829 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2830 #:build-target "build"
2831 #:phases
2832 (modify-phases %standard-phases
2833 (add-after 'unpack 'fix-manifest
2834 (lambda _
2835 ;; Record the main class to make ecj executable.
2836 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2837 (lambda (in out)
2838 (dump-port in out)
2839 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2840 out)))
2841 #t))
2842 (replace 'install (install-jars ".")))))
2843 (native-inputs
2844 `(("unzip" ,unzip)))))
2845
2846 (define-public java-ecj
2847 (package (inherit java-ecj-3)
2848 (version "4.6.3")
2849 (source
2850 (origin
2851 (method url-fetch)
2852 (uri (string-append
2853 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2854 version
2855 "-201703010400/ecjsrc-"
2856 version
2857 ".jar"))
2858 (sha256
2859 (base32
2860 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2861 (arguments
2862 `(#:tests? #f ; none included
2863 #:build-target "build"
2864 #:phases
2865 (modify-phases %standard-phases
2866 (add-after 'unpack 'fix-build.xml
2867 (lambda _
2868 (substitute* "src/build.xml"
2869 (("^.*MANIFEST.*$")
2870 ""))
2871 #t))
2872 (add-after 'unpack 'fix-prop
2873 (lambda _
2874 (substitute* "src/build.xml"
2875 (("^.*properties.*$")
2876 "<include name=\"**/*.properties\"/>
2877 <include name=\"**/*.props\"/>"))
2878 #t))
2879 (add-before 'build 'chdir
2880 (lambda _
2881 (chdir "src")
2882 #t))
2883 (replace 'install (install-jars ".")))))))
2884
2885 (define-public java-cisd-base
2886 (let ((revision 38938)
2887 (base-version "14.12.0"))
2888 (package
2889 (name "java-cisd-base")
2890 (version (string-append base-version "-" (number->string revision)))
2891 (source (origin
2892 (method svn-fetch)
2893 (uri (svn-reference
2894 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2895 "base/tags/release/"
2896 (version-major+minor base-version)
2897 ".x/" base-version "/base/"))
2898 (revision revision)))
2899 (file-name (string-append "java-cisd-base-" version "-checkout"))
2900 (sha256
2901 (base32
2902 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2903 (modules '((guix build utils)))
2904 (snippet
2905 '(begin
2906 ;; Delete included gradle jar
2907 (delete-file-recursively "gradle/wrapper")
2908 ;; Delete pre-built native libraries
2909 (delete-file-recursively "libs")
2910 #t))))
2911 (build-system ant-build-system)
2912 (arguments
2913 `(#:make-flags '("-file" "build/build.xml")
2914 #:test-target "jar-test"
2915 #:jdk ,icedtea-8
2916 #:phases
2917 (modify-phases %standard-phases
2918 (add-after 'unpack 'unpack-build-resources
2919 (lambda* (#:key inputs #:allow-other-keys)
2920 (copy-recursively (assoc-ref inputs "build-resources")
2921 "../build_resources")
2922 #t))
2923 (add-after 'unpack-build-resources 'fix-dependencies
2924 (lambda* (#:key inputs #:allow-other-keys)
2925 (substitute* "build/build.xml"
2926 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2927 (string-append (assoc-ref inputs "java-testng")
2928 "/share/java/java-testng.jar"))
2929 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2930 (string-append (assoc-ref inputs "java-commons-lang")
2931 "/share/java/commons-lang-"
2932 ,(package-version java-commons-lang) ".jar"))
2933 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2934 (string-append (assoc-ref inputs "java-commons-io")
2935 "/share/java/commons-io-"
2936 ,(package-version java-commons-io)
2937 "-SNAPSHOT.jar"))
2938 ;; Remove dependency on svn
2939 (("<build-info.*") "")
2940 (("\\$\\{revision.number\\}")
2941 ,(number->string revision))
2942 (("\\$\\{version.number\\}") ,base-version))
2943 ;; Remove dependency on classycle
2944 (substitute* "../build_resources/ant/build-common.xml"
2945 (("<taskdef name=\"dependency-checker.*") "")
2946 (("classname=\"classycle.*") "")
2947 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2948 #t))
2949 ;; A few tests fail because of the lack of a proper /etc/groups and
2950 ;; /etc/passwd file in the build container.
2951 (add-after 'unpack 'disable-broken-tests
2952 (lambda _
2953 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2954 (("Unix.isOperational\\(\\)") "false"))
2955 #t))
2956 ;; These decorators are almost useless and pull in an unpackaged
2957 ;; dependency.
2958 (add-after 'unpack 'remove-useless-decorators
2959 (lambda _
2960 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2961 (("@Private") "")
2962 (("import ch.rinn.restrictions.Private;") ""))
2963 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2964 (("@Friend.*") "")
2965 (("import ch.rinn.restrictions.Friend;") ""))
2966 #t))
2967 (add-before 'configure 'build-native-code
2968 (lambda* (#:key inputs #:allow-other-keys)
2969 (let ((jdk (assoc-ref inputs "jdk"))
2970 (dir ,(match (%current-system)
2971 ("i686-linux"
2972 "i386-Linux")
2973 ((or "armhf-linux" "aarch64-linux")
2974 "arm-Linux")
2975 ((or "x86_64-linux")
2976 "amd64-Linux")
2977 (_ "unknown-Linux"))))
2978 (with-directory-excursion "source/c"
2979 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2980 (string-append "-I" jdk "/include")
2981 (string-append "-I" jdk "/include/linux")
2982 "-o" "libunix.so")
2983 (invoke "gcc" "-shared" "-O3" "-fPIC"
2984 "-DMACHINE_BYTE_ORDER=1"
2985 "copyCommon.c"
2986 "copyByteChar.c"
2987 "copyByteDouble.c"
2988 "copyByteFloat.c"
2989 "copyByteInt.c"
2990 "copyByteLong.c"
2991 "copyByteShort.c"
2992 (string-append "-I" jdk "/include")
2993 (string-append "-I" jdk "/include/linux")
2994 "-o" "libnativedata.so"))
2995 (install-file "source/c/libunix.so"
2996 (string-append "libs/native/unix/" dir))
2997 (install-file "source/c/libnativedata.so"
2998 (string-append "libs/native/nativedata/" dir))
2999 #t)))
3000 ;; In the "check" phase we only build the test executable.
3001 (add-after 'check 'run-tests
3002 (lambda _
3003 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3004 (delete-file "targets/dist/sis-base-test.jar")
3005 #t))
3006 (replace 'install (install-jars "targets/dist")))))
3007 (native-inputs
3008 `(("jdk" ,icedtea-8)
3009 ("java-commons-lang" ,java-commons-lang)
3010 ("java-commons-io" ,java-commons-io)
3011 ("java-testng" ,java-testng)
3012 ("build-resources"
3013 ,(origin
3014 (method svn-fetch)
3015 (uri (svn-reference
3016 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3017 "base/tags/release/"
3018 (version-major+minor base-version)
3019 ".x/" base-version
3020 "/build_resources/"))
3021 (revision revision)))
3022 (sha256
3023 (base32
3024 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3025 (home-page "http://svnsis.ethz.ch")
3026 (synopsis "Utility classes for libraries from ETH Zurich")
3027 (description "This library supplies some utility classes needed for
3028 libraries from the SIS division at ETH Zurich like jHDF5.")
3029 ;; The C sources are under a non-copyleft license, which looks like a
3030 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3031 (license (list license:asl2.0
3032 (license:non-copyleft "file://source/c/COPYING"))))))
3033
3034 (define-public java-cisd-args4j
3035 (let ((revision 39162)
3036 (base-version "9.11.2"))
3037 (package
3038 (name "java-cisd-args4j")
3039 (version (string-append base-version "-" (number->string revision)))
3040 (source (origin
3041 (method svn-fetch)
3042 (uri (svn-reference
3043 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3044 "args4j/tags/release/"
3045 (version-major+minor base-version)
3046 ".x/" base-version "/args4j/"))
3047 (revision revision)))
3048 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3049 (sha256
3050 (base32
3051 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3052 (build-system ant-build-system)
3053 (arguments
3054 `(#:make-flags '("-file" "build/build.xml")
3055 #:tests? #f ; there are no tests
3056 ;; There are weird build failures with JDK8, such as: "The type
3057 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3058 ;; referenced from required .class files"
3059 #:jdk ,icedtea-7
3060 #:modules ((guix build ant-build-system)
3061 (guix build utils)
3062 (guix build java-utils)
3063 (sxml simple)
3064 (sxml transform)
3065 (sxml xpath))
3066 #:phases
3067 (modify-phases %standard-phases
3068 (add-after 'unpack 'unpack-build-resources
3069 (lambda* (#:key inputs #:allow-other-keys)
3070 (mkdir-p "../build_resources")
3071 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3072 "-C" "../build_resources"
3073 "--strip-components=1")
3074 (mkdir-p "../build_resources/lib")
3075 #t))
3076 (add-after 'unpack-build-resources 'fix-dependencies
3077 (lambda* (#:key inputs #:allow-other-keys)
3078 ;; FIXME: There should be a more convenient abstraction for
3079 ;; editing XML files.
3080 (with-directory-excursion "../build_resources/ant/"
3081 (chmod "build-common.xml" #o664)
3082 (call-with-output-file "build-common.xml.new"
3083 (lambda (port)
3084 (sxml->xml
3085 (pre-post-order
3086 (with-input-from-file "build-common.xml"
3087 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3088 `(;; Remove dependency on classycle and custom ant tasks
3089 (taskdef . ,(lambda (tag . kids)
3090 (let ((name ((sxpath '(name *text*)) kids)))
3091 (if (or (member "build-info" name)
3092 (member "dependency-checker" name)
3093 (member "build-java-subprojects" name)
3094 (member "project-classpath" name))
3095 '() ; skip
3096 `(,tag ,@kids)))))
3097 (typedef . ,(lambda (tag . kids)
3098 (let ((name ((sxpath '(name *text*)) kids)))
3099 (if (member "recursive-jar" name)
3100 '() ; skip
3101 `(,tag ,@kids)))))
3102 (build-java-subprojects . ,(lambda _ '()))
3103 ;; Ignore everything else
3104 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3105 (*text* . ,(lambda (_ txt) txt))))
3106 port)))
3107 (rename-file "build-common.xml.new" "build-common.xml"))
3108 (substitute* "build/build.xml"
3109 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3110 (string-append (assoc-ref inputs "java-cisd-base")
3111 "/share/java/sis-base.jar"))
3112 ;; Remove dependency on svn
3113 (("<build-info.*") "")
3114 (("\\$\\{revision.number\\}")
3115 ,(number->string revision))
3116 (("\\$\\{version.number\\}") ,base-version)
3117 ;; Don't use custom ant tasks.
3118 (("recursive-jar") "jar")
3119 (("<project-classpath.*") ""))
3120 #t))
3121 (replace 'install (install-jars "targets/dist")))))
3122 (inputs
3123 `(("java-cisd-base" ,java-cisd-base)))
3124 (native-inputs
3125 `(("ecj" ,java-ecj-3.5)
3126 ("build-resources"
3127 ,(origin
3128 (method svn-fetch)
3129 (uri (svn-reference
3130 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3131 "args4j/tags/release/"
3132 (version-major+minor base-version)
3133 ".x/" base-version
3134 "/build_resources/"))
3135 (revision revision)))
3136 (sha256
3137 (base32
3138 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3139 (modules '((guix build utils)))
3140 ;; Delete bundled pre-built jars.
3141 (snippet
3142 '(begin (delete-file-recursively "lib/") #t))))))
3143 (home-page "http://svnsis.ethz.ch")
3144 (synopsis "Command line parser library")
3145 (description "This package provides a parser for command line arguments.")
3146 (license license:asl2.0))))
3147
3148 (define-public java-cisd-jhdf5
3149 (let ((revision 39162)
3150 (base-version "14.12.6"))
3151 (package
3152 (name "java-cisd-jhdf5")
3153 (version (string-append base-version "-" (number->string revision)))
3154 (source (origin
3155 (method svn-fetch)
3156 (uri (svn-reference
3157 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3158 "jhdf5/tags/release/"
3159 (version-major+minor base-version)
3160 ".x/" base-version "/jhdf5/"))
3161 (revision revision)))
3162 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3163 (sha256
3164 (base32
3165 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3166 (modules '((guix build utils)))
3167 (snippet
3168 '(begin
3169 ;; Delete included gradle jar
3170 (delete-file-recursively "gradle/wrapper")
3171 ;; Delete pre-built native libraries
3172 (delete-file-recursively "libs")
3173 #t))))
3174 (build-system ant-build-system)
3175 (arguments
3176 `(#:make-flags '("-file" "build/build.xml")
3177 #:build-target "jar-all"
3178 #:test-target "jar-test"
3179 #:jdk ,icedtea-8
3180 #:phases
3181 (modify-phases %standard-phases
3182 ;; FIXME: this build phase fails.
3183 (delete 'generate-jar-indices)
3184 ;; Don't erase results from the build phase when building tests.
3185 (add-after 'unpack 'separate-test-target-from-clean
3186 (lambda _
3187 (substitute* "build/build.xml"
3188 (("\"jar-test\" depends=\"clean, ")
3189 "\"jar-test\" depends=\""))
3190 #t))
3191 (add-after 'unpack 'unpack-build-resources
3192 (lambda* (#:key inputs #:allow-other-keys)
3193 (copy-recursively (assoc-ref inputs "build-resources")
3194 "../build_resources")
3195 (delete-file-recursively "../build_resources/lib/")
3196 (mkdir-p "../build_resources/lib")
3197 ;; Remove dependency on classycle
3198 (substitute* "../build_resources/ant/build-common.xml"
3199 (("<taskdef name=\"dependency-checker.*") "")
3200 (("classname=\"classycle.*") "")
3201 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3202 ;; Remove dependency on svn
3203 (substitute* "build/build.xml"
3204 (("<build-info.*") "")
3205 (("\\$\\{revision.number\\}")
3206 ,(number->string revision))
3207 (("\\$\\{version.number\\}") ,base-version))
3208 #t))
3209 (add-after 'unpack-build-resources 'fix-dependencies
3210 (lambda* (#:key inputs #:allow-other-keys)
3211 (substitute* "../build_resources/ant/build-common.xml"
3212 (("../libraries/testng/testng-jdk15.jar")
3213 (string-append (assoc-ref inputs "java-testng")
3214 "/share/java/java-testng.jar")))
3215 (substitute* "build/build.xml"
3216 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3217 (string-append (assoc-ref inputs "java-cisd-base")
3218 "/share/java/sis-base.jar"))
3219 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3220 (string-append (assoc-ref inputs "java-cisd-args4j")
3221 "/share/java/cisd-args4j.jar"))
3222 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3223 (string-append (assoc-ref inputs "java-commons-lang")
3224 "/share/java/commons-lang-"
3225 ,(package-version java-commons-lang) ".jar"))
3226 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3227 (string-append (assoc-ref inputs "java-commons-io")
3228 "/share/java/commons-io-"
3229 ,(package-version java-commons-io)
3230 "-SNAPSHOT.jar"))
3231 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3232 (string-append (assoc-ref inputs "java-testng")
3233 "/share/java/java-testng.jar"))
3234 (("\\$\\{lib\\}/junit4/junit.jar")
3235 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3236 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3237 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3238 "jar$"))))
3239 ;; Remove dependency on ch.rinn.restrictions
3240 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3241 (substitute* '("BitSetConversionUtils.java"
3242 "HDF5Utils.java")
3243 (("import ch.rinn.restrictions.Private;") "")
3244 (("@Private") "")))
3245 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3246 (substitute* '("BitSetConversionTest.java"
3247 "h5ar/HDF5ArchiverTest.java")
3248 (("import ch.rinn.restrictions.Friend;") "")
3249 (("@Friend.*") ""))
3250 ;; Remove leftovers from removing @Friend
3251 (substitute* "h5ar/HDF5ArchiverTest.java"
3252 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3253 "")))
3254 #t))
3255 (add-before 'configure 'build-native-library
3256 (lambda* (#:key inputs #:allow-other-keys)
3257 (let ((jdk (assoc-ref inputs "jdk"))
3258 (hdf5 (assoc-ref inputs "hdf5"))
3259 (dir ,(match (%current-system)
3260 ("i686-linux"
3261 "i386-Linux")
3262 ((or "armhf-linux" "aarch64-linux")
3263 "arm-Linux")
3264 ((or "x86_64-linux")
3265 "amd64-Linux")
3266 (_ "unknown-Linux"))))
3267 (with-directory-excursion "source/c"
3268 (apply invoke `("gcc" "-shared" "-O3"
3269 "-fPIC"
3270 "-Wl,--exclude-libs,ALL"
3271 ,@(find-files "jhdf5" "\\.c$")
3272 ,@(find-files "hdf-java" "\\.c$")
3273 ,(string-append "-I" hdf5 "/include")
3274 ,(string-append "-I" jdk "/include")
3275 ,(string-append "-I" jdk "/include/linux")
3276 ,(string-append hdf5 "/lib/libhdf5.a")
3277 "-o" "libjhdf5.so" "-lz")))
3278 (install-file "source/c/libjhdf5.so"
3279 (string-append "libs/native/jhdf5/" dir))
3280 #t)))
3281 ;; In the "check" phase we only build the test executable.
3282 (add-after 'check 'run-tests
3283 (lambda _
3284 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3285 (delete-file "targets/dist/sis-jhdf5-test.jar")
3286 #t))
3287 (replace 'install
3288 (install-jars "targets/dist")))))
3289 (inputs
3290 `(("java-cisd-base" ,java-cisd-base)
3291 ("java-cisd-args4j" ,java-cisd-args4j)
3292 ("java-commons-lang" ,java-commons-lang)
3293 ("java-commons-io" ,java-commons-io)
3294 ("hdf5" ,hdf5)
3295 ("zlib" ,zlib)))
3296 (native-inputs
3297 `(("jdk" ,icedtea-8)
3298 ("java-testng" ,java-testng)
3299 ("java-junit" ,java-junit)
3300 ("java-jmock" ,java-jmock)
3301 ("java-hamcrest-core" ,java-hamcrest-core)
3302 ("build-resources"
3303 ,(origin
3304 (method svn-fetch)
3305 (uri (svn-reference
3306 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3307 "jhdf5/tags/release/"
3308 (version-major+minor base-version)
3309 ".x/" base-version
3310 "/build_resources/"))
3311 (revision revision)))
3312 (sha256
3313 (base32
3314 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3315 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3316 (synopsis "Java binding for HDF5")
3317 (description "JHDF5 is a high-level API in Java for reading and writing
3318 HDF5 files, building on the libraries provided by the HDF Group.")
3319 ;; The C sources are under a non-copyleft license, which looks like a
3320 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3321 (license (list license:asl2.0
3322 (license:non-copyleft "file://source/c/COPYING"))))))
3323
3324 (define-public java-classpathx-servletapi
3325 (package
3326 (name "java-classpathx-servletapi")
3327 (version "3.0.1")
3328 (source (origin
3329 (method url-fetch)
3330 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3331 "servletapi-" version ".tar.gz"))
3332 (sha256
3333 (base32
3334 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3335 (build-system ant-build-system)
3336 (arguments
3337 `(#:tests? #f ; there is no test target
3338 #:build-target "compile"
3339 #:make-flags
3340 (list "-Dbuild.compiler=javac1.8"
3341 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3342 #:phases
3343 (modify-phases %standard-phases
3344 (replace 'install
3345 (lambda* (#:key make-flags #:allow-other-keys)
3346 (apply invoke `("ant" "dist" ,@make-flags)))))))
3347 (home-page "https://www.gnu.org/software/classpathx/")
3348 (synopsis "Java servlet API implementation")
3349 (description "This is the GNU servlet API distribution, part of the
3350 ClasspathX project. It provides implementations of version 3.0 of the servlet
3351 API and version 2.1 of the Java ServerPages API.")
3352 (license license:gpl3+)))
3353
3354 (define-public java-javaee-servletapi
3355 (package
3356 (name "java-javaee-servletapi")
3357 (version "3.1.0")
3358 (source (origin
3359 (method git-fetch)
3360 (uri (git-reference
3361 (url "https://github.com/javaee/servlet-spec")
3362 (commit version)))
3363 (file-name (git-file-name name version))
3364 (sha256
3365 (base32
3366 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3367 (build-system ant-build-system)
3368 (arguments
3369 `(#:jar-name "javax-servletapi.jar"
3370 ;; no tests
3371 #:tests? #f
3372 #:source-dir "src/main/java"
3373 #:phases
3374 (modify-phases %standard-phases
3375 (add-before 'build 'copy-resources
3376 (lambda _
3377 (mkdir-p "build/classes/javax/servlet/http")
3378 (let ((from-prefix "src/main/java/javax/servlet/")
3379 (to-prefix "build/classes/javax/servlet/"))
3380 (for-each (lambda (f)
3381 (copy-file (string-append from-prefix f)
3382 (string-append to-prefix f)))
3383 (list "LocalStrings_ja.properties"
3384 "LocalStrings.properties"
3385 "LocalStrings_fr.properties"
3386 "http/LocalStrings_es.properties"
3387 "http/LocalStrings_ja.properties"
3388 "http/LocalStrings.properties"
3389 "http/LocalStrings_fr.properties")))
3390 #t)))))
3391 (native-inputs
3392 `(("unzip" ,unzip)))
3393 (home-page "https://javaee.github.io/servlet-spec/")
3394 (synopsis "Java servlet API")
3395 (description "Java Servlet is the foundation web specification in the
3396 Java Enterprise Platform. Developers can build web applications using the
3397 Servlet API to interact with the request/response workflow. This project
3398 provides information on the continued development of the Java Servlet
3399 specification.")
3400 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3401 ;; Some files are licensed under ASL 2.0.
3402 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3403
3404 (define-public java-swt
3405 (package
3406 (name "java-swt")
3407 (version "4.7.1a")
3408 (source
3409 ;; The types of many variables and procedures differ in the sources
3410 ;; dependent on whether the target architecture is a 32-bit system or a
3411 ;; 64-bit system. Instead of patching the sources on demand in a build
3412 ;; phase we download either the 32-bit archive (which mostly uses "int"
3413 ;; types) or the 64-bit archive (which mostly uses "long" types).
3414 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3415 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3416 (file32 "x86")
3417 (file64 "x86_64"))
3418 (let-values (((hash file)
3419 (match (or (%current-target-system) (%current-system))
3420 ("x86_64-linux" (values hash64 file64))
3421 (_ (values hash32 file32)))))
3422 (origin
3423 (method url-fetch)
3424 (uri (string-append
3425 "http://download.eclipse.org/eclipse/downloads/drops4/"
3426 "R-" version "-201710090410/swt-" version
3427 "-gtk-linux-" file ".zip"))
3428 (sha256 (base32 hash))))))
3429 (build-system ant-build-system)
3430 (arguments
3431 `(#:jar-name "swt.jar"
3432 #:jdk ,icedtea-8
3433 #:tests? #f ; no "check" target
3434 #:phases
3435 (modify-phases %standard-phases
3436 (replace 'unpack
3437 (lambda* (#:key source #:allow-other-keys)
3438 (mkdir "swt")
3439 (invoke "unzip" source "-d" "swt")
3440 (chdir "swt")
3441 (mkdir "src")
3442 (invoke "unzip" "src.zip" "-d" "src")))
3443 ;; The classpath contains invalid icecat jars. Since we don't need
3444 ;; anything other than the JDK on the classpath, we can simply unset
3445 ;; it.
3446 (add-after 'configure 'unset-classpath
3447 (lambda _ (unsetenv "CLASSPATH") #t))
3448 (add-before 'build 'build-native
3449 (lambda* (#:key inputs outputs #:allow-other-keys)
3450 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3451 ;; Build shared libraries. Users of SWT have to set the system
3452 ;; property swt.library.path to the "lib" directory of this
3453 ;; package output.
3454 (mkdir-p lib)
3455 (setenv "OUTPUT_DIR" lib)
3456 (with-directory-excursion "src"
3457 (invoke "bash" "build.sh")))))
3458 (add-after 'install 'install-native
3459 (lambda* (#:key outputs #:allow-other-keys)
3460 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3461 (for-each (lambda (file)
3462 (install-file file lib))
3463 (find-files "." "\\.so$"))
3464 #t))))))
3465 (inputs
3466 `(("gtk" ,gtk+-2)
3467 ("libxtst" ,libxtst)
3468 ("libxt" ,libxt)
3469 ("mesa" ,mesa)
3470 ("glu" ,glu)))
3471 (native-inputs
3472 `(("pkg-config" ,pkg-config)
3473 ("unzip" ,unzip)))
3474 (home-page "https://www.eclipse.org/swt/")
3475 (synopsis "Widget toolkit for Java")
3476 (description
3477 "SWT is a widget toolkit for Java designed to provide efficient, portable
3478 access to the user-interface facilities of the operating systems on which it
3479 is implemented.")
3480 ;; SWT code is licensed under EPL1.0
3481 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3482 ;; Cairo bindings contain code under MPL1.1
3483 ;; XULRunner 1.9 bindings contain code under MPL2.0
3484 (license (list
3485 license:epl1.0
3486 license:mpl1.1
3487 license:mpl2.0
3488 license:lgpl2.1+))))
3489
3490 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3491 ;; of the latest release.
3492 (define-public java-qdox-1.12
3493 (package
3494 (name "java-qdox")
3495 (version "1.12.1")
3496 (source (origin
3497 (method url-fetch)
3498 (uri (string-append "https://repo1.maven.org/maven2/"
3499 "com/thoughtworks/qdox/qdox/" version
3500 "/qdox-" version "-sources.jar"))
3501 (sha256
3502 (base32
3503 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3504 (build-system ant-build-system)
3505 (arguments
3506 `(;; Tests require junit
3507 #:tests? #f
3508 #:jar-name "qdox.jar"
3509 #:phases
3510 (modify-phases %standard-phases
3511 (replace 'unpack
3512 (lambda* (#:key source #:allow-other-keys)
3513 (mkdir "src")
3514 (with-directory-excursion "src"
3515 (invoke "jar" "-xf" source))))
3516 ;; At this point we don't have junit, so we must remove the API
3517 ;; tests.
3518 (add-after 'unpack 'delete-tests
3519 (lambda _
3520 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3521 #t)))))
3522 (home-page "https://github.com/codehaus/qdox")
3523 (synopsis "Parse definitions from Java source files")
3524 (description
3525 "QDox is a high speed, small footprint parser for extracting
3526 class/interface/method definitions from source files complete with JavaDoc
3527 @code{@@tags}. It is designed to be used by active code generators or
3528 documentation tools.")
3529 (license license:asl2.0)))
3530
3531 (define-public java-qdox
3532 (package
3533 (name "java-qdox")
3534 ; Newer version exists, but this version is required by java-plexus-component-metadata
3535 (version "2.0-M2")
3536 (source (origin
3537 (method url-fetch)
3538 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3539 ;; Older releases at https://github.com/codehaus/qdox/
3540 ;; Note: The release at maven is pre-generated. The release at
3541 ;; github requires jflex.
3542 (uri (string-append "https://repo1.maven.org/maven2/"
3543 "com/thoughtworks/qdox/qdox/" version
3544 "/qdox-" version "-sources.jar"))
3545 (sha256
3546 (base32
3547 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3548 (build-system ant-build-system)
3549 (arguments
3550 `(#:jar-name "qdox.jar"
3551 #:tests? #f)); no tests
3552 (home-page "https://github.com/codehaus/qdox")
3553 (synopsis "Parse definitions from Java source files")
3554 (description "QDox is a high speed, small footprint parser for extracting
3555 class/interface/method definitions from source files complete with JavaDoc
3556 @code{@@tags}. It is designed to be used by active code generators or
3557 documentation tools.")
3558 (license license:asl2.0)))
3559
3560 (define-public java-jarjar
3561 (package
3562 (name "java-jarjar")
3563 (version "1.4")
3564 (source (origin
3565 (method url-fetch)
3566 (uri (string-append
3567 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3568 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3569 (sha256
3570 (base32
3571 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3572 (modules '((guix build utils)))
3573 (snippet
3574 '(begin
3575 ;; Delete bundled thirds-party jar archives.
3576 (delete-file-recursively "lib")
3577 (delete-file "src/test/enumtest.jar")
3578 ;; the CLASSPATH needs this directory, create an empty one
3579 (mkdir-p "lib")
3580 #t))))
3581 (build-system ant-build-system)
3582 (arguments
3583 `(;; Tests require junit, which ultimately depends on this package.
3584 #:tests? #f
3585 #:build-target "jar"
3586 #:phases
3587 (modify-phases %standard-phases
3588 (add-before 'build 'do-not-use-bundled-asm
3589 (lambda* (#:key inputs #:allow-other-keys)
3590 (substitute* "build.xml"
3591 (("<path id=\"path.build\">")
3592 (string-append "<path id=\"path.build\"><fileset dir=\""
3593 (assoc-ref inputs "java-asm-bootstrap")
3594 "/share/java\" includes=\"**/*.jar\"/>"))
3595 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3596 (("lib/asm-commons-4.0.jar")
3597 (string-append (assoc-ref inputs "java-asm-bootstrap")
3598 "/share/java/asm-6.0.jar"))
3599 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3600 (string-append "<include name=\"org/objectweb/asm/"
3601 "commons/Remap*.class\"/>"
3602 "<include name=\"org/objectweb/asm/*.class\"/>"
3603 "<include name=\"org/objectweb/asm/"
3604 "signature/*.class\"/>"
3605 "<include name=\"org/objectweb/asm/"
3606 "commons/SignatureRemapper.class\"/>")))
3607 #t))
3608 (add-before 'build 'remove-maven-dependency
3609 (lambda _
3610 ;; We do not need to build jarjar as a maven plugin just yet, so
3611 ;; remove this file. Maven requires jarjar (but not that plugin),
3612 ;; so removing it improves the bootstrap.
3613 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3614 #t))
3615 (replace 'install
3616 (lambda* (#:key outputs #:allow-other-keys)
3617 (let ((target (string-append (assoc-ref outputs "out")
3618 "/share/java")))
3619 (install-file (string-append "dist/jarjar-" ,version ".jar")
3620 target))
3621 #t)))))
3622 (inputs
3623 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3624 (native-inputs
3625 `(("unzip" ,unzip)))
3626 (home-page "https://code.google.com/archive/p/jarjar/")
3627 (synopsis "Repackage Java libraries")
3628 (description
3629 "Jar Jar Links is a utility that makes it easy to repackage Java
3630 libraries and embed them into your own distribution. Jar Jar Links includes
3631 an Ant task that extends the built-in @code{jar} task.")
3632 (license license:asl2.0)))
3633
3634 (define-public java-hamcrest-core
3635 (package
3636 (name "java-hamcrest-core")
3637 (version "1.3")
3638 (source (origin
3639 (method git-fetch)
3640 (uri (git-reference
3641 (url "https://github.com/hamcrest/JavaHamcrest/")
3642 (commit (string-append "hamcrest-java-" version))))
3643 (file-name (git-file-name name version))
3644 (sha256
3645 (base32
3646 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3647 (modules '((guix build utils)))
3648 (snippet
3649 '(begin
3650 ;; Delete bundled thirds-party jar archives.
3651 (delete-file-recursively "lib")
3652 #t))))
3653 (build-system ant-build-system)
3654 (arguments
3655 `(#:tests? #f ; Tests require junit
3656 #:modules ((guix build ant-build-system)
3657 (guix build java-utils)
3658 (guix build utils)
3659 (srfi srfi-1))
3660 #:make-flags (list (string-append "-Dversion=" ,version))
3661 #:test-target "unit-test"
3662 #:build-target "core"
3663 #:phases
3664 (modify-phases %standard-phases
3665 ;; Disable unit tests, because they require junit, which requires
3666 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3667 ;; attribute from the manifest for reproducibility.
3668 (add-before 'configure 'patch-build.xml
3669 (lambda _
3670 (substitute* "build.xml"
3671 (("unit-test, ") "")
3672 (("\\$\\{build.timestamp\\}") "guix"))
3673 #t))
3674 ;; Java's "getMethods()" returns methods in an unpredictable order.
3675 ;; To make the output of the generated code deterministic we must
3676 ;; sort the array of methods.
3677 (add-after 'unpack 'make-method-order-deterministic
3678 (lambda _
3679 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3680 (("import java\\.util\\.Iterator;" line)
3681 (string-append line "\n"
3682 "import java.util.Arrays; import java.util.Comparator;"))
3683 (("allMethods = cls\\.getMethods\\(\\);" line)
3684 (string-append "_" line
3685 "
3686 private Method[] getSortedMethods() {
3687 Arrays.sort(_allMethods, new Comparator<Method>() {
3688 @Override
3689 public int compare(Method a, Method b) {
3690 return a.toString().compareTo(b.toString());
3691 }
3692 });
3693 return _allMethods;
3694 }
3695
3696 private Method[] allMethods = getSortedMethods();")))
3697 #t))
3698 (add-before 'build 'do-not-use-bundled-qdox
3699 (lambda* (#:key inputs #:allow-other-keys)
3700 (substitute* "build.xml"
3701 (("lib/generator/qdox-1.12.jar")
3702 (string-append (assoc-ref inputs "java-qdox-1.12")
3703 "/share/java/qdox.jar")))
3704 #t))
3705 ;; build.xml searches for .jar files in this directoy, which
3706 ;; we remove from the source archive.
3707 (add-before 'build 'create-dummy-directories
3708 (lambda _
3709 (mkdir-p "lib/integration")
3710 #t))
3711 (add-before 'build 'create-pom
3712 (lambda _
3713 (substitute* "pom/hamcrest-core.pom"
3714 (("@VERSION@") ,version))
3715 #t))
3716 (replace 'install
3717 (install-from-pom "pom/hamcrest-core.pom")))))
3718 (native-inputs
3719 `(("java-qdox-1.12" ,java-qdox-1.12)
3720 ("java-jarjar" ,java-jarjar)))
3721 (propagated-inputs
3722 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3723 (home-page "http://hamcrest.org/")
3724 (synopsis "Library of matchers for building test expressions")
3725 (description
3726 "This package provides a library of matcher objects (also known as
3727 constraints or predicates) allowing @code{match} rules to be defined
3728 declaratively, to be used in other frameworks. Typical scenarios include
3729 testing frameworks, mocking libraries and UI validation rules.")
3730 (license license:bsd-2)))
3731
3732 (define java-hamcrest-parent-pom
3733 (package
3734 (inherit java-hamcrest-core)
3735 (name "java-hamcrest-parent-pom")
3736 (propagated-inputs '())
3737 (native-inputs '())
3738 (arguments
3739 `(#:tests? #f
3740 #:phases
3741 (modify-phases %standard-phases
3742 (delete 'configure)
3743 (replace 'build
3744 (lambda _
3745 (substitute* "pom/hamcrest-parent.pom"
3746 (("@VERSION@") ,(package-version java-hamcrest-core)))
3747 #t))
3748 (replace 'install
3749 (install-pom-file "pom/hamcrest-parent.pom")))))))
3750
3751 (define-public java-hamcrest-library
3752 (package
3753 (inherit java-hamcrest-core)
3754 (name "java-hamcrest-library")
3755 (arguments
3756 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3757 ((#:build-target _) "library")
3758 ((#:phases phases)
3759 `(modify-phases ,phases
3760 (replace 'create-pom
3761 (lambda _
3762 (substitute* "pom/hamcrest-library.pom"
3763 (("@VERSION@") ,(package-version java-hamcrest-core)))
3764 #t))
3765 (replace 'install
3766 (install-from-pom "pom/hamcrest-library.pom"))))))
3767 (propagated-inputs
3768 `(("java-hamcrest-core" ,java-hamcrest-core)
3769 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3770
3771 (define-public java-junit
3772 (package
3773 (name "java-junit")
3774 (version "4.12")
3775 (source (origin
3776 (method git-fetch)
3777 (uri (git-reference
3778 (url "https://github.com/junit-team/junit/")
3779 (commit (string-append "r" version))))
3780 (file-name (git-file-name name version))
3781 (sha256
3782 (base32
3783 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3784 (modules '((guix build utils)))
3785 (snippet
3786 '(begin
3787 ;; Delete bundled jar archives.
3788 (delete-file-recursively "lib")
3789 #t))))
3790 (build-system ant-build-system)
3791 (arguments
3792 `(#:jar-name "junit.jar"
3793 #:source-dir "src/main/java"
3794 #:test-dir "src/test"
3795 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3796 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3797 #:phases
3798 (modify-phases %standard-phases
3799 (add-before 'check 'copy-test-resources
3800 (lambda _
3801 (copy-recursively "src/test/resources" "build/test-classes")
3802 #t))
3803 (replace 'install
3804 (install-from-pom "pom.xml")))))
3805 (propagated-inputs
3806 `(("java-hamcrest-core" ,java-hamcrest-core)))
3807 (native-inputs
3808 `(("java-hamcrest-library" ,java-hamcrest-library)))
3809 (home-page "https://junit.org/junit4/")
3810 (synopsis "Test framework for Java")
3811 (description
3812 "JUnit is a simple framework to write repeatable tests for Java projects.
3813 JUnit provides assertions for testing expected results, test fixtures for
3814 sharing common test data, and test runners for running tests.")
3815 (license license:epl1.0)))
3816
3817 (define-public java-junitparams
3818 (package
3819 (name "java-junitparams")
3820 (version "1.1.1")
3821 (source (origin
3822 (method git-fetch)
3823 (uri (git-reference
3824 (url "https://github.com/Pragmatists/JUnitParams")
3825 (commit (string-append "JUnitParams-" version))))
3826 (file-name (git-file-name name version))
3827 (sha256
3828 (base32
3829 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3830 (build-system ant-build-system)
3831 (arguments
3832 `(#:jar-name "junitparams.jar"
3833 #:source-dir "src/main/java"
3834 #:test-dir "src/test"
3835 #:test-exclude (list "**/SuperclassTest.java")))
3836 (inputs
3837 `(("java-junit" ,java-junit)))
3838 (native-inputs
3839 `(("java-junit" ,java-junit)
3840 ("java-hamcrest-core" ,java-hamcrest-core)
3841 ("java-assertj" ,java-assertj)))
3842 (home-page "https://github.com/Pragmatists/JUnitParams")
3843 (synopsis "Parameterised test support for JUnit")
3844 (description "The JUnitParams project adds a new runner to JUnit and
3845 provides much easier and readable parametrised tests for JUnit.")
3846 (license license:asl2.0)))
3847
3848 (define-public java-plexus-utils
3849 (package
3850 (name "java-plexus-utils")
3851 ;; sisu-build-api needs this version, later versions don't work
3852 (version "3.2.1")
3853 (source (origin
3854 (method git-fetch)
3855 (uri (git-reference
3856 (url "https://github.com/codehaus-plexus/plexus-utils")
3857 (commit (string-append "plexus-utils-" version))))
3858 (file-name (git-file-name name version))
3859 (sha256
3860 (base32
3861 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
3862 (build-system ant-build-system)
3863 ;; FIXME: The default build.xml does not include a target to install
3864 ;; javadoc files.
3865 (arguments
3866 `(#:jar-name "plexus-utils.jar"
3867 #:source-dir "src/main"
3868 #:phases
3869 (modify-phases %standard-phases
3870 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3871 (lambda _
3872 (substitute* "src/main/java/org/codehaus/plexus/util/\
3873 cli/shell/BourneShell.java"
3874 (("/bin/sh") (which "sh"))
3875 (("/usr/") (getcwd)))
3876 #t))
3877 (add-after 'unpack 'fix-or-disable-broken-tests
3878 (lambda _
3879 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3880 (substitute* '("cli/CommandlineTest.java"
3881 "cli/shell/BourneShellTest.java")
3882 (("/bin/sh") (which "sh"))
3883 (("/bin/echo") (which "echo")))
3884
3885 ;; This test depends on MavenProjectStub, but we don't have
3886 ;; a package for Maven.
3887 (delete-file "introspection/ReflectionValueExtractorTest.java")
3888
3889 ;; FIXME: The command line tests fail, maybe because they use
3890 ;; absolute paths.
3891 (delete-file "cli/CommandlineTest.java")
3892
3893 ;; These tests require openjdk jmh, which is not packaged yet
3894 (for-each delete-file (find-files "." "PerfTest.java$")))
3895 #t))
3896 (add-before 'build 'copy-resources
3897 (lambda _
3898 (copy-recursively "src/main/resources" "build/classes")
3899 #t))
3900 (replace 'install (install-from-pom "pom.xml")))))
3901 (native-inputs
3902 `(("java-hamcrest-core" ,java-hamcrest-core)
3903 ("java-junit" ,java-junit)))
3904 (propagated-inputs
3905 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
3906 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3907 (synopsis "Common utilities for the Plexus framework")
3908 (description "This package provides various Java utility classes for the
3909 Plexus framework to ease working with strings, files, command lines, XML and
3910 more.")
3911 (license license:asl2.0)))
3912
3913 (define-public java-plexus-utils-3.3.0
3914 (package
3915 (inherit java-plexus-utils)
3916 (version "3.3.0")
3917 (source (origin
3918 (method git-fetch)
3919 (uri (git-reference
3920 (url "https://github.com/codehaus-plexus/plexus-utils")
3921 (commit (string-append "plexus-utils-" version))))
3922 (file-name (git-file-name "java-plexus-utils" version))
3923 (sha256
3924 (base32
3925 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
3926
3927 (define-public java-plexus-interpolation
3928 (package
3929 (name "java-plexus-interpolation")
3930 (version "1.26")
3931 (source (origin
3932 (method git-fetch)
3933 (uri (git-reference
3934 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3935 (commit (string-append "plexus-interpolation-" version))))
3936 (file-name (git-file-name name version))
3937 (sha256
3938 (base32
3939 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
3940 (build-system ant-build-system)
3941 (arguments
3942 `(#:jar-name "plexus-interpolation.jar"
3943 #:source-dir "src/main"
3944 #:phases
3945 (modify-phases %standard-phases
3946 (replace 'install (install-from-pom "pom.xml")))))
3947 (propagated-inputs
3948 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3949 (native-inputs
3950 `(("java-junit" ,java-junit)
3951 ("java-hamcrest-core" ,java-hamcrest-core)))
3952 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3953 (synopsis "Java components for interpolating ${} strings and the like")
3954 (description "Plexus interpolator is a modular, flexible interpolation
3955 framework for the expression language style commonly seen in Maven, Plexus,
3956 and other related projects.
3957
3958 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3959 package within @code{plexus-utils}, but has been separated in order to allow
3960 these two libraries to vary independently of one another.")
3961 (license license:asl2.0)))
3962
3963 (define-public java-plexus-classworlds
3964 (package
3965 (name "java-plexus-classworlds")
3966 (version "2.6.0")
3967 (source (origin
3968 (method git-fetch)
3969 (uri (git-reference
3970 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3971 (commit (string-append "plexus-classworlds-" version))))
3972 (file-name (git-file-name name version))
3973 (sha256
3974 (base32
3975 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
3976 (build-system ant-build-system)
3977 (arguments
3978 `(#:jar-name "plexus-classworlds.jar"
3979 #:source-dir "src/main"
3980 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
3981 #:phases
3982 (modify-phases %standard-phases
3983 (replace 'install (install-from-pom "pom.xml")))))
3984 (propagated-inputs
3985 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3986 (native-inputs
3987 `(("java-junit" ,java-junit)))
3988 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3989 (synopsis "Java class loader framework")
3990 (description "Plexus classworlds replaces the native @code{ClassLoader}
3991 mechanism of Java. It is especially useful for dynamic loading of application
3992 components.")
3993 (license license:asl2.0)))
3994
3995 (define java-plexus-container-default-bootstrap
3996 (package
3997 (name "java-plexus-container-default-bootstrap")
3998 (version "1.7.1")
3999 (source (origin
4000 (method git-fetch)
4001 (uri (git-reference
4002 (url "https://github.com/codehaus-plexus/plexus-containers")
4003 (commit (string-append "plexus-containers-" version))))
4004 (file-name (git-file-name name version))
4005 (sha256
4006 (base32
4007 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4008 (build-system ant-build-system)
4009 (arguments
4010 `(#:jar-name "container-default.jar"
4011 #:source-dir "plexus-container-default/src/main/java"
4012 #:test-dir "plexus-container-default/src/test"
4013 #:tests? #f; requires plexus-archiver, which depends on this package
4014 #:phases
4015 (modify-phases %standard-phases
4016 (add-before 'build 'fix-google-collections
4017 (lambda _
4018 ;; Google collections are now replaced with guava
4019 (substitute* "plexus-container-default/pom.xml"
4020 (("google-collections") "guava")
4021 (("com.google.collections") "com.google.guava"))
4022 #t))
4023 (add-before 'build 'copy-resources
4024 (lambda _
4025 (copy-recursively
4026 "plexus-container-default/src/main/resources/"
4027 "build/classes")
4028 #t))
4029 (replace 'install
4030 (install-from-pom "plexus-container-default/pom.xml")))))
4031 (propagated-inputs
4032 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4033 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4034 ("java-plexus-utils" ,java-plexus-utils)
4035 ("java-junit" ,java-junit)
4036 ("java-guava" ,java-guava)
4037 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4038 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4039 (synopsis "Inversion-of-control container")
4040 (description "Plexus-default-container is Plexus' inversion-of-control
4041 (@dfn{IoC}) container. It is composed of its public API and its default
4042 implementation.")
4043 (license license:asl2.0)))
4044
4045 (define java-plexus-containers-parent-pom
4046 (package
4047 (inherit java-plexus-container-default-bootstrap)
4048 (name "java-plexus-containers-parent-pom")
4049 (arguments
4050 `(#:tests? #f
4051 #:phases
4052 (modify-phases %standard-phases
4053 (delete 'configure)
4054 (delete 'build)
4055 (replace 'install
4056 (install-pom-file "pom.xml")))))
4057 (propagated-inputs
4058 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4059
4060 (define-public java-plexus-io
4061 (package
4062 (name "java-plexus-io")
4063 (version "3.2.0")
4064 (source (origin
4065 (method git-fetch)
4066 (uri (git-reference
4067 (url "https://github.com/codehaus-plexus/plexus-io")
4068 (commit (string-append "plexus-io-" version))))
4069 (file-name (git-file-name name version))
4070 (sha256
4071 (base32
4072 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4073 (build-system ant-build-system)
4074 (arguments
4075 `(#:jar-name "plexus-io.jar"
4076 #:source-dir "src/main/java"
4077 #:test-dir "src/test"
4078 #:phases
4079 (modify-phases %standard-phases
4080 (add-before 'build 'copy-resources
4081 (lambda _
4082 (mkdir-p "build/classes")
4083 (copy-recursively "src/main/resources" "build/classes")
4084 (mkdir-p "build/test-classes")
4085 (copy-recursively "src/test/resources" "build/test-classes")
4086 #t))
4087 (replace 'install (install-from-pom "pom.xml")))))
4088 (propagated-inputs
4089 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4090 ("java-commons-io" ,java-commons-io)
4091 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4092 (inputs
4093 `(("java-jsr305" ,java-jsr305)))
4094 (native-inputs
4095 `(("junit" ,java-junit)
4096 ("hamcrest" ,java-hamcrest-core)
4097 ("guava" ,java-guava)
4098 ("classworlds" ,java-plexus-classworlds)
4099 ("xbean" ,java-geronimo-xbean-reflect)
4100 ("container-default" ,java-plexus-container-default-bootstrap)))
4101 (home-page "https://github.com/codehaus-plexus/plexus-io")
4102 (synopsis "I/O plexus components")
4103 (description "Plexus IO is a set of plexus components, which are designed
4104 for use in I/O operations. This implementation using plexus components allows
4105 reusing it in maven.")
4106 (license license:asl2.0)))
4107
4108 (define-public java-plexus-archiver
4109 (package
4110 (name "java-plexus-archiver")
4111 (version "4.2.2")
4112 (source (origin
4113 (method url-fetch)
4114 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4115 "/archive/plexus-archiver-" version ".tar.gz"))
4116 (sha256
4117 (base32
4118 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4119 (build-system ant-build-system)
4120 (arguments
4121 `(#:jar-name "plexus-archiver.jar"
4122 #:source-dir "src/main/java"
4123 #:test-dir "src/test"
4124 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4125 #:phases
4126 (modify-phases %standard-phases
4127 (add-before 'check 'remove-failing
4128 (lambda _
4129 ;; Requires an older version of plexus container
4130 (delete-file
4131 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4132 #t))
4133 (add-before 'check 'fix-test-building
4134 (lambda _
4135 (substitute* "build.xml"
4136 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4137 #t))
4138 (add-before 'build 'copy-resources
4139 (lambda _
4140 (mkdir-p "build/classes")
4141 (copy-recursively "src/main/resources" "build/classes")
4142 (mkdir-p "build/test-classes")
4143 (copy-recursively "src/test/resources" "build/test-classes")
4144 #t))
4145 (replace 'install (install-from-pom "pom.xml")))))
4146 (propagated-inputs
4147 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4148 ("java-plexus-io" ,java-plexus-io)
4149 ("java-iq80-snappy" ,java-iq80-snappy)
4150 ("java-commons-compress" ,java-commons-compress)
4151 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4152 (inputs
4153 `(("java-jsr305" ,java-jsr305)
4154 ("java-plexus-container-default"
4155 ,java-plexus-container-default-bootstrap)))
4156 (native-inputs
4157 `(("java-hamcrest-core" ,java-hamcrest-core)
4158 ("junit" ,java-junit)
4159 ("classworld" ,java-plexus-classworlds)
4160 ("xbean" ,java-geronimo-xbean-reflect)
4161 ("xz" ,java-xz)
4162 ("guava" ,java-guava)))
4163 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4164 (synopsis "Archiver component of the Plexus project")
4165 (description "Plexus-archiver contains a component to deal with project
4166 archives (jar).")
4167 (license license:asl2.0)))
4168
4169 (define-public java-plexus-container-default
4170 (package
4171 (inherit java-plexus-container-default-bootstrap)
4172 (name "java-plexus-container-default")
4173 (arguments
4174 `(#:jar-name "container-default.jar"
4175 #:source-dir "plexus-container-default/src/main/java"
4176 #:test-dir "plexus-container-default/src/test"
4177 #:test-exclude (list ;"**/*Test.java"
4178 "**/Abstract*.java"
4179 ;; Requires plexus-hierarchy
4180 "**/PlexusHierarchyTest.java"
4181 ;; Failures
4182 "**/ComponentRealmCompositionTest.java"
4183 "**/PlexusContainerTest.java")
4184 #:jdk ,icedtea-8
4185 #:phases
4186 (modify-phases %standard-phases
4187 (add-before 'build 'copy-resources
4188 (lambda _
4189 (copy-recursively
4190 "plexus-container-default/src/main/resources/"
4191 "build/classes")
4192 #t))
4193 (add-before 'check 'fix-paths
4194 (lambda _
4195 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4196 (substitute*
4197 (string-append
4198 dir "/plexus/component/composition/"
4199 "ComponentRealmCompositionTest.java")
4200 (("src/test") "plexus-container-default/src/test"))
4201 #t))))))
4202 (inputs
4203 `(("worldclass" ,java-plexus-classworlds)
4204 ("xbean" ,java-geronimo-xbean-reflect)
4205 ("utils" ,java-plexus-utils)
4206 ("junit" ,java-junit)
4207 ("guava" ,java-guava)))
4208 (native-inputs
4209 `(("archiver" ,java-plexus-archiver)
4210 ("hamcrest" ,java-hamcrest-core)))))
4211
4212 (define-public java-plexus-component-annotations
4213 (package
4214 (inherit java-plexus-container-default)
4215 (name "java-plexus-component-annotations")
4216 (arguments
4217 `(#:jar-name "plexus-component-annotations.jar"
4218 #:source-dir "plexus-component-annotations/src/main/java"
4219 #:tests? #f)); no tests
4220 (inputs '())
4221 (native-inputs '())
4222 (synopsis "Plexus descriptors generator")
4223 (description "This package is a Maven plugin to generate Plexus descriptors
4224 from source tags and class annotations.")))
4225
4226 (define-public java-plexus-cipher
4227 (package
4228 (name "java-plexus-cipher")
4229 (version "1.7")
4230 (source (origin
4231 (method git-fetch)
4232 (uri (git-reference
4233 (url "https://github.com/codehaus-plexus/plexus-cipher")
4234 (commit (string-append "plexus-cipher-" version))))
4235 (file-name (git-file-name name version))
4236 (sha256
4237 (base32
4238 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4239 (build-system ant-build-system)
4240 (arguments
4241 `(#:jar-name "plexus-cipher.jar"
4242 #:source-dir "src/main/java"
4243 #:jdk ,icedtea-8
4244 #:tests? #f; FIXME: requires sisu-inject-bean
4245 #:phases
4246 (modify-phases %standard-phases
4247 (add-before 'build 'copy-resources
4248 (lambda _
4249 (copy-recursively "src/main/resources" "build/classes")
4250 (mkdir-p "build/classes/META-INF/sisu")
4251 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4252 (lambda _
4253 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4254 #t)))))
4255 (inputs
4256 `(("java-cdi-api" ,java-cdi-api)
4257 ("java-javax-inject" ,java-javax-inject)))
4258 (home-page "https://github.com/sonatype/plexus-cipher")
4259 (synopsis "Encryption/decryption Component")
4260 (description "Plexus-cipher contains a component to deal with encryption
4261 and decryption.")
4262 (license license:asl2.0)))
4263
4264 (define-public java-plexus-compiler-api
4265 (package
4266 (name "java-plexus-compiler-api")
4267 (version "2.8.4")
4268 (source (origin
4269 (method git-fetch)
4270 (uri (git-reference
4271 (url "https://github.com/codehaus-plexus/plexus-compiler")
4272 (commit (string-append "plexus-compiler-" version))))
4273 (file-name (git-file-name name version))
4274 (sha256
4275 (base32
4276 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4277 (build-system ant-build-system)
4278 (arguments
4279 `(#:jar-name "plexus-compiler-api.jar"
4280 #:source-dir "plexus-compiler-api/src/main/java"
4281 #:jdk ,icedtea-8
4282 #:test-dir "plexus-compiler-api/src/test"))
4283 (inputs
4284 `(("java-plexus-container-default" ,java-plexus-container-default)
4285 ("java-plexus-util" ,java-plexus-utils)))
4286 (native-inputs
4287 `(("java-junit" ,java-junit)))
4288 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4289 (synopsis "Plexus Compilers component's API to manipulate compilers")
4290 (description "This package contains the API used by components to manipulate
4291 compilers.")
4292 (license (list license:asl2.0
4293 license:expat))))
4294
4295 (define-public java-plexus-compiler-javac
4296 (package
4297 (inherit java-plexus-compiler-api)
4298 (name "java-plexus-compiler-javac")
4299 (arguments
4300 `(#:jar-name "plexus-compiler-javac.jar"
4301 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4302 #:jdk ,icedtea-8
4303 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4304 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
4305 (inputs
4306 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4307 ("java-plexus-utils" ,java-plexus-utils)
4308 ("java-plexus-container-default" ,java-plexus-container-default)))
4309 (native-inputs
4310 `(("java-junit" ,java-junit)))
4311 (synopsis "Javac Compiler support for Plexus Compiler component")
4312 (description "This package contains the Javac Compiler support for Plexus
4313 Compiler component.")))
4314
4315 (define-public java-plexus-sec-dispatcher
4316 (package
4317 (name "java-plexus-sec-dispatcher")
4318 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4319 (source (origin
4320 ;; This project doesn't tag releases or publish tarballs, so we take
4321 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4322 (method git-fetch)
4323 (uri (git-reference
4324 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4325 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4326 (sha256
4327 (base32
4328 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4329 (file-name (git-file-name name version))))
4330 (arguments
4331 `(#:jar-name "plexus-sec-dispatcher.jar"
4332 #:source-dir "src/main/java"
4333 #:jdk ,icedtea-8
4334 #:phases
4335 (modify-phases %standard-phases
4336 (add-before 'build 'generate-models
4337 (lambda* (#:key inputs #:allow-other-keys)
4338 (define (modello-single-mode file version mode)
4339 (invoke "java"
4340 "org.codehaus.modello.ModelloCli"
4341 file mode "src/main/java" version
4342 "false" "true"))
4343 (let ((file "src/main/mdo/settings-security.mdo"))
4344 (modello-single-mode file "1.0.0" "java")
4345 (modello-single-mode file "1.0.0" "xpp3-reader")
4346 (modello-single-mode file "1.0.0" "xpp3-writer"))
4347 #t))
4348 (add-before 'build 'generate-components.xml
4349 (lambda _
4350 (mkdir-p "build/classes/META-INF/plexus")
4351 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4352 (lambda _
4353 (display
4354 "<component-set>\n
4355 <components>\n
4356 <component>\n
4357 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4358 <role-hint>default</role-hint>\n
4359 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4360 <description></description>\n
4361 <requirements>\n
4362 <requirement>\n
4363 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4364 <field-name>_cipher</field-name>\n
4365 </requirement>\n
4366 <requirement>\n
4367 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4368 <field-name>_decryptors</field-name>\n
4369 </requirement>\n
4370 </requirements>\n
4371 <configuration>\n
4372 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4373 </configuration>\n
4374 </component>\n
4375 </components>\n
4376 </component-set>\n")))
4377 #t))
4378 (add-before 'check 'fix-paths
4379 (lambda _
4380 (copy-recursively "src/test/resources" "target")
4381 #t)))))
4382 (inputs
4383 `(("java-plexus-cipher" ,java-plexus-cipher)))
4384 (native-inputs
4385 `(("java-modello-core" ,java-modello-core)
4386 ;; for modello:
4387 ("java-plexus-container-default" ,java-plexus-container-default)
4388 ("java-plexus-classworlds" ,java-plexus-classworlds)
4389 ("java-plexus-utils" ,java-plexus-utils)
4390 ("java-guava" ,java-guava)
4391 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4392 ("java-sisu-build-api" ,java-sisu-build-api)
4393 ;; modello plugins:
4394 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4395 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4396 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4397 ;; for tests
4398 ("java-junit" ,java-junit)))
4399 (build-system ant-build-system)
4400 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4401 (synopsis "Plexus Security Dispatcher Component")
4402 (description "This package is the Plexus Security Dispatcher Component.
4403 This component decrypts a string passed to it.")
4404 (license license:asl2.0)))
4405
4406 (define-public java-plexus-cli
4407 (package
4408 (name "java-plexus-cli")
4409 (version "1.7")
4410 (source (origin
4411 (method git-fetch)
4412 (uri (git-reference
4413 (url "https://github.com/sonatype/plexus-cli")
4414 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4415 (file-name (string-append name "-" version))
4416 (sha256
4417 (base32
4418 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4419 (build-system ant-build-system)
4420 (arguments
4421 `(#:jar-name "plexus-cli.jar"
4422 #:source-dir "src/main/java"
4423 #:jdk ,icedtea-8
4424 #:test-dir "src/test"))
4425 (inputs
4426 `(("java-commons-cli" ,java-commons-cli)
4427 ("java-plexus-container-default" ,java-plexus-container-default)
4428 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4429 (native-inputs
4430 `(("java-plexus-utils" ,java-plexus-utils)
4431 ("java-junit" ,java-junit)
4432 ("java-guava" ,java-guava)))
4433 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4434 (synopsis "CLI building library for plexus")
4435 (description "This package is a library to help creating CLI around
4436 Plexus components.")
4437 (license license:asl2.0)))
4438
4439 (define-public java-sisu-build-api
4440 (package
4441 (name "java-sisu-build-api")
4442 (version "0.0.7")
4443 (source (origin
4444 (method git-fetch)
4445 (uri (git-reference
4446 (url "https://github.com/sonatype/sisu-build-api")
4447 (commit (string-append "plexus-build-api-" version))))
4448 (file-name (git-file-name name version))
4449 (sha256
4450 (base32
4451 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4452 (build-system ant-build-system)
4453 (arguments
4454 `(#:jar-name "sisu-build-api.jar"
4455 #:source-dir "src/main/java"
4456 #:jdk ,icedtea-8
4457 #:tests? #f; FIXME: how to run the tests?
4458 #:phases
4459 (modify-phases %standard-phases
4460 (add-before 'build 'copy-resources
4461 (lambda _
4462 (copy-recursively "src/main/resources" "build/classes")
4463 (substitute* (find-files "build/classes")
4464 (("\\$\\{project.version\\}") ,version))
4465 #t))
4466 (add-before 'build 'generate-plexus-compontent
4467 (lambda _
4468 (mkdir-p "build/classes/META-INF/plexus")
4469 ;; This file is required for plexus to inject this package.
4470 ;; FIXME: how is it generated?
4471 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4472 (lambda _
4473 (display
4474 "<component-set>\n
4475 <components>\n
4476 <component>\n
4477 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4478 <role-hint>default</role-hint>\n
4479 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4480 <description>Filesystem based non-incremental build context implementation\n
4481 which behaves as if all files were just created.</description>\n
4482 </component>\n
4483 </components>\n
4484 </component-set>\n")))
4485 #t)))))
4486 (inputs
4487 `(("java-plexus-utils" ,java-plexus-utils)
4488 ("java-plexus-container-default" ,java-plexus-container-default)))
4489 (home-page "https://github.com/sonatype/sisu-build-api/")
4490 (synopsis "Base build API for maven")
4491 (description "This package contains the base build API for maven and
4492 a default implementation of it. This API is about scanning files in a
4493 project and determining what files need to be rebuilt.")
4494 (license license:asl2.0)))
4495
4496 (define-public java-modello-core
4497 (package
4498 (name "java-modello-core")
4499 (version "1.9.1")
4500 (source (origin
4501 (method git-fetch)
4502 (uri (git-reference
4503 (url "https://github.com/codehaus-plexus/modello")
4504 (commit (string-append "modello-" version))))
4505 (file-name (git-file-name name version))
4506 (sha256
4507 (base32
4508 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4509 (build-system ant-build-system)
4510 (arguments
4511 `(#:jar-name "modello-core.jar"
4512 #:source-dir "modello-core/src/main/java"
4513 #:test-dir "modello-core/src/test"
4514 #:main-class "org.codehaus.modello.ModelloCli"
4515 #:jdk ,icedtea-8
4516 #:phases
4517 (modify-phases %standard-phases
4518 (add-before 'build 'copy-resources
4519 (lambda _
4520 (mkdir-p "build/classes/META-INF/plexus")
4521 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4522 "build/classes/META-INF/plexus/components.xml")
4523 #t))
4524 (add-before 'check 'fix-tests
4525 (lambda _
4526 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4527 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4528 "modello/core/io/ModelReaderTest.java")
4529 (("src/test") "modello-core/src/test")))
4530 #t)))))
4531 (inputs
4532 `(("java-plexus-utils" ,java-plexus-utils)
4533 ("java-plexus-container-default" ,java-plexus-container-default)
4534 ("java-sisu-build-api" ,java-sisu-build-api)))
4535 (native-inputs
4536 `(("java-junit" ,java-junit)
4537 ("java-plexus-classworlds" ,java-plexus-classworlds)
4538 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4539 ("java-guava" ,java-guava)))
4540 (home-page "https://codehaus-plexus.github.io/modello/")
4541 (synopsis "Framework for code generation from a simple model")
4542 (description "Modello is a framework for code generation from a simple model.
4543
4544 Modello generates code from a simple model format: based on a plugin
4545 architecture, various types of code and descriptors can be generated from the
4546 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4547 XSD and documentation.")
4548 (license (list
4549 license:expat
4550 ;; Although this package uses only files licensed under expat,
4551 ;; other parts of the source are licensed under different
4552 ;; licenses. We include them to be inherited by other packages.
4553 license:asl2.0
4554 ;; Some files in modello-plugin-java are licensed under a
4555 ;; 5-clause BSD license.
4556 (license:non-copyleft
4557 (string-append "file:///modello-plugins/modello-plugin-java/"
4558 "src/main/java/org/codehaus/modello/plugin/"
4559 "java/javasource/JNaming.java"))))))
4560
4561 (define-public java-modello-plugins-java
4562 (package
4563 (inherit java-modello-core)
4564 (name "java-modello-plugins-java")
4565 (arguments
4566 `(#:jar-name "modello-plugins-java.jar"
4567 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4568 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4569 #:jdk ,icedtea-8
4570 #:tests? #f; requires maven-model, which depends on this package
4571 #:phases
4572 (modify-phases %standard-phases
4573 (add-before 'build 'copy-resources
4574 (lambda _
4575 (mkdir-p "build/classes")
4576 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4577 "build/classes")
4578 #t)))))
4579 (inputs
4580 `(("java-modello-core" ,java-modello-core)
4581 ,@(package-inputs java-modello-core)))
4582 (synopsis "Modello Java Plugin")
4583 (description "Modello Java Plugin generates Java objects for the model.")))
4584
4585 (define-public java-modello-plugins-xml
4586 (package
4587 (inherit java-modello-core)
4588 (name "java-modello-plugins-xml")
4589 (arguments
4590 `(#:jar-name "modello-plugins-xml.jar"
4591 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4592 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4593 #:jdk ,icedtea-8
4594 #:phases
4595 (modify-phases %standard-phases
4596 (add-before 'build 'copy-resources
4597 (lambda _
4598 (mkdir-p "build/classes")
4599 (copy-recursively
4600 "modello-plugins/modello-plugin-xml/src/main/resources"
4601 "build/classes")
4602 #t))
4603 (add-before 'check 'fix-paths
4604 (lambda _
4605 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4606 (substitute*
4607 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4608 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4609 #t)))))
4610 (inputs
4611 `(("java-modello-core" ,java-modello-core)
4612 ("java-modello-plugins-java" ,java-modello-plugins-java)
4613 ,@(package-inputs java-modello-core)))
4614 (synopsis "Modello XML Plugin")
4615 (description "Modello XML Plugin contains shared code for every plugins
4616 working on XML representation of the model.")))
4617
4618 (define-public java-modello-test
4619 (package
4620 (inherit java-modello-core)
4621 (name "java-modello-test")
4622 (arguments
4623 `(#:jar-name "modello-test.jar"
4624 #:source-dir "modello-test/src/main/java"
4625 #:tests? #f; no tests
4626 #:jdk ,icedtea-8))
4627 (inputs
4628 `(("java-plexus-utils" ,java-plexus-utils)
4629 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4630 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4631 ("java-plexus-container-default" ,java-plexus-container-default)))
4632 (synopsis "Modello test package")
4633 (description "The modello test package contains the basis to create
4634 Modello generator unit-tests, including sample models and xml files to test
4635 every feature for every plugin.")))
4636
4637 (define-public java-modello-plugins-xpp3
4638 (package
4639 (inherit java-modello-core)
4640 (name "java-modello-plugins-xpp3")
4641 (arguments
4642 `(#:jar-name "modello-plugins-xpp3.jar"
4643 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4644 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4645 ;; One of the test dependencies is maven-model which depends on this package.
4646 #:tests? #f
4647 #:jdk ,icedtea-8
4648 #:phases
4649 (modify-phases %standard-phases
4650 (add-before 'build 'copy-resources
4651 (lambda _
4652 (mkdir-p "build/classes")
4653 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4654 "build/classes")
4655 #t)))))
4656 (inputs
4657 `(("java-modello-core" ,java-modello-core)
4658 ("java-modello-plugins-java" ,java-modello-plugins-java)
4659 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4660 ,@(package-inputs java-modello-core)))
4661 (native-inputs
4662 `(("java-xmlunit" ,java-xmlunit)
4663 ("java-modello-test" ,java-modello-test)
4664 ,@(package-native-inputs java-modello-core)))
4665 (synopsis "Modello XPP3 Plugin")
4666 (description "The modello XPP3 plugin generates XML readers and writers based
4667 on the XPP3 API (XML Pull Parser).")))
4668
4669 (define-public java-asm
4670 (package
4671 (name "java-asm")
4672 (version "6.0")
4673 (source (origin
4674 (method url-fetch)
4675 (uri (string-append "https://download.forge.ow2.org/asm/"
4676 "asm-" version ".tar.gz"))
4677 (sha256
4678 (base32
4679 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4680 (build-system ant-build-system)
4681 (arguments
4682 `(#:build-target "compile"
4683 ;; The tests require an old version of Janino, which no longer compiles
4684 ;; with the JDK7.
4685 #:tests? #f
4686 #:make-flags
4687 (list
4688 ;; We don't need these extra ant tasks, but the build system asks us to
4689 ;; provide a path anyway.
4690 "-Dobjectweb.ant.tasks.path=dummy-path"
4691 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4692 ;; used during the build automatically by ant-build-system, but
4693 ;; java-asm's build.xml fails unless we provide something here.
4694 "-Dbiz.aQute.bnd.path=dummy-path")
4695 #:phases
4696 (modify-phases %standard-phases
4697 (add-before 'build 'remove-bnd-dependency
4698 (lambda _
4699 ;; This file is the only one to require bnd, and is not needed
4700 ;; because we don't build a bundle.
4701 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
4702 #t))
4703 (add-before 'install 'build-jars
4704 (lambda* (#:key make-flags #:allow-other-keys)
4705 ;; We cannot use the "jar" target because it depends on a couple
4706 ;; of unpackaged, complicated tools.
4707 (mkdir "dist")
4708 (invoke "jar"
4709 "-cf" (string-append "dist/asm-" ,version ".jar")
4710 "-C" "output/build/tmp" ".")))
4711 (replace 'install
4712 (install-jars "dist")))))
4713 (native-inputs
4714 `(("java-junit" ,java-junit)))
4715 (home-page "https://asm.ow2.io/")
4716 (synopsis "Very small and fast Java bytecode manipulation framework")
4717 (description "ASM is an all purpose Java bytecode manipulation and
4718 analysis framework. It can be used to modify existing classes or dynamically
4719 generate classes, directly in binary form. The provided common
4720 transformations and analysis algorithms allow easily assembling custom
4721 complex transformations and code analysis tools.")
4722 (license license:bsd-3)))
4723
4724 (define java-asm-bootstrap
4725 (package
4726 (inherit java-asm)
4727 (name "java-asm-bootstrap")
4728 (arguments
4729 (substitute-keyword-arguments (package-arguments java-asm)
4730 ((#:tests? _) #f)))
4731 (native-inputs `())))
4732
4733 (define-public java-cglib
4734 (package
4735 (name "java-cglib")
4736 (version "3.2.4")
4737 (source
4738 (origin
4739 (method git-fetch)
4740 (uri (git-reference
4741 (url "https://github.com/cglib/cglib")
4742 (commit (string-append
4743 "RELEASE_"
4744 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4745 version)))))
4746 (file-name (git-file-name name version))
4747 (sha256
4748 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4749 (build-system ant-build-system)
4750 (arguments
4751 `(;; FIXME: tests fail because junit runs
4752 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4753 ;; to describe a test at all.
4754 #:tests? #f
4755 #:jar-name "cglib.jar"
4756 #:phases
4757 (modify-phases %standard-phases
4758 (add-after 'unpack 'chdir
4759 (lambda _ (chdir "cglib") #t)))))
4760 (inputs
4761 `(("java-asm" ,java-asm)
4762 ("java-junit" ,java-junit)))
4763 (home-page "https://github.com/cglib/cglib/")
4764 (synopsis "Java byte code generation library")
4765 (description "The byte code generation library CGLIB is a high level API
4766 to generate and transform Java byte code.")
4767 (license license:asl2.0)))
4768
4769 (define-public java-objenesis
4770 (package
4771 (name "java-objenesis")
4772 (version "2.5.1")
4773 (source (origin
4774 (method git-fetch)
4775 (uri (git-reference
4776 (url "https://github.com/easymock/objenesis")
4777 (commit version)))
4778 (file-name (git-file-name name version))
4779 (sha256
4780 (base32
4781 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
4782 (build-system ant-build-system)
4783 (arguments
4784 `(#:jar-name "objenesis.jar"
4785 #:source-dir "main/src/"
4786 #:test-dir "main/src/test/"))
4787 (native-inputs
4788 `(("java-junit" ,java-junit)
4789 ("java-hamcrest-core" ,java-hamcrest-core)))
4790 (home-page "http://objenesis.org/")
4791 (synopsis "Bypass the constructor when creating an object")
4792 (description "Objenesis is a small Java library that serves one purpose:
4793 to instantiate a new object of a particular class. It is common to see
4794 restrictions in libraries stating that classes must require a default
4795 constructor. Objenesis aims to overcome these restrictions by bypassing the
4796 constructor on object instantiation.")
4797 (license license:asl2.0)))
4798
4799 (define-public java-easymock
4800 (package
4801 (name "java-easymock")
4802 (version "3.4")
4803 (source (origin
4804 (method git-fetch)
4805 (uri (git-reference
4806 (url "https://github.com/easymock/easymock/")
4807 (commit (string-append "easymock-" version))))
4808 (file-name (git-file-name name version))
4809 (sha256
4810 (base32
4811 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
4812 (build-system ant-build-system)
4813 (arguments
4814 `(#:jar-name "easymock.jar"
4815 #:source-dir "core/src/main"
4816 #:test-dir "core/src/test"
4817 #:phases
4818 (modify-phases %standard-phases
4819 ;; FIXME: Android support requires the following packages to be
4820 ;; available: com.google.dexmaker.stock.ProxyBuilder
4821 (add-after 'unpack 'delete-android-support
4822 (lambda _
4823 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4824 (substitute* "MocksControl.java"
4825 (("AndroidSupport.isAndroid\\(\\)") "false")
4826 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4827 (delete-file "AndroidClassProxyFactory.java"))
4828 #t))
4829 (add-after 'unpack 'delete-broken-tests
4830 (lambda _
4831 (with-directory-excursion "core/src/test/java/org/easymock"
4832 ;; This test depends on dexmaker.
4833 (delete-file "tests2/ClassExtensionHelperTest.java")
4834
4835 ;; This is not a test.
4836 (delete-file "tests/BaseEasyMockRunnerTest.java")
4837
4838 ;; This test should be executed with a different runner...
4839 (delete-file "tests2/EasyMockAnnotationsTest.java")
4840 ;; ...but deleting it means that we also have to delete these
4841 ;; dependent files.
4842 (delete-file "tests2/EasyMockRunnerTest.java")
4843 (delete-file "tests2/EasyMockRuleTest.java")
4844
4845 ;; This test fails because the file "easymock.properties" does
4846 ;; not exist.
4847 (delete-file "tests2/EasyMockPropertiesTest.java"))
4848 #t)))))
4849 (inputs
4850 `(("java-asm" ,java-asm)
4851 ("java-cglib" ,java-cglib)
4852 ("java-objenesis" ,java-objenesis)))
4853 (native-inputs
4854 `(("java-junit" ,java-junit)
4855 ("java-hamcrest-core" ,java-hamcrest-core)))
4856 (home-page "https://easymock.org/")
4857 (synopsis "Java library providing mock objects for unit tests")
4858 (description "EasyMock is a Java library that provides an easy way to use
4859 mock objects in unit testing.")
4860 (license license:asl2.0)))
4861
4862 (define-public java-jmock-1
4863 (package
4864 (name "java-jmock")
4865 (version "1.2.0")
4866 (source (origin
4867 (method git-fetch)
4868 (uri (git-reference
4869 (url "https://github.com/jmock-developers/jmock-library")
4870 (commit version)))
4871 (file-name (git-file-name name version))
4872 (sha256
4873 (base32
4874 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
4875 (build-system ant-build-system)
4876 (arguments
4877 `(#:build-target "jars"
4878 #:test-target "run.tests"
4879 #:phases
4880 (modify-phases %standard-phases
4881 (replace 'install (install-jars "build")))))
4882 (home-page "http://jmock.org/")
4883 (synopsis "Mock object library for test-driven development")
4884 (description "JMock is a library that supports test-driven development of
4885 Java code with mock objects. Mock objects help you design and test the
4886 interactions between the objects in your programs.
4887
4888 The jMock library
4889
4890 @itemize
4891 @item makes it quick and easy to define mock objects
4892 @item lets you precisely specify the interactions between
4893 your objects, reducing the brittleness of your tests
4894 @item plugs into your favourite test framework
4895 @item is easy to extend.
4896 @end itemize\n")
4897 (license license:bsd-3)))
4898
4899 (define-public java-jmock
4900 (package
4901 (inherit java-jmock-1)
4902 (name "java-jmock")
4903 (version "2.8.2")
4904 (source (origin
4905 (method git-fetch)
4906 (uri (git-reference
4907 (url "https://github.com/jmock-developers/jmock-library")
4908 (commit version)))
4909 (file-name (git-file-name name version))
4910 (sha256
4911 (base32
4912 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
4913 (inputs
4914 `(("java-hamcrest-all" ,java-hamcrest-all)
4915 ("java-asm" ,java-asm)
4916 ("java-bsh" ,java-bsh)
4917 ("java-junit" ,java-junit)))
4918 (native-inputs
4919 `(("cglib" ,java-cglib)))
4920 (arguments
4921 `(#:jar-name "java-jmock.jar"
4922 #:source-dir "jmock/src/main/java"
4923 #:test-dir "jmock/src/test"))))
4924
4925 (define-public java-jmock-junit4
4926 (package
4927 (inherit java-jmock)
4928 (name "java-jmock-junit4")
4929 (arguments
4930 `(#:jar-name "java-jmock-junit4.jar"
4931 #:source-dir "jmock-junit4/src/main/java"
4932 #:test-dir "jmock-junit4/src/test"))
4933 (inputs
4934 `(("java-hamcrest-all" ,java-hamcrest-all)
4935 ("java-asm" ,java-asm)
4936 ("java-bsh" ,java-bsh)
4937 ("java-jmock" ,java-jmock)
4938 ("java-jumit" ,java-junit)))))
4939
4940 (define-public java-jmock-legacy
4941 (package
4942 (inherit java-jmock)
4943 (name "java-jmock-legacy")
4944 (arguments
4945 `(#:jar-name "java-jmock-legacy.jar"
4946 #:source-dir "jmock-legacy/src/main/java"
4947 #:test-dir "jmock-legacy/src/test"
4948 #:phases
4949 (modify-phases %standard-phases
4950 (add-before 'check 'copy-tests
4951 (lambda _
4952 ;; This file is a dependancy of some tests
4953 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4954 (copy-file (string-append "jmock/src/test/java/" file)
4955 (string-append "jmock-legacy/src/test/java/" file))
4956 #t))))))
4957 (inputs
4958 `(("java-hamcrest-all" ,java-hamcrest-all)
4959 ("java-objenesis" ,java-objenesis)
4960 ("java-cglib" ,java-cglib)
4961 ("java-jmock" ,java-jmock)
4962 ("java-asm" ,java-asm)
4963 ("java-bsh" ,java-bsh)
4964 ("java-junit" ,java-junit)))
4965 (native-inputs
4966 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4967
4968 (define-public java-hamcrest-all
4969 (package (inherit java-hamcrest-core)
4970 (name "java-hamcrest-all")
4971 (arguments
4972 `(#:jdk ,icedtea-8
4973 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4974 ((#:build-target _) "bigjar")
4975 ((#:phases phases)
4976 `(modify-phases ,phases
4977 ;; Some build targets override the classpath, so we need to patch
4978 ;; the build.xml to ensure that required dependencies are on the
4979 ;; classpath.
4980 (add-after 'unpack 'patch-classpath-for-integration
4981 (lambda* (#:key inputs #:allow-other-keys)
4982 (substitute* "build.xml"
4983 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4984 (string-join
4985 (cons line
4986 (append
4987 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4988 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4989 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4990 ";"))
4991 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4992 (car (find-files (assoc-ref inputs "java-hamcrest-core")
4993 "jar$"))))
4994 #t))
4995 (replace 'install
4996 (lambda* (#:key outputs #:allow-other-keys)
4997 (let* ((target (string-append (assoc-ref outputs "out")
4998 "/share/java/"))
4999 (version-suffix
5000 ,(string-append
5001 "-" (package-version java-hamcrest-core) ".jar"))
5002 (install-without-version-suffix
5003 (lambda (jar)
5004 (copy-file jar
5005 (string-append target
5006 (basename jar version-suffix)
5007 ".jar")))))
5008 (mkdir-p target)
5009 (for-each
5010 install-without-version-suffix
5011 (find-files "build"
5012 (lambda (name _)
5013 (and (string-suffix? ".jar" name)
5014 (not (string-suffix? "-sources.jar" name)))))))
5015 #t)))))))
5016 (inputs
5017 `(("java-junit" ,java-junit)
5018 ("java-jmock" ,java-jmock-1)
5019 ;; This is necessary because of what seems to be a race condition.
5020 ;; This package would sometimes fail to build because hamcrest-core.jar
5021 ;; could not be found, even though it is built as part of this package.
5022 ;; Adding java-hamcrest-core appears to fix this problem. See
5023 ;; https://debbugs.gnu.org/31390 for more information.
5024 ("java-hamcrest-core" ,java-hamcrest-core)
5025 ("java-easymock" ,java-easymock)
5026 ,@(package-inputs java-hamcrest-core)))))
5027
5028 (define-public java-jopt-simple
5029 (package
5030 (name "java-jopt-simple")
5031 (version "5.0.3")
5032 (source (origin
5033 (method url-fetch)
5034 (uri (string-append "http://repo1.maven.org/maven2/"
5035 "net/sf/jopt-simple/jopt-simple/"
5036 version "/jopt-simple-"
5037 version "-sources.jar"))
5038 (sha256
5039 (base32
5040 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5041 (build-system ant-build-system)
5042 (arguments
5043 `(#:tests? #f ; there are no tests
5044 #:jar-name "jopt-simple.jar"))
5045 (home-page "https://pholser.github.io/jopt-simple/")
5046 (synopsis "Java library for parsing command line options")
5047 (description "JOpt Simple is a Java library for parsing command line
5048 options, such as those you might pass to an invocation of @code{javac}. In
5049 the interest of striving for simplicity, as closely as possible JOpt Simple
5050 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5051 GNU @code{getopt_long}. It also aims to make option parser configuration and
5052 retrieval of options and their arguments simple and expressive, without being
5053 overly clever.")
5054 (license license:expat)))
5055
5056 (define-public java-commons-math3
5057 (package
5058 (name "java-commons-math3")
5059 (version "3.6.1")
5060 (source (origin
5061 (method url-fetch)
5062 (uri (string-append "mirror://apache/commons/math/source/"
5063 "commons-math3-" version "-src.tar.gz"))
5064 (sha256
5065 (base32
5066 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5067 (build-system ant-build-system)
5068 (arguments
5069 `(#:build-target "jar"
5070 #:test-target "test"
5071 #:make-flags
5072 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5073 (junit (assoc-ref %build-inputs "java-junit")))
5074 (list (string-append "-Djunit.jar="
5075 (car (find-files junit "jar$")))
5076 (string-append "-Dhamcrest.jar="
5077 (car (find-files hamcrest ".*.jar$")))))
5078 #:phases
5079 (modify-phases %standard-phases
5080 ;; We want to build the jar in the build phase and run the tests
5081 ;; later in a separate phase.
5082 (add-after 'unpack 'untangle-targets
5083 (lambda _
5084 (substitute* "build.xml"
5085 (("name=\"jar\" depends=\"test\"")
5086 "name=\"jar\" depends=\"compile\""))
5087 #t))
5088 ;; There is no install target.
5089 (replace 'install
5090 (install-jars "target")))))
5091 (native-inputs
5092 `(("java-junit" ,java-junit)
5093 ("java-hamcrest-core" ,java-hamcrest-core)))
5094 (home-page "https://commons.apache.org/math/")
5095 (synopsis "Apache Commons mathematics library")
5096 (description "Commons Math is a library of lightweight, self-contained
5097 mathematics and statistics components addressing the most common problems not
5098 available in the Java programming language or Commons Lang.")
5099 (license license:asl2.0)))
5100
5101 (define-public java-jmh
5102 (package
5103 (name "java-jmh")
5104 (version "1.17.5")
5105 (source (origin
5106 (method hg-fetch)
5107 (uri (hg-reference
5108 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5109 (changeset version)))
5110 (file-name (string-append name "-" version "-checkout"))
5111 (sha256
5112 (base32
5113 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5114 (build-system ant-build-system)
5115 (arguments
5116 `(#:jar-name "jmh-core.jar"
5117 #:source-dir "jmh-core/src/main"
5118 #:test-dir "jmh-core/src/test"
5119 #:phases
5120 (modify-phases %standard-phases
5121 ;; This seems to be a bug in the JDK. It may not be necessary in
5122 ;; future versions of the JDK.
5123 (add-after 'unpack 'fix-bug
5124 (lambda _
5125 (with-directory-excursion
5126 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5127 (substitute* '("IntegerValueConverter.java"
5128 "ThreadsValueConverter.java")
5129 (("public Class<Integer> valueType")
5130 "public Class<? extends Integer> valueType")))
5131 #t)))))
5132 (inputs
5133 `(("java-jopt-simple" ,java-jopt-simple)
5134 ("java-commons-math3" ,java-commons-math3)))
5135 (native-inputs
5136 `(("java-junit" ,java-junit)
5137 ("java-hamcrest-core" ,java-hamcrest-core)))
5138 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5139 (synopsis "Benchmark harness for the JVM")
5140 (description "JMH is a Java harness for building, running, and analysing
5141 nano/micro/milli/macro benchmarks written in Java and other languages
5142 targeting the JVM.")
5143 ;; GPLv2 only
5144 (license license:gpl2)))
5145
5146 (define-public java-commons-collections4
5147 (package
5148 (name "java-commons-collections4")
5149 (version "4.1")
5150 (source (origin
5151 (method url-fetch)
5152 (uri (string-append "mirror://apache/commons/collections/source/"
5153 "commons-collections4-" version "-src.tar.gz"))
5154 (sha256
5155 (base32
5156 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5157 (build-system ant-build-system)
5158 (arguments
5159 `(#:test-target "test"
5160 #:make-flags
5161 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5162 (junit (assoc-ref %build-inputs "java-junit"))
5163 (easymock (assoc-ref %build-inputs "java-easymock")))
5164 (list (string-append "-Djunit.jar="
5165 (car (find-files junit "jar$")))
5166 (string-append "-Dhamcrest.jar="
5167 (car (find-files hamcrest "jar$")))
5168 (string-append "-Deasymock.jar=" easymock
5169 "/share/java/easymock.jar")))
5170 #:phases
5171 (modify-phases %standard-phases
5172 (replace 'install
5173 (install-jars "target")))))
5174 (native-inputs
5175 `(("java-junit" ,java-junit)
5176 ("java-hamcrest-core" ,java-hamcrest-core)
5177 ("java-easymock" ,java-easymock)))
5178 (home-page "https://commons.apache.org/collections/")
5179 (synopsis "Collections framework")
5180 (description "The Java Collections Framework is the recognised standard
5181 for collection handling in Java. Commons-Collections seek to build upon the
5182 JDK classes by providing new interfaces, implementations and utilities. There
5183 are many features, including:
5184
5185 @itemize
5186 @item @code{Bag} interface for collections that have a number of copies of
5187 each object
5188 @item @code{BidiMap} interface for maps that can be looked up from value to
5189 key as well and key to value
5190 @item @code{MapIterator} interface to provide simple and quick iteration over
5191 maps
5192 @item Transforming decorators that alter each object as it is added to the
5193 collection
5194 @item Composite collections that make multiple collections look like one
5195 @item Ordered maps and sets that retain the order elements are added in,
5196 including an LRU based map
5197 @item Reference map that allows keys and/or values to be garbage collected
5198 under close control
5199 @item Many comparator implementations
5200 @item Many iterator implementations
5201 @item Adapter classes from array and enumerations to collections
5202 @item Utilities to test or create typical set-theory properties of collections
5203 such as union, intersection, and closure.
5204 @end itemize\n")
5205 (license license:asl2.0)))
5206
5207 (define-public java-commons-collections
5208 (package
5209 (inherit java-commons-collections4)
5210 (name "java-commons-collections")
5211 (version "3.2.2")
5212 (source (origin
5213 (method url-fetch)
5214 (uri (string-append "mirror://apache/commons/collections/source/"
5215 "commons-collections-" version "-src.tar.gz"))
5216 (sha256
5217 (base32
5218 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5219 (patches
5220 (search-patches "java-commons-collections-fix-java8.patch"))))
5221 (arguments
5222 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5223 ((#:phases phases)
5224 `(modify-phases ,phases
5225 ;; The manifest is required by the build procedure
5226 (add-before 'build 'add-manifest
5227 (lambda _
5228 (mkdir-p "build/conf")
5229 (call-with-output-file "build/conf/MANIFEST.MF"
5230 (lambda (file)
5231 (format file "Manifest-Version: 1.0\n")))
5232 #t))
5233 (replace 'install
5234 (install-jars "build"))))))))
5235
5236 (define java-commons-collections-test-classes
5237 (package
5238 (inherit java-commons-collections)
5239 (arguments
5240 `(#:jar-name "commons-collections-test-classes.jar"
5241 #:source-dir "src/test"
5242 #:tests? #f))
5243 (inputs
5244 `(("collection" ,java-commons-collections)))))
5245
5246 (define-public java-commons-beanutils
5247 (package
5248 (name "java-commons-beanutils")
5249 (version "1.9.3")
5250 (source (origin
5251 (method url-fetch)
5252 (uri (string-append "mirror://apache/commons/beanutils/source/"
5253 "commons-beanutils-" version "-src.tar.gz"))
5254 (sha256
5255 (base32
5256 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5257 (build-system ant-build-system)
5258 (arguments
5259 `(#:test-target "test"
5260 #:tests? #f
5261 #:phases
5262 (modify-phases %standard-phases
5263 (replace 'install
5264 (lambda* (#:key outputs #:allow-other-keys)
5265 (rename-file (string-append "dist/commons-beanutils-" ,version
5266 "-SNAPSHOT.jar")
5267 "commons-beanutils.jar")
5268 (install-file "commons-beanutils.jar"
5269 (string-append (assoc-ref outputs "out") "/share/java/"))
5270 #t)))))
5271 (inputs
5272 `(("logging" ,java-commons-logging-minimal)
5273 ("collections" ,java-commons-collections)))
5274 (native-inputs
5275 `(("junit" ,java-junit)
5276 ("collections-test" ,java-commons-collections-test-classes)))
5277 (home-page "https://commons.apache.org/beanutils/")
5278 (synopsis "Dynamically set or get properties in Java")
5279 (description "BeanUtils provides a simplified interface to reflection and
5280 introspection to set or get dynamically determined properties through their
5281 setter and getter method.")
5282 (license license:asl2.0)))
5283
5284 (define-public java-commons-io
5285 (package
5286 (name "java-commons-io")
5287 (version "2.5")
5288 (source
5289 (origin
5290 (method url-fetch)
5291 (uri (string-append "mirror://apache/commons/io/source/"
5292 "commons-io-" version "-src.tar.gz"))
5293 (sha256
5294 (base32
5295 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5296 (build-system ant-build-system)
5297 (outputs '("out" "doc"))
5298 (arguments
5299 `(#:test-target "test"
5300 #:make-flags
5301 (list (string-append "-Djunit.jar="
5302 (car (find-files (assoc-ref %build-inputs "java-junit")
5303 "jar$"))))
5304 #:phases
5305 (modify-phases %standard-phases
5306 (add-after 'build 'build-javadoc ant-build-javadoc)
5307 (replace 'install (install-from-pom "pom.xml"))
5308 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5309 (native-inputs
5310 `(("java-junit" ,java-junit)
5311 ("java-hamcrest-core" ,java-hamcrest-core)))
5312 (propagated-inputs
5313 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5314 (home-page "https://commons.apache.org/io/")
5315 (synopsis "Common useful IO related classes")
5316 (description "Commons-IO contains utility classes, stream implementations,
5317 file filters and endian classes.")
5318 (license license:asl2.0)))
5319
5320 (define-public java-commons-exec-1.1
5321 (package
5322 (name "java-commons-exec")
5323 (version "1.1")
5324 (source
5325 (origin
5326 (method url-fetch)
5327 (uri (string-append "mirror://apache/commons/exec/source/"
5328 "commons-exec-" version "-src.tar.gz"))
5329 (sha256
5330 (base32
5331 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5332 (build-system ant-build-system)
5333 (arguments
5334 `(#:test-target "test"
5335 #:make-flags
5336 (list (string-append "-Dmaven.junit.jar="
5337 (car (find-files (assoc-ref %build-inputs "java-junit")
5338 "jar$"))))
5339 #:phases
5340 (modify-phases %standard-phases
5341 (add-before 'build 'delete-network-tests
5342 (lambda _
5343 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5344 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5345 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5346 #t))
5347 ;; The "build" phase automatically tests.
5348 (delete 'check)
5349 (replace 'install (install-jars "target")))))
5350 (native-inputs
5351 `(("java-junit" ,java-junit)))
5352 (home-page "https://commons.apache.org/proper/commons-exec/")
5353 (synopsis "Common program execution related classes")
5354 (description "Commons-Exec simplifies executing external processes.")
5355 (license license:asl2.0)))
5356
5357 (define-public java-commons-exec
5358 (package
5359 (inherit java-commons-exec-1.1)
5360 (version "1.3")
5361 (source
5362 (origin
5363 (method url-fetch)
5364 (uri (string-append "mirror://apache/commons/exec/source/"
5365 "commons-exec-" version "-src.tar.gz"))
5366 (sha256
5367 (base32
5368 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5369 (arguments
5370 `(#:test-target "test"
5371 #:make-flags
5372 (list (string-append "-Dmaven.junit.jar="
5373 (car (find-files (assoc-ref %build-inputs "java-junit")
5374 "jar$")))
5375 "-Dmaven.compiler.source=1.7"
5376 "-Dmaven.compiler.target=1.7")
5377 #:phases
5378 (modify-phases %standard-phases
5379 (add-before 'build 'delete-network-tests
5380 (lambda* (#:key inputs #:allow-other-keys)
5381 ;; This test hangs indefinitely.
5382 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5383 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5384 (("ping -c 10 127.0.0.1") "sleep 10"))
5385 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5386 (("/bin/ls") "ls"))
5387 (call-with-output-file "src/test/scripts/ping.sh"
5388 (lambda (port)
5389 (format port "#!~a/bin/sh\nsleep $1\n"
5390 (assoc-ref inputs "bash"))))
5391 #t))
5392 ;; The "build" phase automatically tests.
5393 (delete 'check)
5394 (replace 'install (install-jars "target")))))
5395 (native-inputs
5396 `(("java-junit" ,java-junit)
5397 ("java-hamcrest-core" ,java-hamcrest-core)))))
5398
5399 (define-public java-commons-lang
5400 (package
5401 (name "java-commons-lang")
5402 (version "2.6")
5403 (source
5404 (origin
5405 (method url-fetch)
5406 (uri (string-append "mirror://apache/commons/lang/source/"
5407 "commons-lang-" version "-src.tar.gz"))
5408 (sha256
5409 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5410 (build-system ant-build-system)
5411 (outputs '("out" "doc"))
5412 (arguments
5413 `(#:test-target "test"
5414 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5415 #:phases
5416 (modify-phases %standard-phases
5417 (add-after 'build 'build-javadoc ant-build-javadoc)
5418 (add-before 'check 'disable-failing-test
5419 (lambda _
5420 ;; Disable a failing test
5421 (substitute* "src/test/java/org/apache/commons/lang/\
5422 time/FastDateFormatTest.java"
5423 (("public void testFormat\\(\\)")
5424 "public void disabled_testFormat()"))
5425 #t))
5426 (replace 'install (install-jars "target"))
5427 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5428 (native-inputs
5429 `(("java-junit" ,java-junit)))
5430 (home-page "https://commons.apache.org/lang/")
5431 (synopsis "Extension of the java.lang package")
5432 (description "The Commons Lang components contains a set of Java classes
5433 that provide helper methods for standard Java classes, especially those found
5434 in the @code{java.lang} package in the Sun JDK. The following classes are
5435 included:
5436
5437 @itemize
5438 @item StringUtils - Helper for @code{java.lang.String}.
5439 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5440 of characters such as @code{[a-z]} and @code{[abcdez]}.
5441 @item RandomStringUtils - Helper for creating randomised strings.
5442 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5443 @item NumberRange - A range of numbers with an upper and lower bound.
5444 @item ObjectUtils - Helper for @code{java.lang.Object}.
5445 @item SerializationUtils - Helper for serializing objects.
5446 @item SystemUtils - Utility class defining the Java system properties.
5447 @item NestedException package - A sub-package for the creation of nested
5448 exceptions.
5449 @item Enum package - A sub-package for the creation of enumerated types.
5450 @item Builder package - A sub-package for the creation of @code{equals},
5451 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5452 @end itemize\n")
5453 (license license:asl2.0)))
5454
5455 (define-public java-commons-lang3
5456 (package
5457 (name "java-commons-lang3")
5458 (version "3.9")
5459 (source
5460 (origin
5461 (method url-fetch)
5462 (uri (string-append "mirror://apache/commons/lang/source/"
5463 "commons-lang3-" version "-src.tar.gz"))
5464 (sha256
5465 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5466 (build-system ant-build-system)
5467 (arguments
5468 `(#:jar-name "commons-lang3.jar"
5469 #:source-dir "src/main/java"
5470 #:tests? #f; require junit5
5471 #:phases
5472 (modify-phases %standard-phases
5473 (replace 'install (install-from-pom "pom.xml")))))
5474 (propagated-inputs
5475 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5476 (home-page "https://commons.apache.org/lang/")
5477 (synopsis "Extension of the java.lang package")
5478 (description "The Commons Lang components contains a set of Java classes
5479 that provide helper methods for standard Java classes, especially those found
5480 in the @code{java.lang} package. The following classes are included:
5481
5482 @itemize
5483 @item StringUtils - Helper for @code{java.lang.String}.
5484 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5485 characters such as @code{[a-z]} and @code{[abcdez]}.
5486 @item RandomStringUtils - Helper for creating randomised strings.
5487 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5488 @item NumberRange - A range of numbers with an upper and lower bound.
5489 @item ObjectUtils - Helper for @code{java.lang.Object}.
5490 @item SerializationUtils - Helper for serializing objects.
5491 @item SystemUtils - Utility class defining the Java system properties.
5492 @item NestedException package - A sub-package for the creation of nested
5493 exceptions.
5494 @item Enum package - A sub-package for the creation of enumerated types.
5495 @item Builder package - A sub-package for the creation of @code{equals},
5496 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5497 @end itemize\n")
5498 (license license:asl2.0)))
5499
5500 (define-public java-commons-bsf
5501 (package
5502 (name "java-commons-bsf")
5503 (version "2.4.0")
5504 (source (origin
5505 (method url-fetch)
5506 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5507 version ".tar.gz"))
5508 (sha256
5509 (base32
5510 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5511 (modules '((guix build utils)))
5512 (snippet
5513 '(begin
5514 (for-each delete-file
5515 (find-files "." "\\.jar$"))
5516 #t))))
5517 (build-system ant-build-system)
5518 (arguments
5519 `(#:build-target "jar"
5520 #:tests? #f; No test file
5521 #:modules ((guix build ant-build-system)
5522 (guix build utils)
5523 (guix build java-utils)
5524 (sxml simple))
5525 #:phases
5526 (modify-phases %standard-phases
5527 (add-before 'build 'create-properties
5528 (lambda _
5529 ;; This file is missing from the distribution
5530 (call-with-output-file "build-properties.xml"
5531 (lambda (port)
5532 (sxml->xml
5533 `(project (@ (basedir ".") (name "build-properties") (default ""))
5534 (property (@ (name "project.name") (value "bsf")))
5535 (property (@ (name "source.level") (value "1.5")))
5536 (property (@ (name "build.lib") (value "build/jar")))
5537 (property (@ (name "src.dir") (value "src")))
5538 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5539 (property (@ (name "build.tests") (value "build/test-classes")))
5540 (property (@ (name "build.dest") (value "build/classes"))))
5541 port)))
5542 #t))
5543 (replace 'install (install-jars "build")))))
5544 (native-inputs
5545 `(("java-junit" ,java-junit)))
5546 (inputs
5547 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5548 (home-page "https://commons.apache.org/proper/commons-bsf")
5549 (synopsis "Bean Scripting Framework")
5550 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5551 which provides scripting language support within Java applications, and access
5552 to Java objects and methods from scripting languages. BSF allows one to write
5553 JSPs in languages other than Java while providing access to the Java class
5554 library. In addition, BSF permits any Java application to be implemented in
5555 part (or dynamically extended) by a language that is embedded within it. This
5556 is achieved by providing an API that permits calling scripting language engines
5557 from within Java, as well as an object registry that exposes Java objects to
5558 these scripting language engines.")
5559 (license license:asl2.0)))
5560
5561 (define-public java-commons-jxpath
5562 (package
5563 (name "java-commons-jxpath")
5564 (version "1.3")
5565 (source (origin
5566 (method url-fetch)
5567 (uri (string-append "mirror://apache/commons/jxpath/source/"
5568 "commons-jxpath-" version "-src.tar.gz"))
5569 (sha256
5570 (base32
5571 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5572 (build-system ant-build-system)
5573 (arguments
5574 `(#:jar-name "commons-jxpath.jar"
5575 ;; tests require more dependencies, including mockrunner which depends on old software
5576 #:tests? #f
5577 #:source-dir "src/java"))
5578 (inputs
5579 `(("servlet" ,java-classpathx-servletapi)
5580 ("java-jdom" ,java-jdom)
5581 ("java-commons-beanutils" ,java-commons-beanutils)))
5582 (native-inputs
5583 `(("java-junit" ,java-junit)))
5584 (home-page "https://commons.apache.org/jxpath/")
5585 (synopsis "Simple interpreter of an expression language called XPath.")
5586 (description "The org.apache.commons.jxpath package defines a simple
5587 interpreter of an expression language called XPath. JXPath applies XPath
5588 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5589 contexts, DOM etc, including mixtures thereof.")
5590 (license license:asl2.0)))
5591
5592 (define-public java-commons-pool
5593 (package
5594 (name "java-commons-pool")
5595 (version "2.6.2")
5596 (source (origin
5597 (method url-fetch)
5598 (uri (string-append "mirror://apache/commons/pool/source/"
5599 "commons-pool2-" version "-src.tar.gz"))
5600 (sha256
5601 (base32
5602 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5603 (arguments
5604 `(#:jar-name "common-pool.jar"
5605 #:source-dir "src/main/java"
5606 #:test-exclude
5607 (list "**/PerformanceTest.java")))
5608 (build-system ant-build-system)
5609 (inputs
5610 `(("java-cglib" ,java-cglib)))
5611 (native-inputs
5612 `(("java-junit" ,java-junit)
5613 ("java-hamcrest-core" ,java-hamcrest-core)
5614 ("java-asm" ,java-asm)
5615 ("java-objenesis" ,java-objenesis)))
5616 (home-page "https://commons.apache.org/proper/commons-pool/")
5617 (synopsis "Object-pooling API in Java")
5618 (description "The commons-pool package provides an object-pooling API
5619 and a number of object pool implementations. This package defines a
5620 handful of pooling interfaces and some base classes that may be useful when
5621 creating new pool implementations.")
5622 (license license:asl2.0)))
5623
5624 (define-public java-commons-dbcp
5625 (package
5626 (name "java-commons-dbcp")
5627 (version "2.6.0")
5628 (source (origin
5629 (method url-fetch)
5630 (uri (string-append "mirror://apache/commons/dbcp/source/"
5631 "commons-dbcp2-" version "-src.tar.gz"))
5632 (sha256
5633 (base32
5634 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5635 (arguments
5636 `(#:source-dir "src/main/java"
5637 #:jar-name "java-commons-dbcp.jar"
5638 #:tests? #f)); requires apache-geronimo
5639 (inputs
5640 `(("java-commons-pool" ,java-commons-pool)
5641 ("java-commons-logging" ,java-commons-logging-minimal)
5642 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5643 (native-inputs
5644 `(("java-junit" ,java-junit)))
5645 (build-system ant-build-system)
5646 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5647 (synopsis "Database Connection Pool for Java")
5648 (description "Commons-dbcp allows you to share a pool of database
5649 connections between users. Creating a new connection for each user can be
5650 time consuming and even unfeasible when the number of simultaneous users is
5651 very large. This package provides a way to share a poole of connections to
5652 reduce that load.")
5653 (license license:asl2.0)))
5654
5655 (define-public java-commons-jcs
5656 (package
5657 (name "java-commons-jcs")
5658 (version "2.2.1")
5659 (source (origin
5660 (method url-fetch)
5661 (uri (string-append "mirror://apache/commons/jcs/source/"
5662 "commons-jcs-dist-" version "-src.tar.gz"))
5663 (sha256
5664 (base32
5665 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5666 (build-system ant-build-system)
5667 (arguments
5668 `(#:jar-name "commons-jcs.jar"
5669 #:source-dir "commons-jcs-core/src/main/java"
5670 #:test-dir "commons-jcs-core/src/test"
5671 #:tests? #f; requires hsqldb
5672 #:phases
5673 (modify-phases %standard-phases
5674 (add-before 'build 'prepare
5675 (lambda _
5676 (with-directory-excursion
5677 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5678 (substitute*
5679 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5680 (("commons.dbcp") "commons.dbcp2")
5681 ((".*\\.setMaxActive.*") ""))
5682 ;;; Remove dependency on velocity-tools
5683 (delete-file "admin/servlet/JCSAdminServlet.java"))
5684 #t)))))
5685 (propagated-inputs
5686 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5687 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5688 ("java-commons-httpclient" ,java-commons-httpclient)
5689 ("java-commons-dbcp" ,java-commons-dbcp)))
5690 (native-inputs
5691 `(("java-junit" ,java-junit)))
5692 (home-page "https://commons.apache.org/proper/commons-jcs/")
5693 (synopsis "Distributed caching system in Java")
5694 (description "JCS is a distributed caching system written in Java. It
5695 is intended to speed up applications by providing a means to manage cached
5696 data of various dynamic natures. Like any caching system, JCS is most useful
5697 for high read, low put applications. Latency times drop sharply and
5698 bottlenecks move away from the database in an effectively cached system.")
5699 (license license:asl2.0)))
5700
5701 (define-public java-jsr250
5702 (package
5703 (name "java-jsr250")
5704 (version "1.3")
5705 (source (origin
5706 (method url-fetch)
5707 (uri (string-append "https://repo1.maven.org/maven2/"
5708 "javax/annotation/javax.annotation-api/"
5709 version "/javax.annotation-api-"
5710 version "-sources.jar"))
5711 (sha256
5712 (base32
5713 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5714 (build-system ant-build-system)
5715 (arguments
5716 `(#:tests? #f ; no tests included
5717 #:jdk ,icedtea-8
5718 #:jar-name "jsr250.jar"))
5719 (home-page "https://jcp.org/en/jsr/detail?id=250")
5720 (synopsis "Security-related annotations")
5721 (description "This package provides annotations for security. It provides
5722 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5723 namespaces.")
5724 ;; either cddl or gpl2 only, with classpath exception
5725 (license (list license:cddl1.0
5726 license:gpl2))))
5727
5728 (define-public java-jsr305
5729 (package
5730 (name "java-jsr305")
5731 (version "3.0.1")
5732 (source (origin
5733 (method url-fetch)
5734 (uri (string-append "https://repo1.maven.org/maven2/"
5735 "com/google/code/findbugs/"
5736 "jsr305/" version "/jsr305-"
5737 version "-sources.jar"))
5738 (sha256
5739 (base32
5740 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5741 (build-system ant-build-system)
5742 (arguments
5743 `(#:tests? #f ; no tests included
5744 #:jar-name "jsr305.jar"
5745 #:modules ((guix build ant-build-system)
5746 (guix build java-utils)
5747 (guix build maven pom)
5748 (guix build utils)
5749 (sxml simple))
5750 #:phases
5751 (modify-phases %standard-phases
5752 (add-before 'install 'create-pom
5753 (lambda _
5754 (with-output-to-file "pom.xml"
5755 (lambda _
5756 (sxml->xml
5757 `((project
5758 (modelVersion "4.0.0")
5759 (name "jsr305")
5760 (groupId "com.google.code.findbugs")
5761 (artifactId "jsr305")
5762 (version ,,version))))))
5763 #t))
5764 (replace 'install
5765 (install-from-pom "pom.xml")))))
5766 (home-page "http://findbugs.sourceforge.net/")
5767 (synopsis "Annotations for the static analyzer called findbugs")
5768 (description "This package provides annotations for the findbugs package.
5769 It provides packages in the @code{javax.annotations} namespace.")
5770 (license license:asl2.0)))
5771
5772 (define-public java-guava
5773 (package
5774 (name "java-guava")
5775 ;; This is the last release of Guava that can be built with Java 7.
5776 (version "20.0")
5777 (source (origin
5778 (method git-fetch)
5779 (uri (git-reference
5780 (url "https://github.com/google/guava/")
5781 (commit (string-append "v" version))))
5782 (sha256
5783 (base32
5784 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
5785 (build-system ant-build-system)
5786 (arguments
5787 `(#:tests? #f ; no tests included
5788 #:jar-name "guava.jar"
5789 #:source-dir "guava/src"
5790 #:phases
5791 (modify-phases %standard-phases
5792 (add-after 'unpack 'trim-sources
5793 (lambda _
5794 (with-directory-excursion "guava/src/com/google/common"
5795 ;; Remove annotations to avoid extra dependencies:
5796 ;; * "j2objc" annotations are used when converting Java to
5797 ;; Objective C;
5798 ;; * "errorprone" annotations catch common Java mistakes at
5799 ;; compile time;
5800 ;; * "IgnoreJRERequirement" is used for Android.
5801 (substitute* (find-files "." "\\.java$")
5802 (("import com.google.j2objc.*") "")
5803 (("import com.google.errorprone.annotation.*") "")
5804 (("import org.codehaus.mojo.animal_sniffer.*") "")
5805 (("@CanIgnoreReturnValue") "")
5806 (("@LazyInit") "")
5807 (("@WeakOuter") "")
5808 (("@RetainedWith") "")
5809 (("@Weak") "")
5810 (("@ForOverride") "")
5811 (("@J2ObjCIncompatible") "")
5812 (("@IgnoreJRERequirement") "")))
5813 #t))
5814 (replace 'install (install-from-pom "guava/pom.xml")))))
5815 (inputs
5816 `(("java-jsr305" ,java-jsr305)))
5817 (propagated-inputs
5818 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
5819 (home-page "https://github.com/google/guava")
5820 (synopsis "Google core libraries for Java")
5821 (description "Guava is a set of core libraries that includes new
5822 collection types (such as multimap and multiset), immutable collections, a
5823 graph library, functional types, an in-memory cache, and APIs/utilities for
5824 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5825 more!")
5826 (license license:asl2.0)))
5827
5828 (define java-guava-parent-pom
5829 (package
5830 (inherit java-guava)
5831 (name "java-guava-parent-pom")
5832 (arguments
5833 `(#:tests? #f
5834 #:phases
5835 (modify-phases %standard-phases
5836 (delete 'configure)
5837 (delete 'build)
5838 (replace 'install
5839 (install-pom-file "pom.xml")))))
5840 (propagated-inputs
5841 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
5842
5843 ;; The java-commons-logging package provides adapters to many different
5844 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5845 ;; it with only a minimal set of adapters.
5846 (define-public java-commons-logging-minimal
5847 (package
5848 (name "java-commons-logging-minimal")
5849 (version "1.2")
5850 (source (origin
5851 (method url-fetch)
5852 (uri (string-append "mirror://apache/commons/logging/source/"
5853 "commons-logging-" version "-src.tar.gz"))
5854 (sha256
5855 (base32
5856 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5857 (build-system ant-build-system)
5858 (arguments
5859 `(#:tests? #f ; avoid dependency on logging frameworks
5860 #:jar-name "commons-logging-minimal.jar"
5861 #:phases
5862 (modify-phases %standard-phases
5863 (add-after 'unpack 'delete-adapters-and-tests
5864 (lambda _
5865 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5866 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5867 ;; is used by applications; SimpleLog is the only actually usable
5868 ;; implementation that does not depend on another logging
5869 ;; framework.
5870 (for-each
5871 (lambda (file)
5872 (delete-file (string-append
5873 "src/main/java/org/apache/commons/logging/impl/" file)))
5874 (list "Jdk13LumberjackLogger.java"
5875 "WeakHashtable.java"
5876 "Log4JLogger.java"
5877 "ServletContextCleaner.java"
5878 "Jdk14Logger.java"
5879 "AvalonLogger.java"
5880 "LogKitLogger.java"))
5881 (delete-file-recursively "src/test")
5882 #t)))))
5883 (home-page "https://commons.apache.org/logging/")
5884 (synopsis "Common API for logging implementations")
5885 (description "The Logging package is a thin bridge between different
5886 logging implementations. A library that uses the commons-logging API can be
5887 used with any logging implementation at runtime.")
5888 (license license:asl2.0)))
5889
5890 ;; This is the last release of the 1.x series.
5891 (define-public java-mockito-1
5892 (package
5893 (name "java-mockito")
5894 (version "1.10.19")
5895 (source (origin
5896 (method url-fetch)
5897 (uri (string-append "http://repo1.maven.org/maven2/"
5898 "org/mockito/mockito-core/" version
5899 "/mockito-core-" version "-sources.jar"))
5900 (sha256
5901 (base32
5902 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5903 (build-system ant-build-system)
5904 (arguments
5905 `(#:jar-name "mockito.jar"
5906 #:tests? #f ; no tests included
5907 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5908 ;; patches in build phases.
5909 #:phases
5910 (modify-phases %standard-phases
5911 ;; Mockito was developed against a different version of hamcrest,
5912 ;; which does not require matcher implementations to provide an
5913 ;; implementation of the "describeMismatch" method. We add this
5914 ;; simple definition to pass the build with our version of hamcrest.
5915 (add-after 'unpack 'fix-hamcrest-build-error
5916 (lambda _
5917 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5918 (("public Matcher getActualMatcher\\(\\) .*" line)
5919 (string-append "
5920 public void describeMismatch(Object item, Description description) {
5921 actualMatcher.describeMismatch(item, description);
5922 }"
5923 line)))
5924 #t))
5925 ;; Mockito bundles cglib. We have a cglib package, so let's use
5926 ;; that instead.
5927 (add-after 'unpack 'use-system-libraries
5928 (lambda _
5929 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5930 (substitute* '("CGLIBHacker.java"
5931 "CglibMockMaker.java"
5932 "ClassImposterizer.java"
5933 "DelegatingMockitoMethodProxy.java"
5934 "MethodInterceptorFilter.java"
5935 "MockitoNamingPolicy.java"
5936 "SerializableMockitoMethodProxy.java"
5937 "SerializableNoOp.java")
5938 (("import org.mockito.cglib") "import net.sf.cglib")))
5939 #t)))))
5940 (inputs
5941 `(("java-junit" ,java-junit)
5942 ("java-objenesis" ,java-objenesis)
5943 ("java-cglib" ,java-cglib)
5944 ("java-hamcrest-core" ,java-hamcrest-core)))
5945 (home-page "http://mockito.org")
5946 (synopsis "Mockito is a mock library for Java")
5947 (description "Mockito is a mocking library for Java which lets you write
5948 tests with a clean and simple API. It generates mocks using reflection, and
5949 it records all mock invocations, including methods arguments.")
5950 (license license:asl2.0)))
5951
5952 (define-public java-httpcomponents-httpcore
5953 (package
5954 (name "java-httpcomponents-httpcore")
5955 (version "4.4.6")
5956 (source (origin
5957 (method url-fetch)
5958 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5959 "source/httpcomponents-core-"
5960 version "-src.tar.gz"))
5961 (sha256
5962 (base32
5963 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5964 (build-system ant-build-system)
5965 (arguments
5966 `(#:jar-name "httpcomponents-httpcore.jar"
5967 #:phases
5968 (modify-phases %standard-phases
5969 (add-after 'unpack 'chdir
5970 (lambda _ (chdir "httpcore") #t)))))
5971 (inputs
5972 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5973 ("java-commons-lang3" ,java-commons-lang3)))
5974 (native-inputs
5975 `(("java-junit" ,java-junit)
5976 ("java-mockito" ,java-mockito-1)))
5977 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5978 (synopsis "Low level HTTP transport components")
5979 (description "HttpCore is a set of low level HTTP transport components
5980 that can be used to build custom client and server side HTTP services with a
5981 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5982 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5983 NIO.
5984
5985 This package provides the blocking I/O model library.")
5986 (license license:asl2.0)))
5987
5988 (define-public java-httpcomponents-httpcore-nio
5989 (package (inherit java-httpcomponents-httpcore)
5990 (name "java-httpcomponents-httpcore-nio")
5991 (arguments
5992 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5993 #:phases
5994 (modify-phases %standard-phases
5995 (add-after 'unpack 'chdir
5996 (lambda _ (chdir "httpcore-nio") #t)))))
5997 (inputs
5998 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5999 ("java-hamcrest-core" ,java-hamcrest-core)
6000 ,@(package-inputs java-httpcomponents-httpcore)))
6001 (description "HttpCore is a set of low level HTTP transport components
6002 that can be used to build custom client and server side HTTP services with a
6003 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6004 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6005 NIO.
6006
6007 This package provides the non-blocking I/O model library based on Java
6008 NIO.")))
6009
6010 (define-public java-httpcomponents-httpcore-ab
6011 (package (inherit java-httpcomponents-httpcore)
6012 (name "java-httpcomponents-httpcore-ab")
6013 (arguments
6014 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6015 #:phases
6016 (modify-phases %standard-phases
6017 (add-after 'unpack 'chdir
6018 (lambda _ (chdir "httpcore-ab") #t)))))
6019 (inputs
6020 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6021 ("java-commons-cli" ,java-commons-cli)
6022 ("java-hamcrest-core" ,java-hamcrest-core)
6023 ,@(package-inputs java-httpcomponents-httpcore)))
6024 (synopsis "Apache HttpCore benchmarking tool")
6025 (description "This package provides the HttpCore benchmarking tool. It is
6026 an Apache AB clone based on HttpCore.")))
6027
6028 (define-public java-httpcomponents-httpclient
6029 (package
6030 (name "java-httpcomponents-httpclient")
6031 (version "4.5.3")
6032 (source (origin
6033 (method url-fetch)
6034 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6035 "source/httpcomponents-client-"
6036 version "-src.tar.gz"))
6037 (sha256
6038 (base32
6039 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
6040 (build-system ant-build-system)
6041 (arguments
6042 `(#:jar-name "httpcomponents-httpclient.jar"
6043 #:phases
6044 (modify-phases %standard-phases
6045 (add-after 'unpack 'chdir
6046 (lambda _ (chdir "httpclient") #t)))))
6047 (inputs
6048 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6049 ("java-commons-codec" ,java-commons-codec)
6050 ("java-hamcrest-core" ,java-hamcrest-core)
6051 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6052 ("java-mockito" ,java-mockito-1)
6053 ("java-junit" ,java-junit)))
6054 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6055 (synopsis "HTTP client library for Java")
6056 (description "Although the @code{java.net} package provides basic
6057 functionality for accessing resources via HTTP, it doesn't provide the full
6058 flexibility or functionality needed by many applications. @code{HttpClient}
6059 seeks to fill this void by providing an efficient, up-to-date, and
6060 feature-rich package implementing the client side of the most recent HTTP
6061 standards and recommendations.")
6062 (license license:asl2.0)))
6063
6064 (define-public java-httpcomponents-httpmime
6065 (package (inherit java-httpcomponents-httpclient)
6066 (name "java-httpcomponents-httpmime")
6067 (arguments
6068 `(#:jar-name "httpcomponents-httpmime.jar"
6069 #:phases
6070 (modify-phases %standard-phases
6071 (add-after 'unpack 'chdir
6072 (lambda _ (chdir "httpmime") #t)))))
6073 (inputs
6074 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6075 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6076 ("java-junit" ,java-junit)
6077 ("java-hamcrest-core" ,java-hamcrest-core)))))
6078
6079 (define-public java-commons-net
6080 (package
6081 (name "java-commons-net")
6082 (version "3.6")
6083 (source (origin
6084 (method url-fetch)
6085 (uri (string-append "mirror://apache/commons/net/source/"
6086 "commons-net-" version "-src.tar.gz"))
6087 (sha256
6088 (base32
6089 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6090 (build-system ant-build-system)
6091 (arguments
6092 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6093 ;; should be "resources/examples/examples.properties"), but gets "null"
6094 ;; instead.
6095 #:tests? #f
6096 #:jar-name "commons-net.jar"))
6097 (native-inputs
6098 `(("java-junit" ,java-junit)
6099 ("java-hamcrest-core" ,java-hamcrest-core)))
6100 (home-page "https://commons.apache.org/net/")
6101 (synopsis "Client library for many basic Internet protocols")
6102 (description "The Apache Commons Net library implements the client side of
6103 many basic Internet protocols. The purpose of the library is to provide
6104 fundamental protocol access, not higher-level abstractions.")
6105 (license license:asl2.0)))
6106
6107 (define-public java-jsch
6108 (package
6109 (name "java-jsch")
6110 (version "0.1.55")
6111 (source (origin
6112 (method url-fetch)
6113 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6114 version "/jsch-" version ".zip"))
6115 (sha256
6116 (base32
6117 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6118 (build-system ant-build-system)
6119 (arguments
6120 `(#:build-target "dist"
6121 #:tests? #f ; no tests included
6122 #:phases
6123 (modify-phases %standard-phases
6124 (replace 'install (install-jars "dist")))))
6125 (native-inputs
6126 `(("unzip" ,unzip)))
6127 (home-page "http://www.jcraft.com/jsch/")
6128 (synopsis "Pure Java implementation of SSH2")
6129 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6130 to connect to an SSH server and use port forwarding, X11 forwarding, file
6131 transfer, etc., and you can integrate its functionality into your own Java
6132 programs.")
6133 (license license:bsd-3)))
6134
6135 (define-public java-commons-compress
6136 (package
6137 (name "java-commons-compress")
6138 (version "1.13")
6139 (source (origin
6140 (method url-fetch)
6141 (uri (string-append "mirror://apache/commons/compress/source/"
6142 "commons-compress-" version "-src.tar.gz"))
6143 (sha256
6144 (base32
6145 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6146 (build-system ant-build-system)
6147 (arguments
6148 `(#:jar-name "commons-compress.jar"
6149 #:phases
6150 (modify-phases %standard-phases
6151 (add-after 'unpack 'delete-bad-tests
6152 (lambda _
6153 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6154 ;; FIXME: These tests really should not fail. Maybe they are
6155 ;; indicative of problems with our Java packaging work.
6156
6157 ;; This test fails with a null pointer exception.
6158 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6159 ;; This test fails to open test resources.
6160 (delete-file "archivers/zip/ExplodeSupportTest.java")
6161
6162 ;; FIXME: This test adds a dependency on powermock, which is hard to
6163 ;; package at this point.
6164 ;; https://github.com/powermock/powermock
6165 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6166 #t))
6167 (replace 'install (install-from-pom "pom.xml")))))
6168 (propagated-inputs
6169 `(("java-xz" ,java-xz)
6170 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6171 (native-inputs
6172 `(("java-junit" ,java-junit)
6173 ("java-mockito" ,java-mockito-1)))
6174 (home-page "https://commons.apache.org/proper/commons-compress/")
6175 (synopsis "Java library for working with compressed files")
6176 (description "The Apache Commons Compress library defines an API for
6177 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6178 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6179 (license license:asl2.0)))
6180
6181 (define-public java-commons-csv
6182 (package
6183 (name "java-commons-csv")
6184 (version "1.4")
6185 (source (origin
6186 (method url-fetch)
6187 (uri (string-append "mirror://apache/commons/csv/source/"
6188 "commons-csv-" version "-src.tar.gz"))
6189 (sha256
6190 (base32
6191 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6192 (build-system ant-build-system)
6193 (arguments
6194 `(#:jar-name "commons-csv.jar"
6195 #:source-dir "src/main/java"
6196 #:tests? #f)); FIXME: requires java-h2
6197 (inputs
6198 `(("java-hamcrest-core" ,java-hamcrest-core)
6199 ("java-commons-io" ,java-commons-io)
6200 ("java-commons-lang3" ,java-commons-lang3)
6201 ("junit" ,java-junit)))
6202 (home-page "https://commons.apache.org/proper/commons-csv/")
6203 (synopsis "Read and write CSV documents")
6204 (description "Commons CSV reads and writes files in variations of the Comma
6205 Separated Value (CSV) format. The most common CSV formats are predefined in the
6206 CSVFormat class:
6207
6208 @itemize
6209 @item Microsoft Excel
6210 @item Informix UNLOAD
6211 @item Informix UNLOAD CSV
6212 @item MySQL
6213 @item RFC 4180
6214 @item TDF
6215 @end itemize
6216
6217 Custom formats can be created using a fluent style API.")
6218 (license license:asl2.0)))
6219
6220 (define-public java-osgi-annotation
6221 (package
6222 (name "java-osgi-annotation")
6223 (version "6.0.0")
6224 (source (origin
6225 (method url-fetch)
6226 (uri (string-append "https://repo1.maven.org/maven2/"
6227 "org/osgi/org.osgi.annotation/" version "/"
6228 "org.osgi.annotation-" version "-sources.jar"))
6229 (sha256
6230 (base32
6231 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6232 (build-system ant-build-system)
6233 (arguments
6234 `(#:tests? #f ; no tests
6235 #:jar-name "osgi-annotation.jar"))
6236 (home-page "https://www.osgi.org")
6237 (synopsis "Annotation module of OSGi framework")
6238 (description
6239 "OSGi, for Open Services Gateway initiative framework, is a module system
6240 and service platform for the Java programming language. This package contains
6241 the OSGi annotation module, providing additional services to help dynamic
6242 components.")
6243 (license license:asl2.0)))
6244
6245 (define-public java-osgi-core
6246 (package
6247 (name "java-osgi-core")
6248 (version "6.0.0")
6249 (source (origin
6250 (method url-fetch)
6251 (uri (string-append "https://repo1.maven.org/maven2/"
6252 "org/osgi/org.osgi.core/" version "/"
6253 "org.osgi.core-" version "-sources.jar"))
6254 (sha256
6255 (base32
6256 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6257 (build-system ant-build-system)
6258 (arguments
6259 `(#:tests? #f ; no tests
6260 #:jar-name "osgi-core.jar"))
6261 (inputs
6262 `(("java-osgi-annotation" ,java-osgi-annotation)))
6263 (home-page "https://www.osgi.org")
6264 (synopsis "Core module of OSGi framework")
6265 (description
6266 "OSGi, for Open Services Gateway initiative framework, is a module system
6267 and service platform for the Java programming language. This package contains
6268 the OSGi Core module.")
6269 (license license:asl2.0)))
6270
6271 (define-public java-osgi-service-event
6272 (package
6273 (name "java-osgi-service-event")
6274 (version "1.3.1")
6275 (source (origin
6276 (method url-fetch)
6277 (uri (string-append "https://repo1.maven.org/maven2/"
6278 "org/osgi/org.osgi.service.event/"
6279 version "/org.osgi.service.event-"
6280 version "-sources.jar"))
6281 (sha256
6282 (base32
6283 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6284 (build-system ant-build-system)
6285 (arguments
6286 `(#:tests? #f ; no tests
6287 #:jar-name "osgi-service-event.jar"))
6288 (inputs
6289 `(("java-osgi-annotation" ,java-osgi-annotation)
6290 ("java-osgi-core" ,java-osgi-core)))
6291 (home-page "https://www.osgi.org")
6292 (synopsis "OSGi service event module")
6293 (description
6294 "OSGi, for Open Services Gateway initiative framework, is a module system
6295 and service platform for the Java programming language. This package contains
6296 the OSGi @code{org.osgi.service.event} module.")
6297 (license license:asl2.0)))
6298
6299 (define-public java-eclipse-osgi
6300 (package
6301 (name "java-eclipse-osgi")
6302 (version "3.11.3")
6303 (source (origin
6304 (method url-fetch)
6305 (uri (string-append "https://repo1.maven.org/maven2/"
6306 "org/eclipse/platform/org.eclipse.osgi/"
6307 version "/org.eclipse.osgi-"
6308 version "-sources.jar"))
6309 (sha256
6310 (base32
6311 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6312 (build-system ant-build-system)
6313 (arguments
6314 `(#:tests? #f ; no tests included
6315 #:jar-name "eclipse-equinox-osgi.jar"))
6316 (inputs
6317 `(("java-osgi-annotation" ,java-osgi-annotation)))
6318 (home-page "http://www.eclipse.org/equinox/")
6319 (synopsis "Eclipse Equinox OSGi framework")
6320 (description "This package provides an implementation of the OSGi Core
6321 specification.")
6322 (license license:epl1.0)))
6323
6324 (define-public java-eclipse-equinox-common
6325 (package
6326 (name "java-eclipse-equinox-common")
6327 (version "3.10.200")
6328 (source (origin
6329 (method url-fetch)
6330 (uri (string-append "https://repo1.maven.org/maven2/"
6331 "org/eclipse/platform/org.eclipse.equinox.common/"
6332 version "/org.eclipse.equinox.common-"
6333 version "-sources.jar"))
6334 (sha256
6335 (base32
6336 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6337 (build-system ant-build-system)
6338 (arguments
6339 `(#:tests? #f ; no tests included
6340 #:jar-name "eclipse-equinox-common.jar"))
6341 (inputs
6342 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6343 (home-page "http://www.eclipse.org/equinox/")
6344 (synopsis "Common Eclipse runtime")
6345 (description "This package provides the common Eclipse runtime.")
6346 (license license:epl1.0)))
6347
6348 (define-public java-eclipse-core-jobs
6349 (package
6350 (name "java-eclipse-core-jobs")
6351 (version "3.8.0")
6352 (source (origin
6353 (method url-fetch)
6354 (uri (string-append "https://repo1.maven.org/maven2/"
6355 "org/eclipse/platform/org.eclipse.core.jobs/"
6356 version "/org.eclipse.core.jobs-"
6357 version "-sources.jar"))
6358 (sha256
6359 (base32
6360 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6361 (build-system ant-build-system)
6362 (arguments
6363 `(#:tests? #f ; no tests included
6364 #:jar-name "eclipse-core-jobs.jar"))
6365 (inputs
6366 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6367 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6368 (home-page "http://www.eclipse.org/equinox/")
6369 (synopsis "Eclipse jobs mechanism")
6370 (description "This package provides the Eclipse jobs mechanism.")
6371 (license license:epl1.0)))
6372
6373 (define-public java-eclipse-equinox-registry
6374 (package
6375 (name "java-eclipse-equinox-registry")
6376 (version "3.6.100")
6377 (source (origin
6378 (method url-fetch)
6379 (uri (string-append "https://repo1.maven.org/maven2/"
6380 "org/eclipse/platform/org.eclipse.equinox.registry/"
6381 version "/org.eclipse.equinox.registry-"
6382 version "-sources.jar"))
6383 (sha256
6384 (base32
6385 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6386 (build-system ant-build-system)
6387 (arguments
6388 `(#:tests? #f ; no tests included
6389 #:jar-name "eclipse-equinox-registry.jar"))
6390 (inputs
6391 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6392 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6393 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6394 (home-page "http://www.eclipse.org/equinox/")
6395 (synopsis "Eclipse extension registry support")
6396 (description "This package provides support for the Eclipse extension
6397 registry.")
6398 (license license:epl1.0)))
6399
6400 (define-public java-eclipse-equinox-app
6401 (package
6402 (name "java-eclipse-equinox-app")
6403 (version "1.3.400")
6404 (source (origin
6405 (method url-fetch)
6406 (uri (string-append "https://repo1.maven.org/maven2/"
6407 "org/eclipse/platform/org.eclipse.equinox.app/"
6408 version "/org.eclipse.equinox.app-"
6409 version "-sources.jar"))
6410 (sha256
6411 (base32
6412 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6413 (build-system ant-build-system)
6414 (arguments
6415 `(#:tests? #f ; no tests included
6416 #:jar-name "eclipse-equinox-app.jar"))
6417 (inputs
6418 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6419 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6420 ("java-eclipse-osgi" ,java-eclipse-osgi)
6421 ("java-osgi-service-event" ,java-osgi-service-event)))
6422 (home-page "http://www.eclipse.org/equinox/")
6423 (synopsis "Equinox application container")
6424 (description "This package provides the Equinox application container for
6425 Eclipse.")
6426 (license license:epl1.0)))
6427
6428 (define-public java-eclipse-equinox-preferences
6429 (package
6430 (name "java-eclipse-equinox-preferences")
6431 (version "3.6.1")
6432 (source (origin
6433 (method url-fetch)
6434 (uri (string-append "https://repo1.maven.org/maven2/"
6435 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6436 version "/org.eclipse.equinox.preferences-"
6437 version "-sources.jar"))
6438 (sha256
6439 (base32
6440 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6441 (build-system ant-build-system)
6442 (arguments
6443 `(#:tests? #f ; no tests included
6444 #:jar-name "eclipse-equinox-preferences.jar"))
6445 (inputs
6446 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6447 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6448 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6449 (home-page "http://www.eclipse.org/equinox/")
6450 (synopsis "Eclipse preferences mechanism")
6451 (description "This package provides the Eclipse preferences mechanism with
6452 the module @code{org.eclipse.equinox.preferences}.")
6453 (license license:epl1.0)))
6454
6455 (define-public java-eclipse-core-contenttype
6456 (package
6457 (name "java-eclipse-core-contenttype")
6458 (version "3.5.100")
6459 (source (origin
6460 (method url-fetch)
6461 (uri (string-append "https://repo1.maven.org/maven2/"
6462 "org/eclipse/platform/org.eclipse.core.contenttype/"
6463 version "/org.eclipse.core.contenttype-"
6464 version "-sources.jar"))
6465 (sha256
6466 (base32
6467 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6468 (build-system ant-build-system)
6469 (arguments
6470 `(#:tests? #f ; no tests included
6471 #:jar-name "eclipse-core-contenttype.jar"))
6472 (inputs
6473 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6474 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6475 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6476 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6477 (home-page "http://www.eclipse.org/")
6478 (synopsis "Eclipse content mechanism")
6479 (description "This package provides the Eclipse content mechanism in the
6480 @code{org.eclipse.core.contenttype} module.")
6481 (license license:epl1.0)))
6482
6483 (define-public java-eclipse-core-runtime
6484 (package
6485 (name "java-eclipse-core-runtime")
6486 (version "3.15.100")
6487 (source (origin
6488 (method url-fetch)
6489 (uri (string-append "https://repo1.maven.org/maven2/"
6490 "org/eclipse/platform/org.eclipse.core.runtime/"
6491 version "/org.eclipse.core.runtime-"
6492 version "-sources.jar"))
6493 (sha256
6494 (base32
6495 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6496 (build-system ant-build-system)
6497 (arguments
6498 `(#:tests? #f ; no tests included
6499 #:jar-name "eclipse-core-runtime.jar"))
6500 (inputs
6501 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6502 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6503 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6504 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6505 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6506 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6507 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6508 (home-page "https://www.eclipse.org/")
6509 (synopsis "Eclipse core runtime")
6510 (description "This package provides the Eclipse core runtime with the
6511 module @code{org.eclipse.core.runtime}.")
6512 (license license:epl1.0)))
6513
6514 (define-public java-eclipse-core-filesystem
6515 (package
6516 (name "java-eclipse-core-filesystem")
6517 (version "1.6.1")
6518 (source (origin
6519 (method url-fetch)
6520 (uri (string-append "https://repo1.maven.org/maven2/"
6521 "org/eclipse/platform/org.eclipse.core.filesystem/"
6522 version "/org.eclipse.core.filesystem-"
6523 version "-sources.jar"))
6524 (sha256
6525 (base32
6526 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6527 (build-system ant-build-system)
6528 (arguments
6529 `(#:tests? #f ; no tests included
6530 #:jar-name "eclipse-core-filesystem.jar"))
6531 (inputs
6532 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6533 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6534 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6535 (home-page "https://www.eclipse.org/")
6536 (synopsis "Eclipse core file system")
6537 (description "This package provides the Eclipse core file system with the
6538 module @code{org.eclipse.core.filesystem}.")
6539 (license license:epl1.0)))
6540
6541 (define-public java-eclipse-core-expressions
6542 (package
6543 (name "java-eclipse-core-expressions")
6544 (version "3.5.100")
6545 (source (origin
6546 (method url-fetch)
6547 (uri (string-append "https://repo1.maven.org/maven2/"
6548 "org/eclipse/platform/org.eclipse.core.expressions/"
6549 version "/org.eclipse.core.expressions-"
6550 version "-sources.jar"))
6551 (sha256
6552 (base32
6553 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6554 (build-system ant-build-system)
6555 (arguments
6556 `(#:tests? #f ; no tests included
6557 #:jar-name "eclipse-core-expressions.jar"))
6558 (inputs
6559 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6560 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6561 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6562 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6563 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6564 (home-page "https://www.eclipse.org/")
6565 (synopsis "Eclipse core expression language")
6566 (description "This package provides the Eclipse core expression language
6567 with the @code{org.eclipse.core.expressions} module.")
6568 (license license:epl1.0)))
6569
6570 (define-public java-eclipse-core-variables
6571 (package
6572 (name "java-eclipse-core-variables")
6573 (version "3.3.0")
6574 (source (origin
6575 (method url-fetch)
6576 (uri (string-append "https://repo1.maven.org/maven2/"
6577 "org/eclipse/platform/org.eclipse.core.variables/"
6578 version "/org.eclipse.core.variables-"
6579 version "-sources.jar"))
6580 (sha256
6581 (base32
6582 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6583 (build-system ant-build-system)
6584 (arguments
6585 `(#:tests? #f ; no tests included
6586 #:jar-name "eclipse-core-variables.jar"))
6587 (inputs
6588 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6589 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6590 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6591 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6592 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6593 (home-page "https://www.eclipse.org/platform")
6594 (synopsis "Eclipse core variables")
6595 (description "This package provides the Eclipse core variables module
6596 @code{org.eclipse.core.variables}.")
6597 (license license:epl1.0)))
6598
6599 (define-public java-eclipse-ant-core
6600 (package
6601 (name "java-eclipse-ant-core")
6602 (version "3.4.100")
6603 (source (origin
6604 (method url-fetch)
6605 (uri (string-append "https://repo1.maven.org/maven2/"
6606 "org/eclipse/platform/org.eclipse.ant.core/"
6607 version "/org.eclipse.ant.core-"
6608 version "-sources.jar"))
6609 (sha256
6610 (base32
6611 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6612 (build-system ant-build-system)
6613 (arguments
6614 `(#:tests? #f ; no tests included
6615 #:jar-name "eclipse-ant-core.jar"))
6616 (inputs
6617 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6618 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6619 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6620 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6621 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6622 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6623 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6624 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6625 (home-page "https://www.eclipse.org/platform")
6626 (synopsis "Ant build tool core libraries")
6627 (description "This package provides the ant build tool core libraries with
6628 the module @code{org.eclipse.ant.core}.")
6629 (license license:epl1.0)))
6630
6631 (define-public java-eclipse-core-resources
6632 (package
6633 (name "java-eclipse-core-resources")
6634 (version "3.13.200")
6635 (source (origin
6636 (method url-fetch)
6637 (uri (string-append "https://repo1.maven.org/maven2/"
6638 "org/eclipse/platform/org.eclipse.core.resources/"
6639 version "/org.eclipse.core.resources-"
6640 version "-sources.jar"))
6641 (sha256
6642 (base32
6643 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6644 (build-system ant-build-system)
6645 (arguments
6646 `(#:tests? #f ; no tests included
6647 #:jar-name "eclipse-core-resources.jar"))
6648 (inputs
6649 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6650 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6651 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6652 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6653 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6654 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6655 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6656 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6657 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6658 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6659 (home-page "https://www.eclipse.org/")
6660 (synopsis "Eclipse core resource management")
6661 (description "This package provides the Eclipse core resource management
6662 module @code{org.eclipse.core.resources}.")
6663 (license license:epl1.0)))
6664
6665 (define-public java-eclipse-compare-core
6666 (package
6667 (name "java-eclipse-compare-core")
6668 (version "3.6.0")
6669 (source (origin
6670 (method url-fetch)
6671 (uri (string-append "https://repo1.maven.org/maven2/"
6672 "org/eclipse/platform/org.eclipse.compare.core/"
6673 version "/org.eclipse.compare.core-"
6674 version "-sources.jar"))
6675 (sha256
6676 (base32
6677 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6678 (build-system ant-build-system)
6679 (arguments
6680 `(#:tests? #f ; no tests included
6681 #:jar-name "eclipse-compare-core.jar"))
6682 (inputs
6683 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6684 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6685 ("java-eclipse-osgi" ,java-eclipse-osgi)
6686 ("java-icu4j" ,java-icu4j)))
6687 (home-page "https://www.eclipse.org/")
6688 (synopsis "Eclipse core compare support")
6689 (description "This package provides the Eclipse core compare support
6690 module @code{org.eclipse.compare.core}.")
6691 (license license:epl1.0)))
6692
6693 (define-public java-eclipse-team-core
6694 (package
6695 (name "java-eclipse-team-core")
6696 (version "3.8.0")
6697 (source (origin
6698 (method url-fetch)
6699 (uri (string-append "https://repo1.maven.org/maven2/"
6700 "org/eclipse/platform/org.eclipse.team.core/"
6701 version "/org.eclipse.team.core-"
6702 version "-sources.jar"))
6703 (sha256
6704 (base32
6705 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6706 (build-system ant-build-system)
6707 (arguments
6708 `(#:tests? #f ; no tests included
6709 #:jar-name "eclipse-team-core.jar"))
6710 (inputs
6711 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6712 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6713 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6714 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6715 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6716 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6717 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6718 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6719 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6720 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6721 (home-page "https://www.eclipse.org/platform")
6722 (synopsis "Eclipse team support core")
6723 (description "This package provides the Eclipse team support core module
6724 @code{org.eclipse.team.core}.")
6725 (license license:epl1.0)))
6726
6727 (define-public java-eclipse-core-commands
6728 (package
6729 (name "java-eclipse-core-commands")
6730 (version "3.8.1")
6731 (source (origin
6732 (method url-fetch)
6733 (uri (string-append "https://repo1.maven.org/maven2/"
6734 "org/eclipse/platform/org.eclipse.core.commands/"
6735 version "/org.eclipse.core.commands-"
6736 version "-sources.jar"))
6737 (sha256
6738 (base32
6739 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6740 (build-system ant-build-system)
6741 (arguments
6742 `(#:tests? #f ; no tests included
6743 #:jar-name "eclipse-core-commands.jar"))
6744 (inputs
6745 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6746 (home-page "https://www.eclipse.org/platform")
6747 (synopsis "Eclipse core commands")
6748 (description "This package provides Eclipse core commands in the module
6749 @code{org.eclipse.core.commands}.")
6750 (license license:epl1.0)))
6751
6752 (define-public java-eclipse-text
6753 (package
6754 (name "java-eclipse-text")
6755 (version "3.6.0")
6756 (source (origin
6757 (method url-fetch)
6758 (uri (string-append "https://repo1.maven.org/maven2/"
6759 "org/eclipse/platform/org.eclipse.text/"
6760 version "/org.eclipse.text-"
6761 version "-sources.jar"))
6762 (sha256
6763 (base32
6764 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6765 (build-system ant-build-system)
6766 (arguments
6767 `(#:tests? #f ; no tests included
6768 #:jar-name "eclipse-text.jar"
6769 #:phases
6770 (modify-phases %standard-phases
6771 ;; When creating a new category we must make sure that the new list
6772 ;; matches List<Position>. By default it seems to be too generic
6773 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6774 ;; Without this we get this error:
6775 ;;
6776 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6777 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6778 ;; [javac] fPositions.put(category, new ArrayList<>());
6779 ;; [javac] ^
6780 ;; [javac] required: String,List<Position>
6781 ;; [javac] found: String,ArrayList<Object>
6782 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6783 ;; to List<Position> by method invocation conversion
6784 ;; [javac] where K,V are type-variables:
6785 ;; [javac] K extends Object declared in interface Map
6786 ;; [javac] V extends Object declared in interface Map
6787 ;;
6788 ;; I don't know if this is a good fix. I suspect it is not, but it
6789 ;; seems to work.
6790 (add-after 'unpack 'fix-compilation-error
6791 (lambda _
6792 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6793 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6794 "Positions.put(category, new ArrayList<Position>());"))
6795 #t)))))
6796 (inputs
6797 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6798 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6799 ("java-icu4j" ,java-icu4j)))
6800 (home-page "http://www.eclipse.org/platform")
6801 (synopsis "Eclipse text library")
6802 (description "Platform Text is part of the Platform UI project and
6803 provides the basic building blocks for text and text editors within Eclipse
6804 and contributes the Eclipse default text editor.")
6805 (license license:epl1.0)))
6806
6807 (define-public java-eclipse-jdt-core
6808 (package
6809 (name "java-eclipse-jdt-core")
6810 (version "3.16.0")
6811 (source (origin
6812 (method url-fetch)
6813 (uri (string-append "https://repo1.maven.org/maven2/"
6814 "org/eclipse/jdt/org.eclipse.jdt.core/"
6815 version "/org.eclipse.jdt.core-"
6816 version "-sources.jar"))
6817 (sha256
6818 (base32
6819 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6820 (build-system ant-build-system)
6821 (arguments
6822 `(#:tests? #f ; no tests included
6823 #:jar-name "eclipse-jdt-core.jar"
6824 #:phases
6825 (modify-phases %standard-phases
6826 (add-after 'unpack 'move-sources
6827 (lambda _
6828 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6829 (for-each (lambda (file)
6830 (install-file file (string-append "../" (dirname file))))
6831 (find-files "." ".*")))
6832 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6833 #t))
6834 (add-before 'build 'copy-resources
6835 (lambda _
6836 (with-directory-excursion "src"
6837 (for-each (lambda (file)
6838 (install-file file (string-append "../build/classes/" (dirname file))))
6839 (find-files "." ".*.(props|properties|rsc)")))
6840 #t)))))
6841 (inputs
6842 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6843 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6844 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6845 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6846 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6847 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6848 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6849 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6850 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6851 ("java-eclipse-osgi" ,java-eclipse-osgi)
6852 ("java-eclipse-text" ,java-eclipse-text)))
6853 (home-page "https://www.eclipse.org/jdt")
6854 (synopsis "Java development tools core libraries")
6855 (description "This package provides the core libraries of the Eclipse Java
6856 development tools.")
6857 (license license:epl1.0)))
6858
6859 (define-public java-eclipse-jdt-compiler-apt
6860 (package
6861 (name "java-eclipse-jdt-compiler-apt")
6862 (version "1.3.400")
6863 (source (origin
6864 (method url-fetch)
6865 (uri (string-append "https://repo1.maven.org/maven2/"
6866 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6867 version "/org.eclipse.jdt.compiler.apt-"
6868 version "-sources.jar"))
6869 (sha256
6870 (base32
6871 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6872 (build-system ant-build-system)
6873 (arguments
6874 `(#:tests? #f ; no tests included
6875 #:jar-name "eclipse-jdt-compiler-apt.jar"
6876 #:jdk ,openjdk11))
6877 (inputs
6878 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6879 (home-page "https://www.eclipse.org/jdt/apt/")
6880 (synopsis "Annotation processing tool")
6881 (description "APT stands for Annotation Processing Tool. APT provides a
6882 means for generating files and compiling new Java classes based on annotations
6883 found in your source code.")
6884 (license license:epl2.0)))
6885
6886 (define-public java-javax-mail
6887 (package
6888 (name "java-javax-mail")
6889 (version "1.5.6")
6890 (source (origin
6891 (method url-fetch)
6892 (uri (string-append "https://repo1.maven.org/maven2/"
6893 "com/sun/mail/javax.mail/"
6894 version "/javax.mail-"
6895 version "-sources.jar"))
6896 (sha256
6897 (base32
6898 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6899 (build-system ant-build-system)
6900 (arguments
6901 `(#:tests? #f ; no tests
6902 #:jar-name "javax-mail.jar"))
6903 (home-page "https://javamail.java.net")
6904 (synopsis "Reference implementation of the JavaMail API")
6905 (description
6906 "This package provides versions of the JavaMail API implementation, IMAP,
6907 SMTP, and POP3 service providers, some examples, and documentation for the
6908 JavaMail API.")
6909 ;; GPLv2 only with "classpath exception".
6910 (license license:gpl2)))
6911
6912 (define-public java-log4j-api
6913 (package
6914 (name "java-log4j-api")
6915 (version "2.4.1")
6916 (source (origin
6917 (method url-fetch)
6918 (uri (string-append "mirror://apache/logging/log4j/" version
6919 "/apache-log4j-" version "-src.tar.gz"))
6920 (sha256
6921 (base32
6922 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6923 (build-system ant-build-system)
6924 (arguments
6925 `(#:tests? #f ; tests require unpackaged software
6926 #:jar-name "log4j-api.jar"
6927 #:make-flags
6928 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6929 "/share/java"))
6930 #:phases
6931 (modify-phases %standard-phases
6932 (add-after 'unpack 'enter-dir
6933 (lambda _ (chdir "log4j-api") #t))
6934 ;; FIXME: The tests require additional software that has not been
6935 ;; packaged yet, such as
6936 ;; * org.apache.maven
6937 ;; * org.apache.felix
6938 (add-after 'enter-dir 'delete-tests
6939 (lambda _ (delete-file-recursively "src/test") #t)))))
6940 (inputs
6941 `(("java-osgi-core" ,java-osgi-core)
6942 ("java-hamcrest-core" ,java-hamcrest-core)
6943 ("java-junit" ,java-junit)))
6944 (home-page "https://logging.apache.org/log4j/2.x/")
6945 (synopsis "API module of the Log4j logging framework for Java")
6946 (description
6947 "This package provides the API module of the Log4j logging framework for
6948 Java.")
6949 (license license:asl2.0)))
6950
6951 (define-public java-log4j-core
6952 (package
6953 (inherit java-log4j-api)
6954 (name "java-log4j-core")
6955 (inputs
6956 `(("java-osgi-core" ,java-osgi-core)
6957 ("java-hamcrest-core" ,java-hamcrest-core)
6958 ("java-log4j-api" ,java-log4j-api)
6959 ("java-mail" ,java-mail)
6960 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6961 ("java-lmax-disruptor" ,java-lmax-disruptor)
6962 ("java-kafka" ,java-kafka-clients)
6963 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6964 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6965 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6966 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6967 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6968 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6969 ("java-commons-compress" ,java-commons-compress)
6970 ("java-commons-csv" ,java-commons-csv)
6971 ("java-jeromq" ,java-jeromq)
6972 ("java-junit" ,java-junit)))
6973 (native-inputs
6974 `(("hamcrest" ,java-hamcrest-all)
6975 ("java-commons-io" ,java-commons-io)
6976 ("java-commons-lang3" ,java-commons-lang3)
6977 ("slf4j" ,java-slf4j-api)))
6978 (arguments
6979 `(#:tests? #f ; tests require more dependencies
6980 #:test-dir "src/test"
6981 #:source-dir "src/main/java"
6982 #:jar-name "log4j-core.jar"
6983 #:jdk ,icedtea-8
6984 #:make-flags
6985 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6986 "/share/java"))
6987 #:phases
6988 (modify-phases %standard-phases
6989 (add-after 'unpack 'enter-dir
6990 (lambda _ (chdir "log4j-core") #t)))))
6991 (synopsis "Core component of the Log4j framework")
6992 (description "This package provides the core component of the Log4j
6993 logging framework for Java.")))
6994
6995 (define-public java-log4j-1.2-api
6996 (package
6997 (inherit java-log4j-api)
6998 (name "java-log4j-1.2-api")
6999 (arguments
7000 `(#:jar-name "java-log4j-1.2-api.jar"
7001 #:source-dir "log4j-1.2-api/src/main/java"
7002 #:jdk ,icedtea-8
7003 ;; Tests require maven-model (and other maven subprojects), which is a
7004 ;; cyclic dependency.
7005 #:tests? #f))
7006 (inputs
7007 `(("log4j-api" ,java-log4j-api)
7008 ("log4j-core" ,java-log4j-core)
7009 ("osgi-core" ,java-osgi-core)
7010 ("eclipse-osgi" ,java-eclipse-osgi)
7011 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7012
7013 (define-public java-commons-cli
7014 (package
7015 (name "java-commons-cli")
7016 (version "1.4")
7017 (source (origin
7018 (method url-fetch)
7019 (uri (string-append "mirror://apache/commons/cli/source/"
7020 "commons-cli-" version "-src.tar.gz"))
7021 (sha256
7022 (base32
7023 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7024 (build-system ant-build-system)
7025 ;; TODO: javadoc
7026 (arguments
7027 `(#:jar-name "commons-cli.jar"))
7028 (native-inputs
7029 `(("java-junit" ,java-junit)
7030 ("java-hamcrest-core" ,java-hamcrest-core)))
7031 (home-page "https://commons.apache.org/cli/")
7032 (synopsis "Command line arguments and options parsing library")
7033 (description "The Apache Commons CLI library provides an API for parsing
7034 command line options passed to programs. It is also able to print help
7035 messages detailing the options available for a command line tool.
7036
7037 Commons CLI supports different types of options:
7038
7039 @itemize
7040 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7041 @item GNU like long options (ie. du --human-readable --max-depth=1)
7042 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7043 @item Short options with value attached (ie. gcc -O2 foo.c)
7044 @item long options with single hyphen (ie. ant -projecthelp)
7045 @end itemize
7046
7047 This is a part of the Apache Commons Project.")
7048 (license license:asl2.0)))
7049
7050 (define-public java-commons-codec
7051 (package
7052 (name "java-commons-codec")
7053 (version "1.14")
7054 (source (origin
7055 (method url-fetch)
7056 (uri (string-append "mirror://apache/commons/codec/source/"
7057 "commons-codec-" version "-src.tar.gz"))
7058 (sha256
7059 (base32
7060 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7061 (build-system ant-build-system)
7062 (arguments
7063 `(#:jar-name "java-commons-codec.jar"
7064 #:source-dir "src/main/java"
7065 #:test-dir "src/test"
7066 #:test-exclude (list "**/*AbstractTest.java")
7067 #:phases
7068 (modify-phases %standard-phases
7069 (add-before 'build 'copy-resources
7070 (lambda _
7071 (copy-recursively "src/main/resources"
7072 "build/classes")
7073 #t))
7074 (add-before 'check 'copy-test-resources
7075 (lambda _
7076 (copy-recursively "src/test/resources"
7077 "build/test-classes")
7078 #t))
7079 (replace 'install (install-from-pom "pom.xml")))))
7080 (native-inputs
7081 `(("java-commons-lang3" ,java-commons-lang3)
7082 ("java-junit" ,java-junit)))
7083 (propagated-inputs
7084 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7085 (home-page "https://commons.apache.org/codec/")
7086 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7087 (description "The codec package contains simple encoder and decoders for
7088 various formats such as Base64 and Hexadecimal. In addition to these widely
7089 used encoders and decoders, the codec package also maintains a collection of
7090 phonetic encoding utilities.
7091
7092 This is a part of the Apache Commons Project.")
7093 (license license:asl2.0)))
7094
7095 (define-public java-commons-daemon
7096 (package
7097 (name "java-commons-daemon")
7098 (version "1.1.0")
7099 (source (origin
7100 (method url-fetch)
7101 (uri (string-append "mirror://apache/commons/daemon/source/"
7102 "commons-daemon-" version "-src.tar.gz"))
7103 (sha256
7104 (base32
7105 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7106 (build-system ant-build-system)
7107 (arguments
7108 `(#:test-target "test"
7109 #:phases
7110 (modify-phases %standard-phases
7111 (add-after 'build 'build-javadoc ant-build-javadoc)
7112 (replace 'install (install-jars "dist"))
7113 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7114 (native-inputs
7115 `(("java-junit" ,java-junit)))
7116 (home-page "https://commons.apache.org/daemon/")
7117 (synopsis "Library to launch Java applications as daemons")
7118 (description "The Daemon package from Apache Commons can be used to
7119 implement Java applications which can be launched as daemons. For example the
7120 program will be notified about a shutdown so that it can perform cleanup tasks
7121 before its process of execution is destroyed by the operation system.
7122
7123 This package contains the Java library. You will also need the actual binary
7124 for your architecture which is provided by the jsvc package.
7125
7126 This is a part of the Apache Commons Project.")
7127 (license license:asl2.0)))
7128
7129 (define-public java-javaewah
7130 (package
7131 (name "java-javaewah")
7132 (version "1.1.6")
7133 (source (origin
7134 (method git-fetch)
7135 (uri (git-reference
7136 (url "https://github.com/lemire/javaewah/")
7137 (commit (string-append "JavaEWAH-" version))))
7138 (file-name (git-file-name name version))
7139 (sha256
7140 (base32
7141 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7142 (build-system ant-build-system)
7143 (arguments `(#:jar-name "javaewah.jar"))
7144 (inputs
7145 `(("java-junit" ,java-junit)
7146 ("java-hamcrest-core" ,java-hamcrest-core)))
7147 (home-page "https://github.com/lemire/javaewah")
7148 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7149 (description "This is a word-aligned compressed variant of the Java
7150 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7151 compression scheme. It can be used to implement bitmap indexes.
7152
7153 The goal of word-aligned compression is not to achieve the best compression,
7154 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7155 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7156 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7157 @code{BitSet} class by Sun).")
7158 ;; GPL2.0 derivates are explicitly allowed.
7159 (license license:asl2.0)))
7160
7161 (define-public java-slf4j-api
7162 (package
7163 (name "java-slf4j-api")
7164 (version "1.7.25")
7165 (source (origin
7166 (method url-fetch)
7167 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7168 version ".tar.gz"))
7169 (sha256
7170 (base32
7171 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7172 (modules '((guix build utils)))
7173 ;; Delete bundled jars.
7174 (snippet
7175 '(begin
7176 (for-each delete-file (find-files "." "\\.jar$"))
7177 #t))))
7178 (build-system ant-build-system)
7179 (arguments
7180 `(#:jar-name "slf4j-api.jar"
7181 #:source-dir "slf4j-api/src/main"
7182 #:test-dir "slf4j-api/src/test"
7183 #:phases
7184 (modify-phases %standard-phases
7185 (add-after 'build 'regenerate-jar
7186 (lambda _
7187 ;; pom.xml ignores these files in the jar creation process. If we don't,
7188 ;; we get the error "This code should have never made it into slf4j-api.jar"
7189 (delete-file-recursively "build/classes/org/slf4j/impl")
7190 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7191 "build/classes" ".")))
7192 (add-before 'check 'dont-test-abstract-classes
7193 (lambda _
7194 ;; abstract classes are not meant to be run with junit
7195 (substitute* "build.xml"
7196 (("<include name=\"\\*\\*/\\*Test.java\" />")
7197 (string-append "<include name=\"**/*Test.java\" />"
7198 "<exclude name=\"**/MultithreadedInitializationTest"
7199 ".java\" />")))
7200 #t)))))
7201 (inputs
7202 `(("java-junit" ,java-junit)
7203 ("java-hamcrest-core" ,java-hamcrest-core)))
7204 (home-page "https://www.slf4j.org/")
7205 (synopsis "Simple logging facade for Java")
7206 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7207 simple facade or abstraction for various logging
7208 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7209 allowing the end user to plug in the desired logging framework at deployment
7210 time.")
7211 (license license:expat)))
7212
7213 (define-public java-slf4j-simple
7214 (package
7215 (name "java-slf4j-simple")
7216 (version "1.7.25")
7217 (source (package-source java-slf4j-api))
7218 (build-system ant-build-system)
7219 (arguments
7220 `(#:jar-name "slf4j-simple.jar"
7221 #:source-dir "slf4j-simple/src/main"
7222 #:test-dir "slf4j-simple/src/test"
7223 #:phases
7224 (modify-phases %standard-phases
7225 ;; The tests need some test classes from slf4j-api
7226 (add-before 'check 'build-slf4j-api-test-helpers
7227 (lambda _
7228 ;; Add current dir to CLASSPATH ...
7229 (setenv "CLASSPATH"
7230 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7231 ;; ... and build test helper classes here:
7232 (apply invoke
7233 `("javac" "-d" "."
7234 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
7235 (inputs
7236 `(("java-junit" ,java-junit)
7237 ("java-hamcrest-core" ,java-hamcrest-core)
7238 ("java-slf4j-api" ,java-slf4j-api)))
7239 (home-page "https://www.slf4j.org/")
7240 (synopsis "Simple implementation of simple logging facade for Java")
7241 (description "SLF4J binding for the Simple implementation, which outputs
7242 all events to System.err. Only messages of level INFO and higher are
7243 printed.")
7244 (license license:expat)))
7245
7246 (define-public antlr2
7247 (package
7248 (name "antlr2")
7249 (version "2.7.7")
7250 (source (origin
7251 (method url-fetch)
7252 (uri (string-append "https://www.antlr2.org/download/antlr-"
7253 version ".tar.gz"))
7254 (sha256
7255 (base32
7256 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7257 (modules '((guix build utils)))
7258 (snippet
7259 '(begin
7260 (delete-file "antlr.jar")
7261 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7262 (("#include <map>")
7263 (string-append
7264 "#include <map>\n"
7265 "#define EOF (-1)\n"
7266 "#include <strings.h>")))
7267 (substitute* "configure"
7268 (("/bin/sh") "sh"))
7269 #t))))
7270 (build-system gnu-build-system)
7271 (arguments
7272 `(#:tests? #f ; no test target
7273 #:imported-modules ((guix build ant-build-system)
7274 (guix build syscalls)
7275 ,@%gnu-build-system-modules)
7276 #:modules (((guix build ant-build-system) #:prefix ant:)
7277 (guix build gnu-build-system)
7278 (guix build utils))
7279 #:phases
7280 (modify-phases %standard-phases
7281 (add-after 'install 'strip-jar-timestamps
7282 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7283 (add-before 'configure 'fix-timestamp
7284 (lambda _
7285 (substitute* "configure"
7286 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7287 #t))
7288 (add-after 'configure 'fix-bin-ls
7289 (lambda _
7290 (substitute* (find-files "." "Makefile")
7291 (("/bin/ls") "ls"))
7292 #t)))))
7293 (native-inputs
7294 `(("which" ,which)
7295 ("zip" ,zip)
7296 ("java" ,icedtea "jdk")))
7297 (inputs
7298 `(("java" ,icedtea)))
7299 (home-page "https://www.antlr2.org")
7300 (synopsis "Framework for constructing recognizers, compilers, and translators")
7301 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7302 is a language tool that provides a framework for constructing recognizers,
7303 compilers, and translators from grammatical descriptions containing Java, C#,
7304 C++, or Python actions. ANTLR provides excellent support for tree construction,
7305 tree walking, and translation.")
7306 (license license:public-domain)))
7307
7308 (define-public java-stringtemplate-3
7309 (package
7310 (name "java-stringtemplate")
7311 (version "3.2.1")
7312 (source (origin
7313 (method url-fetch)
7314 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7315 "gh-pages/download/stringtemplate-"
7316 version ".tar.gz"))
7317 (sha256
7318 (base32
7319 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7320 (build-system ant-build-system)
7321 (arguments
7322 `(#:jar-name (string-append ,name "-" ,version ".jar")
7323 #:test-dir "test"
7324 #:modules ((guix build ant-build-system)
7325 (guix build utils)
7326 (srfi srfi-1))
7327 #:phases
7328 (modify-phases %standard-phases
7329 (add-before 'check 'fix-tests
7330 (lambda _
7331 (substitute* "build.xml"
7332 (("\\$\\{test.home\\}/java")
7333 "${test.home}/org"))
7334 #t))
7335 (add-before 'build 'generate-grammar
7336 (lambda _
7337 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7338 (for-each (lambda (file)
7339 (format #t "~a\n" file)
7340 (invoke "antlr" file))
7341 '("template.g" "angle.bracket.template.g" "action.g"
7342 "eval.g" "group.g" "interface.g")))
7343 #t)))))
7344 (native-inputs
7345 `(("antlr" ,antlr2)
7346 ("java-junit" ,java-junit)))
7347 (home-page "https://www.stringtemplate.org")
7348 (synopsis "Template engine to generate formatted text output")
7349 (description "StringTemplate is a java template engine (with ports for C#,
7350 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7351 or any other formatted text output. StringTemplate is particularly good at
7352 code generators, multiple site skins, and internationalization / localization.
7353 StringTemplate also powers ANTLR.")
7354 (license license:bsd-3)))
7355
7356 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7357 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7358 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7359 ;; of antlr3 at runtime.
7360 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7361 ;; This version of ST4 is sufficient for the latest antlr3.
7362 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7363 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7364 ;; against the latest ST4.
7365 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7366 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7367 ;; only grammar files with the antlr2 syntax.
7368 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7369
7370 (define-public java-stringtemplate
7371 (package (inherit java-stringtemplate-3)
7372 (name "java-stringtemplate")
7373 (version "4.0.8")
7374 (source (origin
7375 (method url-fetch)
7376 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7377 version ".tar.gz"))
7378 (file-name (string-append name "-" version ".tar.gz"))
7379 (sha256
7380 (base32
7381 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7382 (build-system ant-build-system)
7383 (arguments
7384 `(#:jar-name (string-append ,name "-" ,version ".jar")
7385 #:tests? #f ; FIXME: tests fail for unknown reasons
7386 #:test-dir "test"
7387 #:modules ((guix build ant-build-system)
7388 (guix build utils)
7389 (srfi srfi-1))
7390 #:phases
7391 (modify-phases %standard-phases
7392 (add-before 'check 'fix-test-target
7393 (lambda _
7394 (substitute* "build.xml"
7395 (("\\$\\{test.home\\}/java") "${test.home}/")
7396 (("\\*Test.java") "Test*.java"))
7397 #t))
7398 (add-before 'build 'generate-grammar
7399 (lambda _
7400 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7401 (for-each (lambda (file)
7402 (format #t "~a\n" file)
7403 (invoke "antlr3" file))
7404 '("STParser.g" "Group.g" "CodeGenerator.g")))
7405 #t)))))
7406 (inputs
7407 `(("antlr3" ,antlr3-bootstrap)
7408 ("antlr2" ,antlr2)
7409 ("java-stringtemplate" ,java-stringtemplate-3)
7410 ("java-junit" ,java-junit)))))
7411
7412 (define java-stringtemplate-4.0.6
7413 (package (inherit java-stringtemplate)
7414 (name "java-stringtemplate")
7415 (version "4.0.6")
7416 (source (origin
7417 (method url-fetch)
7418 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7419 version ".tar.gz"))
7420 (file-name (string-append name "-" version ".tar.gz"))
7421 (sha256
7422 (base32
7423 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7424 (inputs
7425 `(("antlr3" ,antlr3-3.3)
7426 ("antlr2" ,antlr2)
7427 ("java-stringtemplate" ,java-stringtemplate-3)))))
7428
7429 (define-public antlr3
7430 (package
7431 (name "antlr3")
7432 (version "3.5.2")
7433 (source (origin
7434 (method git-fetch)
7435 (uri (git-reference
7436 (url "https://github.com/antlr/antlr3")
7437 (commit version)))
7438 (file-name (git-file-name name version))
7439 (sha256
7440 (base32
7441 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7442 (build-system ant-build-system)
7443 (arguments
7444 `(#:jar-name (string-append ,name "-" ,version ".jar")
7445 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7446 #:tests? #f
7447 #:phases
7448 (modify-phases %standard-phases
7449 (add-after 'install 'bin-install
7450 (lambda* (#:key inputs outputs #:allow-other-keys)
7451 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7452 (bin (string-append (assoc-ref outputs "out") "/bin")))
7453 (mkdir-p bin)
7454 (with-output-to-file (string-append bin "/antlr3")
7455 (lambda _
7456 (display
7457 (string-append "#!" (which "sh") "\n"
7458 "java -cp " jar "/" ,name "-" ,version ".jar:"
7459 (string-concatenate
7460 (find-files (assoc-ref inputs "stringtemplate")
7461 ".*\\.jar"))
7462 ":"
7463 (string-concatenate
7464 (find-files (assoc-ref inputs "stringtemplate4")
7465 ".*\\.jar"))
7466 ":"
7467 (string-concatenate
7468 (find-files (string-append
7469 (assoc-ref inputs "antlr")
7470 "/lib")
7471 ".*\\.jar"))
7472 " org.antlr.Tool $*"))))
7473 (chmod (string-append bin "/antlr3") #o755))
7474 #t))
7475 (add-before 'build 'generate-grammar
7476 (lambda _
7477 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7478 (for-each (lambda (file)
7479 (display file)
7480 (newline)
7481 (invoke "antlr3" file))
7482 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7483 "AssignTokenTypesWalker.g"
7484 "ActionTranslator.g" "TreeToNFAConverter.g"
7485 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7486 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7487 (substitute* "ANTLRParser.java"
7488 (("public Object getTree") "public GrammarAST getTree"))
7489 (substitute* "ANTLRv3Parser.java"
7490 (("public Object getTree") "public CommonTree getTree"))
7491 (chdir "../../../../../java")
7492 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7493 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7494 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7495 (substitute* "org/antlr/tool/ErrorManager.java"
7496 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7497 (chdir "../../../..")
7498 #t))
7499 (add-before 'build 'fix-build-xml
7500 (lambda _
7501 (substitute* "build.xml"
7502 (("target name=\"compile\">")
7503 "target name=\"compile\">
7504 <copy todir=\"${classes.dir}\">
7505 <fileset dir=\"tool/src/main/resources\">
7506 <include name=\"**/*.stg\"/>
7507 <include name=\"**/*.st\"/>
7508 <include name=\"**/*.sti\"/>
7509 <include name=\"**/STLexer.tokens\"/>
7510 </fileset>
7511 </copy>"))
7512 #t)))))
7513 (native-inputs
7514 `(("antlr" ,antlr2)
7515 ("antlr3" ,antlr3-bootstrap)))
7516 (inputs
7517 `(("junit" ,java-junit)
7518 ("stringtemplate" ,java-stringtemplate-3)
7519 ("stringtemplate4" ,java-stringtemplate)))
7520 (propagated-inputs
7521 `(("stringtemplate" ,java-stringtemplate-3)
7522 ("antlr" ,antlr2)
7523 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7524 (home-page "https://www.antlr3.org")
7525 (synopsis "Framework for constructing recognizers, compilers, and translators")
7526 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7527 is a language tool that provides a framework for constructing recognizers,
7528 compilers, and translators from grammatical descriptions containing Java, C#,
7529 C++, or Python actions. ANTLR provides excellent support for tree construction,
7530 tree walking, and translation.")
7531 (license license:bsd-3)))
7532
7533 (define antlr3-bootstrap
7534 (package
7535 (inherit antlr3)
7536 (name "antlr3-bootstrap")
7537 (native-inputs
7538 `(("antlr" ,antlr2)
7539 ("antlr3" ,antlr3-3.3)))
7540 (inputs
7541 `(("junit" ,java-junit)))))
7542
7543 (define-public antlr3-3.3
7544 (package
7545 (inherit antlr3)
7546 (name "antlr3")
7547 (version "3.3")
7548 (source (origin
7549 (method url-fetch)
7550 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7551 "gh-pages/download/antlr-"
7552 version ".tar.gz"))
7553 (sha256
7554 (base32
7555 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7556 (patches
7557 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7558 (arguments
7559 `(#:jar-name (string-append ,name "-" ,version ".jar")
7560 #:source-dir (string-join '("tool/src/main/java"
7561 "runtime/Java/src/main/java"
7562 "tool/src/main/antlr2"
7563 "tool/src/main/antlr3")
7564 ":")
7565 #:tests? #f ; FIXME: tests seem to require maven plugin
7566 #:modules ((guix build ant-build-system)
7567 (guix build utils)
7568 (srfi srfi-1))
7569 #:phases
7570 (modify-phases %standard-phases
7571 (add-after 'install 'bin-install
7572 (lambda* (#:key inputs outputs #:allow-other-keys)
7573 (let* ((out (assoc-ref outputs "out"))
7574 (jar (string-append out "/share/java"))
7575 (bin (string-append out "/bin")))
7576 (mkdir-p bin)
7577 (with-output-to-file (string-append bin "/antlr3")
7578 (lambda _
7579 (display
7580 (string-append
7581 "#!" (which "sh") "\n"
7582 "java -cp " jar "/antlr3-3.3.jar:"
7583 (string-join
7584 (append (find-files (assoc-ref inputs "java-stringtemplate")
7585 ".*\\.jar$")
7586 (find-files (string-append (assoc-ref inputs "antlr")
7587 "/lib")
7588 ".*\\.jar$"))
7589 ":")
7590 " org.antlr.Tool $*"))))
7591 (chmod (string-append bin "/antlr3") #o755)
7592 #t)))
7593 (add-before 'build 'generate-grammar
7594 (lambda _
7595 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7596 (("import org.antlr.grammar.v2.\\*;")
7597 "import org.antlr.grammar.v2.*;\n
7598 import org.antlr.grammar.v2.TreeToNFAConverter;\n
7599 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
7600 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
7601 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7602 (for-each (lambda (file)
7603 (format #t "~a\n" file)
7604 (invoke "antlr" file))
7605 '("antlr.g" "antlr.print.g" "assign.types.g"
7606 "buildnfa.g" "codegen.g" "define.g")))
7607 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7608 (for-each (lambda (file)
7609 (format #t "~a\n" file)
7610 (invoke "antlr3" file))
7611 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7612 "ANTLRv3Tree.g")))
7613 #t))
7614 (add-before 'build 'fix-build-xml
7615 (lambda _
7616 (substitute* "build.xml"
7617 (("target name=\"compile\">")
7618 "target name=\"compile\">
7619 <copy todir=\"${classes.dir}\">
7620 <fileset dir=\"tool/src/main/resources\">
7621 <include name=\"**/*.stg\"/>
7622 <include name=\"**/*.st\"/>
7623 <include name=\"**/*.sti\"/>
7624 <include name=\"**/STLexer.tokens\"/>
7625 </fileset>
7626 </copy>"))
7627 #t)))))
7628 (native-inputs
7629 `(("antlr" ,antlr2)
7630 ("antlr3" ,antlr3-3.1)))
7631 (inputs
7632 `(("junit" ,java-junit)))
7633 (propagated-inputs
7634 `(("java-stringtemplate" ,java-stringtemplate-3)
7635 ("antlr" ,antlr2)))))
7636
7637 (define-public antlr3-3.1
7638 (package
7639 (inherit antlr3)
7640 (version "3.1")
7641 (source (origin
7642 (method url-fetch)
7643 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7644 "gh-pages/download/antlr-"
7645 version ".tar.gz"))
7646 (sha256
7647 (base32
7648 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7649 (patches
7650 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7651 (arguments
7652 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7653 #:source-dir "src:runtime/Java/src"
7654 #:tests? #f
7655 #:phases
7656 (modify-phases %standard-phases
7657 (add-after 'install 'bin-install
7658 (lambda* (#:key inputs outputs #:allow-other-keys)
7659 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7660 (bin (string-append (assoc-ref outputs "out") "/bin")))
7661 (mkdir-p bin)
7662 (with-output-to-file (string-append bin "/antlr3")
7663 (lambda _
7664 (display
7665 (string-append "#!" (which "sh") "\n"
7666 "java -cp " jar "/antlr3-3.1.jar:"
7667 (string-concatenate
7668 (find-files (assoc-ref inputs "stringtemplate")
7669 ".*\\.jar"))
7670 ":"
7671 (string-concatenate
7672 (find-files (string-append
7673 (assoc-ref inputs "antlr")
7674 "/lib")
7675 ".*\\.jar"))
7676 " org.antlr.Tool $*"))))
7677 (chmod (string-append bin "/antlr3") #o755))
7678 #t))
7679 (add-before 'build 'generate-grammar
7680 (lambda _
7681 (let ((dir "src/org/antlr/tool/"))
7682 (for-each (lambda (file)
7683 (display file)
7684 (newline)
7685 (invoke "antlr" "-o" dir (string-append dir file)))
7686 '("antlr.g" "antlr.print.g" "assign.types.g"
7687 "buildnfa.g" "define.g")))
7688 (format #t "codegen.g\n")
7689 (invoke "antlr" "-o" "src/org/antlr/codegen"
7690 "src/org/antlr/codegen/codegen.g")
7691 #t))
7692 (add-before 'build 'fix-build-xml
7693 (lambda _
7694 (substitute* "build.xml"
7695 (("target name=\"compile\">")
7696 "target name=\"compile\">
7697 <copy todir=\"${classes.dir}\">
7698 <fileset dir=\"src\">
7699 <include name=\"**/*.stg\"/>
7700 <include name=\"**/*.st\"/>
7701 <include name=\"**/*.sti\"/>
7702 <include name=\"**/STLexer.tokens\"/>
7703 </fileset>
7704 </copy>"))
7705 #t)))))
7706 (native-inputs
7707 `(("antlr" ,antlr2)))
7708 (inputs
7709 `(("junit" ,java-junit)))
7710 (propagated-inputs
7711 `(("stringtemplate" ,java-stringtemplate-3)))))
7712
7713 (define-public java-commons-cli-1.2
7714 ;; This is a bootstrap dependency for Maven2.
7715 (package
7716 (inherit java-commons-cli)
7717 (version "1.2")
7718 (source (origin
7719 (method url-fetch)
7720 (uri (string-append "mirror://apache/commons/cli/source/"
7721 "commons-cli-" version "-src.tar.gz"))
7722 (sha256
7723 (base32
7724 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7725 (arguments
7726 `(#:jar-name "commons-cli.jar"
7727 #:phases
7728 (modify-phases %standard-phases
7729 (add-before 'check 'fix-build-xml
7730 (lambda* (#:key inputs #:allow-other-keys)
7731 (substitute* "build.xml"
7732 (("dir=\"\\$\\{test.home\\}/java\"")
7733 "dir=\"${test.home}\""))
7734 #t)))))
7735 (native-inputs
7736 `(("java-junit" ,java-junit)))))
7737
7738 (define-public java-microemulator-cldc
7739 (package
7740 (name "java-microemulator-cldc")
7741 (version "2.0.4")
7742 (source (origin
7743 (method url-fetch)
7744 (uri (string-append "https://github.com/barteo/microemu/archive/"
7745 "microemulator_"
7746 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7747 version)
7748 ".tar.gz"))
7749 (file-name (string-append name "-" version ".tar.gz"))
7750 (sha256
7751 (base32
7752 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7753 (build-system ant-build-system)
7754 (arguments
7755 `(#:jar-name "microemulator-cldc.jar"
7756 #:source-dir "microemu-cldc/src/main/java"
7757 #:tests? #f)); Requires even older software
7758 (home-page "https://github.com/barteo/microemu")
7759 (synopsis "J2ME CLDC emulator")
7760 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7761 Emulator. It demonstrates MIDlet based applications in web browser
7762 applet and can be run as a standalone java application.")
7763 (license (list license:asl2.0
7764 ;; or altenatively:
7765 license:lgpl2.1+))))
7766
7767 (define-public java-datanucleus-javax-persistence
7768 (package
7769 (name "java-datanucleus-javax-persistence")
7770 (version "2.2.0")
7771 (source (origin
7772 (method url-fetch)
7773 (uri (string-append "https://github.com/datanucleus/"
7774 "javax.persistence/archive/javax.persistence-"
7775 version "-release.tar.gz"))
7776 (sha256
7777 (base32
7778 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7779 (build-system ant-build-system)
7780 (arguments
7781 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7782 #:jdk ,icedtea-8
7783 #:source-dir "src/main/java"
7784 #:tests? #f)); no tests
7785 (home-page "https://github.com/datanucleus/javax.persistence")
7786 (synopsis "JPA API")
7787 (description "This package contains a clean definition of JPA API intended
7788 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7789 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7790 used to generate this API.")
7791 (license (list license:edl1.0 license:epl1.0))))
7792
7793 (define-public java-osgi-cmpn
7794 (package
7795 (name "java-osgi-cmpn")
7796 (version "6.0.0")
7797 (source (origin
7798 (method url-fetch)
7799 (uri (string-append "https://repo1.maven.org/maven2/"
7800 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7801 version "-sources.jar"))
7802 (sha256
7803 (base32
7804 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7805 (build-system ant-build-system)
7806 (arguments
7807 `(#:jar-name "osgi-cmpn.jar"
7808 #:tests? #f)); no tests
7809 (inputs
7810 `(("annotation" ,java-osgi-annotation)
7811 ("core" ,java-osgi-core)
7812 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7813 ("microemulator" ,java-microemulator-cldc)
7814 ("servlet" ,java-classpathx-servletapi)))
7815 (home-page "https://www.osgi.org")
7816 (synopsis "Compendium specification module of OSGi framework")
7817 (description
7818 "OSGi, for Open Services Gateway initiative framework, is a module system
7819 and service platform for the Java programming language. This package contains
7820 the compendium specification module, providing interfaces and classes for use
7821 in compiling bundles.")
7822 (license license:asl2.0)))
7823
7824 (define-public java-osgi-service-component-annotations
7825 (package
7826 (name "java-osgi-service-component-annotations")
7827 (version "1.3.0")
7828 (source (origin
7829 (method url-fetch)
7830 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7831 "org.osgi.service.component.annotations/"
7832 version "/org.osgi.service.component.annotations-"
7833 version "-sources.jar"))
7834 (sha256
7835 (base32
7836 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7837 (build-system ant-build-system)
7838 (arguments
7839 `(#:jar-name "osgi-service-component-annotations.jar"
7840 #:tests? #f)); no tests
7841 (inputs
7842 `(("annotation" ,java-osgi-annotation)))
7843 (home-page "https://www.osgi.org")
7844 (synopsis "Support annotations for osgi-service-component")
7845 (description
7846 "OSGi, for Open Services Gateway initiative framework, is a module system
7847 and service platform for the Java programming language. This package contains
7848 the support annotations for osgi-service-component.")
7849 (license license:asl2.0)))
7850
7851 (define-public java-osgi-dto
7852 (package
7853 (name "java-osgi-dto")
7854 (version "1.0.0")
7855 (source (origin
7856 (method url-fetch)
7857 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7858 "org.osgi.dto/" version "/org.osgi.dto-"
7859 version "-sources.jar"))
7860 (sha256
7861 (base32
7862 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7863 (build-system ant-build-system)
7864 (arguments
7865 `(#:jar-name "osgi-dto.jar"
7866 #:tests? #f)); no tests
7867 (inputs
7868 `(("annotation" ,java-osgi-annotation)))
7869 (home-page "https://www.osgi.org")
7870 (synopsis "Data Transfer Objects")
7871 (description
7872 "OSGi, for Open Services Gateway initiative framework, is a module system
7873 and service platform for the Java programming language. This package contains
7874 the Data Transfer Objects. It is easily serializable having only public fields
7875 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7876 Map and array aggregates may also be used. The aggregates must only hold
7877 objects of the listed types or aggregates.")
7878 (license license:asl2.0)))
7879
7880 (define-public java-osgi-resource
7881 (package
7882 (name "java-osgi-resource")
7883 (version "1.0.0")
7884 (source (origin
7885 (method url-fetch)
7886 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7887 "org.osgi.resource/"
7888 version "/org.osgi.resource-"
7889 version "-sources.jar"))
7890 (sha256
7891 (base32
7892 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7893 (build-system ant-build-system)
7894 (arguments
7895 `(#:jar-name "osgi-resource.jar"
7896 #:tests? #f)); no tests
7897 (inputs
7898 `(("annotation" ,java-osgi-annotation)
7899 ("dto" ,java-osgi-dto)))
7900 (home-page "https://www.osgi.org")
7901 (synopsis "OSGI Resource")
7902 (description
7903 "OSGi, for Open Services Gateway initiative framework, is a module system
7904 and service platform for the Java programming language. This package contains
7905 the definition of common types in osgi packages.")
7906 (license license:asl2.0)))
7907
7908 (define-public java-osgi-namespace-contract
7909 (package
7910 (name "java-osgi-namespace-contract")
7911 (version "1.0.0")
7912 (source (origin
7913 (method url-fetch)
7914 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7915 "org.osgi.namespace.contract/"
7916 version "/org.osgi.namespace.contract-"
7917 version "-sources.jar"))
7918 (sha256
7919 (base32
7920 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7921 (build-system ant-build-system)
7922 (inputs
7923 `(("resource" ,java-osgi-resource)
7924 ("annotation" ,java-osgi-annotation)))
7925 (arguments
7926 `(#:jar-name "osgi-namespace-contract.jar"
7927 #:tests? #f)); no tests
7928 (home-page "https://www.osgi.org")
7929 (synopsis "Contract Capability and Requirement Namespace")
7930 (description
7931 "OSGi, for Open Services Gateway initiative framework, is a module system
7932 and service platform for the Java programming language. This package contains
7933 the names for the attributes and directives for a namespace with contracts.")
7934 (license license:asl2.0)))
7935
7936 (define-public java-osgi-namespace-extender
7937 (package
7938 (name "java-osgi-namespace-extender")
7939 (version "1.0.1")
7940 (source (origin
7941 (method url-fetch)
7942 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7943 "org.osgi.namespace.extender/"
7944 version "/org.osgi.namespace.extender-"
7945 version "-sources.jar"))
7946 (sha256
7947 (base32
7948 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7949 (build-system ant-build-system)
7950 (inputs
7951 `(("resource" ,java-osgi-resource)
7952 ("annotation" ,java-osgi-annotation)))
7953 (arguments
7954 `(#:jar-name "osgi-namespace-extendent.jar"
7955 #:tests? #f)); no tests
7956 (home-page "https://www.osgi.org")
7957 (synopsis "Extender Capability and Requirement Namespace")
7958 (description
7959 "OSGi, for Open Services Gateway initiative framework, is a module system
7960 and service platform for the Java programming language. This package contains
7961 the names for the attributes and directives for an extender namespace.")
7962 (license license:asl2.0)))
7963
7964 (define-public java-osgi-namespace-service
7965 (package
7966 (name "java-osgi-namespace-service")
7967 (version "1.0.0")
7968 (source (origin
7969 (method url-fetch)
7970 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7971 "org.osgi.namespace.service/"
7972 version "/org.osgi.namespace.service-"
7973 version "-sources.jar"))
7974 (sha256
7975 (base32
7976 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7977 (build-system ant-build-system)
7978 (inputs
7979 `(("resource" ,java-osgi-resource)
7980 ("annotation" ,java-osgi-annotation)))
7981 (arguments
7982 `(#:jar-name "osgi-namespace-service.jar"
7983 #:tests? #f)); no tests
7984 (home-page "https://www.osgi.org")
7985 (synopsis "Service Capability and Requirement Namespace")
7986 (description
7987 "OSGi, for Open Services Gateway initiative framework, is a module system
7988 and service platform for the Java programming language. This package contains
7989 the names for the attributes and directives for a service namespace.")
7990 (license license:asl2.0)))
7991
7992 (define-public java-osgi-util-function
7993 (package
7994 (name "java-osgi-util-function")
7995 (version "1.0.0")
7996 (source (origin
7997 (method url-fetch)
7998 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7999 "org.osgi.util.function/"
8000 version "/org.osgi.util.function-"
8001 version "-sources.jar"))
8002 (sha256
8003 (base32
8004 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8005 (build-system ant-build-system)
8006 (arguments
8007 `(#:jar-name "osgi-util-function.jar"
8008 #:tests? #f)); no tests
8009 (inputs
8010 `(("annotation" ,java-osgi-annotation)))
8011 (home-page "https://www.osgi.org")
8012 (synopsis "OSGI Util Function")
8013 (description
8014 "OSGi, for Open Services Gateway initiative framework, is a module system
8015 and service platform for the Java programming language. This package contains
8016 an interface for a function that accepts a single argument and produces a result.")
8017 (license license:asl2.0)))
8018
8019 (define-public java-osgi-util-promise
8020 (package
8021 (name "java-osgi-util-promise")
8022 (version "1.0.0")
8023 (source (origin
8024 (method url-fetch)
8025 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8026 "org.osgi.util.promise/"
8027 version "/org.osgi.util.promise-"
8028 version "-sources.jar"))
8029 (sha256
8030 (base32
8031 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8032 (build-system ant-build-system)
8033 (arguments
8034 `(#:jar-name "osgi-util-promise.jar"
8035 #:tests? #f)); no tests
8036 (inputs
8037 `(("annotation" ,java-osgi-annotation)
8038 ("function" ,java-osgi-util-function)))
8039 (home-page "https://www.osgi.org")
8040 (synopsis "Promise of a value")
8041 (description
8042 "OSGi, for Open Services Gateway initiative framework, is a module system
8043 and service platform for the Java programming language. This package contains
8044 an interface and utilitary classes for promises. A Promise represents a future
8045 value. It handles the interactions for asynchronous processing.")
8046 (license license:asl2.0)))
8047
8048 (define-public java-osgi-service-metatype-annotations
8049 (package
8050 (name "java-osgi-service-metatype-annotations")
8051 (version "1.3.0")
8052 (source (origin
8053 (method url-fetch)
8054 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8055 "org.osgi.service.metatype.annotations/"
8056 version "/org.osgi.service.metatype.annotations-"
8057 version "-sources.jar"))
8058 (sha256
8059 (base32
8060 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8061 (build-system ant-build-system)
8062 (arguments
8063 `(#:jar-name "osgi-service-metatype-annotations.jar"
8064 #:tests? #f)); no tests
8065 (inputs
8066 `(("annotation" ,java-osgi-annotation)))
8067 (home-page "https://www.osgi.org")
8068 (synopsis "Support annotations for metatype")
8069 (description
8070 "OSGi, for Open Services Gateway initiative framework, is a module system
8071 and service platform for the Java programming language. This package contains
8072 the support annotations for metatype.")
8073 (license license:asl2.0)))
8074
8075 (define-public java-osgi-service-repository
8076 (package
8077 (name "java-osgi-service-repository")
8078 (version "1.1.0")
8079 (source (origin
8080 (method url-fetch)
8081 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8082 "org.osgi.service.repository/"
8083 version "/org.osgi.service.repository-"
8084 version "-sources.jar"))
8085 (sha256
8086 (base32
8087 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
8088 (build-system ant-build-system)
8089 (arguments
8090 `(#:jar-name "osgi-service-repository.jar"
8091 #:tests? #f)); no tests
8092 (inputs
8093 `(("annotation" ,java-osgi-annotation)
8094 ("promise" ,java-osgi-util-promise)
8095 ("resource" ,java-osgi-resource)))
8096 (home-page "https://www.osgi.org")
8097 (synopsis "OSGI service repository")
8098 (description
8099 "OSGi, for Open Services Gateway initiative framework, is a module system
8100 and service platform for the Java programming language. This package contains
8101 a repository service that contains resources.")
8102 (license license:asl2.0)))
8103
8104 (define-public java-osgi-framework
8105 (package
8106 (name "java-osgi-framework")
8107 (version "1.8.0")
8108 (source (origin
8109 (method url-fetch)
8110 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8111 "org.osgi.framework/" version "/org.osgi.framework-"
8112 version "-sources.jar"))
8113 (sha256
8114 (base32
8115 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
8116 (build-system ant-build-system)
8117 (arguments
8118 `(#:jar-name "osgi-framework.jar"
8119 #:tests? #f)); no tests
8120 (inputs
8121 `(("annotation" ,java-osgi-annotation)
8122 ("resource" ,java-osgi-resource)
8123 ("dto" ,java-osgi-dto)))
8124 (home-page "https://www.osgi.org")
8125 (synopsis "OSGi framework")
8126 (description
8127 "OSGi, for Open Services Gateway initiative framework, is a module system
8128 and service platform for the Java programming language.")
8129 (license license:asl2.0)))
8130
8131 (define-public java-osgi-service-log
8132 (package
8133 (name "java-osgi-service-log")
8134 (version "1.3.0")
8135 (source (origin
8136 (method url-fetch)
8137 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8138 "org.osgi.service.log/"
8139 version "/org.osgi.service.log-"
8140 version "-sources.jar"))
8141 (sha256
8142 (base32
8143 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
8144 (build-system ant-build-system)
8145 (arguments
8146 `(#:jar-name "osgi-service-log.jar"
8147 #:tests? #f)); no tests
8148 (inputs
8149 `(("java-osgi-framework" ,java-osgi-framework)))
8150 (home-page "https://www.osgi.org")
8151 (synopsis "Provides methods for bundles to write messages to the log")
8152 (description
8153 "OSGi, for Open Services Gateway initiative framework, is a module system
8154 and service platform for the Java programming language. This package contains
8155 the log service.")
8156 (license license:asl2.0)))
8157
8158 (define-public java-osgi-service-jdbc
8159 (package
8160 (name "java-osgi-service-jdbc")
8161 (version "1.0.0")
8162 (source (origin
8163 (method url-fetch)
8164 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8165 "org.osgi.service.jdbc/"
8166 version "/org.osgi.service.jdbc-"
8167 version "-sources.jar"))
8168 (sha256
8169 (base32
8170 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
8171 (build-system ant-build-system)
8172 (arguments
8173 `(#:jar-name "osgi-service-jdbc.jar"
8174 #:tests? #f)); no tests
8175 (home-page "https://www.osgi.org")
8176 (synopsis "Factory for JDBC connection factories")
8177 (description
8178 "OSGi, for Open Services Gateway initiative framework, is a module system
8179 and service platform for the Java programming language. This package contains
8180 a factory for JDBC connection factories. There are 3 preferred connection
8181 factories for getting JDBC connections:
8182
8183 @itemize
8184 @item @code{javax.sql.DataSource};
8185 @item @code{javax.sql.ConnectionPoolDataSource};
8186 @item @code{javax.sql.XADataSource}.
8187 @end itemize")
8188 (license license:asl2.0)))
8189
8190 (define-public java-osgi-service-resolver
8191 (package
8192 (name "java-osgi-service-resolver")
8193 (version "1.0.1")
8194 (source (origin
8195 (method url-fetch)
8196 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8197 "org.osgi.service.resolver/"
8198 version "/org.osgi.service.resolver-"
8199 version "-sources.jar"))
8200 (sha256
8201 (base32
8202 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
8203 (build-system ant-build-system)
8204 (arguments
8205 `(#:jar-name "osgi-service-resolver.jar"
8206 #:tests? #f)); no tests
8207 (inputs
8208 `(("annotation" ,java-osgi-annotation)
8209 ("resource" ,java-osgi-resource)))
8210 (home-page "https://www.osgi.org")
8211 (synopsis "OSGI Resolver service")
8212 (description
8213 "OSGi, for Open Services Gateway initiative framework, is a module system
8214 and service platform for the Java programming language. This package contains
8215 a resolver service that resolves the specified resources in the context supplied
8216 by the caller.")
8217 (license license:asl2.0)))
8218
8219 (define-public java-osgi-util-tracker
8220 (package
8221 (name "java-osgi-util-tracker")
8222 (version "1.5.1")
8223 (source (origin
8224 (method url-fetch)
8225 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8226 "org.osgi.util.tracker/"
8227 version "/org.osgi.util.tracker-"
8228 version "-sources.jar"))
8229 (sha256
8230 (base32
8231 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
8232 (build-system ant-build-system)
8233 (arguments
8234 `(#:jar-name "osgi-util-tracker.jar"
8235 #:tests? #f)); no tests
8236 (inputs
8237 `(("framework" ,java-osgi-framework)
8238 ("annotation" ,java-osgi-annotation)))
8239 (home-page "https://www.osgi.org")
8240 (synopsis "Bundle tracking")
8241 (description
8242 "OSGi, for Open Services Gateway initiative framework, is a module system
8243 and service platform for the Java programming language. This package contains
8244 bundle tracking utility classes.")
8245 (license license:asl2.0)))
8246
8247 (define-public java-osgi-service-cm
8248 (package
8249 (name "java-osgi-service-cm")
8250 (version "1.5.0")
8251 (source (origin
8252 (method url-fetch)
8253 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8254 "org.osgi.service.cm/"
8255 version "/org.osgi.service.cm-"
8256 version "-sources.jar"))
8257 (sha256
8258 (base32
8259 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
8260 (build-system ant-build-system)
8261 (arguments
8262 `(#:jar-name "osgi-service-cm.jar"
8263 #:tests? #f)); no tests
8264 (inputs
8265 `(("framework" ,java-osgi-framework)
8266 ("annotation" ,java-osgi-annotation)))
8267 (home-page "https://www.osgi.org")
8268 (synopsis "OSGI Configuration Management")
8269 (description
8270 "OSGi, for Open Services Gateway initiative framework, is a module system
8271 and service platform for the Java programming language. This package contains
8272 utility classes for the configuration of services.")
8273 (license license:asl2.0)))
8274
8275 (define-public java-osgi-service-packageadmin
8276 (package
8277 (name "java-osgi-service-packageadmin")
8278 (version "1.2.0")
8279 (source (origin
8280 (method url-fetch)
8281 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8282 "org.osgi.service.packageadmin/"
8283 version "/org.osgi.service.packageadmin-"
8284 version "-sources.jar"))
8285 (sha256
8286 (base32
8287 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
8288 (build-system ant-build-system)
8289 (arguments
8290 `(#:jar-name "osgi-service-packageadmin.jar"
8291 #:tests? #f)); no tests
8292 (inputs
8293 `(("framework" ,java-osgi-framework)))
8294 (home-page "https://www.osgi.org")
8295 (synopsis "OSGI Package Administration")
8296 (description
8297 "OSGi, for Open Services Gateway initiative framework, is a module system
8298 and service platform for the Java programming language. This package contains
8299 the packageadmin service.")
8300 (license license:asl2.0)))
8301
8302 (define-public java-ops4j-base-lang
8303 (package
8304 (name "java-ops4j-base-lang")
8305 (version "1.5.0")
8306 (source (origin
8307 (method url-fetch)
8308 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
8309 "archive/base-" version ".tar.gz"))
8310 (sha256
8311 (base32
8312 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
8313 (build-system ant-build-system)
8314 (arguments
8315 `(#:jar-name "java-ops4j-base-lang.jar"
8316 #:source-dir "ops4j-base-lang/src/main/java"
8317 #:tests? #f; no tests
8318 #:phases
8319 (modify-phases %standard-phases
8320 (add-before 'build 'add-test-file
8321 (lambda _
8322 ;; That file is required by a test in ops4j-pax-exam-core-spi
8323 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
8324 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
8325 (lambda _
8326 (display
8327 (string-append
8328 "version=" ,version "\n"
8329 "groupId=org.ops4j.base"
8330 "artifactId=ops4j-base-lang\n"))))
8331 #t)))))
8332 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
8333 (synopsis "Utility classes and extensions to be used in OPS4J projects")
8334 (description "OPS4J stands for Open Participation Software for Java. This
8335 package contains utilities and extensions related to @code{java.lang}.")
8336 (license license:asl2.0)))
8337
8338 (define-public java-ops4j-base-monitors
8339 (package
8340 (inherit java-ops4j-base-lang)
8341 (name "java-ops4j-base-monitors")
8342 (arguments
8343 `(#:jar-name "java-ops4j-base-monitors.jar"
8344 #:source-dir "ops4j-base-monitors/src/main/java"
8345 #:tests? #f)); no tests
8346 (inputs
8347 `(("lang" ,java-ops4j-base-lang)))
8348 (description "OPS4J stands for Open Participation Software for Java. This
8349 package contains utilities and extensions related to monitoring.")))
8350
8351 (define-public java-ops4j-base-io
8352 (package
8353 (inherit java-ops4j-base-lang)
8354 (name "java-ops4j-base-io")
8355 (arguments
8356 `(#:jar-name "java-ops4j-base-io.jar"
8357 #:source-dir "ops4j-base-io/src/main/java"
8358 #:test-dir "ops4j-base-io/src/test"
8359 #:test-exclude
8360 (list "**/ListerTest.java")))
8361 (inputs
8362 `(("lang" ,java-ops4j-base-monitors)
8363 ("lang" ,java-ops4j-base-lang)))
8364 (native-inputs
8365 `(("junit" ,java-junit)
8366 ("hamcrest" ,java-hamcrest-core)))
8367 (description "OPS4J stands for Open Participation Software for Java. This
8368 package contains utilities and extensions related to handling streams and files.")))
8369
8370 (define-public java-ops4j-base-util
8371 (package
8372 (inherit java-ops4j-base-lang)
8373 (name "java-ops4j-base-util")
8374 (arguments
8375 `(#:jar-name "java-ops4j-base-util.jar"
8376 #:source-dir "ops4j-base-util/src/main/java"
8377 #:test-dir "ops4j-base-util/src/test"))
8378 (inputs
8379 `(("lang" ,java-ops4j-base-lang)))
8380 (native-inputs
8381 `(("junit" ,java-junit)))
8382 (description "OPS4J stands for Open Participation Software for Java. This
8383 package contains utilities and extensions related to environment, i18n and
8384 mime types.")))
8385
8386 (define-public java-ops4j-base-util-property
8387 (package
8388 (inherit java-ops4j-base-lang)
8389 (name "java-ops4j-base-util-property")
8390 (arguments
8391 `(#:jar-name "java-ops4j-base-util-property.jar"
8392 #:source-dir "ops4j-base-util-property/src/main/java"
8393 #:tests? #f)); no tests
8394 (inputs
8395 `(("lang" ,java-ops4j-base-lang)
8396 ("util" ,java-ops4j-base-util)))
8397 (description "OPS4J stands for Open Participation Software for Java. This
8398 package contains utilities and extensions related to resolving properties from
8399 different sources.")))
8400
8401 (define-public java-ops4j-base-store
8402 (package
8403 (inherit java-ops4j-base-lang)
8404 (name "java-ops4j-base-store")
8405 (arguments
8406 `(#:jar-name "java-ops4j-base-store.jar"
8407 #:source-dir "ops4j-base-store/src/main/java"
8408 #:tests? #f)); no tests
8409 (inputs
8410 `(("lang" ,java-ops4j-base-lang)
8411 ("slf4j" ,java-slf4j-api)
8412 ("io" ,java-ops4j-base-io)))
8413 (description "OPS4J stands for Open Participation Software for Java. This
8414 package contains utilities for storing and retrieving data from an
8415 @code{InputStream}.")))
8416
8417 (define-public java-ops4j-base-spi
8418 (package
8419 (inherit java-ops4j-base-lang)
8420 (name "java-ops4j-base-spi")
8421 (arguments
8422 `(#:jar-name "java-ops4j-base-spi.jar"
8423 #:source-dir "ops4j-base-spi/src/main/java"
8424 #:test-dir "ops4j-base-spi/src/test"))
8425 (native-inputs
8426 `(("junit" ,java-junit)
8427 ("hamcrest" ,java-hamcrest-core)))
8428 (description "OPS4J stands for Open Participation Software for Java. This
8429 package contains utilities for obtaining services via the Java SE 6
8430 @code{ServiceLoader}.")))
8431
8432 (define-public java-aqute-bnd-annotation
8433 (package
8434 (name "java-aqute-bnd-annotation")
8435 (version "3.5.0")
8436 (source (origin
8437 (method url-fetch)
8438 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8439 version ".REL.tar.gz"))
8440 (file-name (string-append name "-" version ".tar.gz"))
8441 (sha256
8442 (base32
8443 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8444 (build-system ant-build-system)
8445 (arguments
8446 `(#:jar-name "java-aqute-bnd-annotation.jar"
8447 #:source-dir "biz.aQute.bnd.annotation/src"
8448 #:tests? #f)); empty test dir
8449 (home-page "https://bnd.bndtools.org/")
8450 (synopsis "Tools for OSGi")
8451 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8452 headers based on analyzing the class code, it verifies the project settings,
8453 it manages project dependencies, gives diffs jars, and much more.")
8454 (license license:asl2.0)))
8455
8456 (define-public java-aqute-libg
8457 (package
8458 (inherit java-aqute-bnd-annotation)
8459 (name "java-aqute-libg")
8460 (arguments
8461 `(#:jar-name "java-aqute-libg.jar"
8462 ;; The build fails when source/target more recent than 1.7. This
8463 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8464 ;;
8465 ;; It is closed as won't fix. There is no way to change the source
8466 ;; so that it works on 1.8, and still works on 1.6, the upstream
8467 ;; target. It work fine on 1.7, so we use 1.7.
8468 #:make-flags (list "-Dant.build.javac.source=1.7"
8469 "-Dant.build.javac.target=1.7")
8470 #:phases
8471 (modify-phases %standard-phases
8472 (add-before 'configure 'chdir
8473 ;; Change to aQute.libg directory, so that the relative
8474 ;; paths in the tests aren't broken.
8475 (lambda _
8476 (chdir "aQute.libg")
8477 #t))
8478 (add-before 'check 'create-test-directory
8479 ;; Copy the test directory to test/java, since that's where
8480 ;; ant-build-system's default project in build.xml expects to find
8481 ;; the test classes. Leave a copy in the original place to not
8482 ;; break paths in tests.
8483 (lambda _
8484 (mkdir "src/test")
8485 (copy-recursively "test" "src/test/java")
8486 #t)))))
8487 (inputs
8488 `(("slf4j" ,java-slf4j-api)
8489 ("osgi-annot" ,java-osgi-annotation)
8490 ("java-osgi-cmpn" ,java-osgi-cmpn)
8491 ("osgi" ,java-osgi-core)))
8492 (native-inputs
8493 `(("hamcrest" ,java-hamcrest-core)
8494 ("java-junit" ,java-junit)))))
8495
8496 (define-public java-aqute-bndlib
8497 (package
8498 (inherit java-aqute-bnd-annotation)
8499 (name "java-aqute-bndlib")
8500 (arguments
8501 `(#:jar-name "java-bndlib.jar"
8502 #:source-dir "biz.aQute.bndlib/src"
8503 #:tests? #f)); no tests
8504 (inputs
8505 `(("slf4j" ,java-slf4j-api)
8506 ("osgi-annot" ,java-osgi-annotation)
8507 ("java-aqute-libg" ,java-aqute-libg)
8508 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8509 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8510 ("java-osgi-service-repository" ,java-osgi-service-repository)
8511 ("java-osgi-service-log" ,java-osgi-service-log)
8512 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8513 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8514 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8515 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8516 ("promise" ,java-osgi-util-promise)
8517 ("osgi" ,java-osgi-core)))))
8518
8519 (define-public java-ops4j-pax-tinybundles
8520 (package
8521 (name "java-ops4j-pax-tinybundles")
8522 (version "2.1.1")
8523 (source (origin
8524 (method url-fetch)
8525 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8526 "archive/tinybundles-" version ".tar.gz"))
8527 (sha256
8528 (base32
8529 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8530 (arguments
8531 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8532 #:source-dir "src/main/java"
8533 #:test-exclude
8534 ;; Abstract base classes for other tests
8535 (list "**/BndTest.java" "**/CoreTest.java")
8536 #:phases
8537 (modify-phases %standard-phases
8538 (add-before 'check 'fix-version
8539 (lambda _
8540 ;; This test has a reference to an old version of bndlib we are not
8541 ;; packaging. It uses the version referenced in pom.xml. We replace
8542 ;; it with our own version.
8543 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8544 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8545 ,(package-version java-aqute-bndlib)))
8546 #t)))))
8547 (inputs
8548 `(("lang" ,java-ops4j-base-lang)
8549 ("io" ,java-ops4j-base-io)
8550 ("store" ,java-ops4j-base-store)
8551 ("slf4j" ,java-slf4j-api)
8552 ("libg" ,java-aqute-libg)
8553 ("bndlib" ,java-aqute-bndlib)))
8554 (native-inputs
8555 `(("junit" ,java-junit)
8556 ("hamcrest" ,java-hamcrest-core)
8557 ("log4j" ,java-log4j-api)
8558 ("bndannotation" ,java-aqute-bnd-annotation)
8559 ("framework" ,java-osgi-framework)))
8560 (build-system ant-build-system)
8561 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8562 (synopsis "Java APIs to create OSGi related artifacts")
8563 (description "Tinybundles is all about creating OSGi related artifacts like
8564 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8565 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8566 other hand, this library can be a foundation of real end user tools that need
8567 to create those artifacts.")
8568 (license license:asl2.0)))
8569
8570 (define-public java-ops4j-pax-exam-core
8571 (package
8572 (name "java-ops4j-pax-exam-core")
8573 (version "4.11.0")
8574 (source (origin
8575 (method url-fetch)
8576 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8577 "archive/exam-reactor-" version ".tar.gz"))
8578 (sha256
8579 (base32
8580 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8581 (arguments
8582 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8583 #:source-dir "core/pax-exam/src/main/java"
8584 #:test-dir "core/pax-exam/src/test"))
8585 (inputs
8586 `(("slf4j" ,java-slf4j-api)
8587 ("lang" ,java-ops4j-base-lang)
8588 ("io" ,java-ops4j-base-io)
8589 ("util-property" ,java-ops4j-base-util-property)
8590 ("util-store" ,java-ops4j-base-store)
8591 ("java-osgi-core" ,java-osgi-core)))
8592 (native-inputs
8593 `(("junit" ,java-junit)
8594 ("hamcrest" ,java-hamcrest-core)))
8595 (build-system ant-build-system)
8596 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8597 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8598 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8599 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8600 the system under test at the same time.")
8601 (license license:asl2.0)))
8602
8603 (define-public java-ops4j-pax-exam-core-spi
8604 (package
8605 (inherit java-ops4j-pax-exam-core)
8606 (name "java-ops4j-pax-exam-core-spi")
8607 (arguments
8608 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8609 #:source-dir "src/main/java"
8610 #:test-exclude
8611 (list
8612 ;; Abstract base class, not a test
8613 "**/BaseStagedReactorTest.java"
8614 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8615 "**/WarBuilderTest.java")
8616 #:phases
8617 (modify-phases %standard-phases
8618 (add-before 'configure 'chdir
8619 (lambda _
8620 ;; Tests assume we are in this directory
8621 (chdir "core/pax-exam-spi")
8622 #t))
8623 (add-before 'check 'fix-tests
8624 (lambda _
8625 ;; One test checks that this file is present.
8626 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8627 (with-output-to-file
8628 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8629 (lambda _
8630 (display
8631 (string-append "artifactId = pax-exam-spi\n"
8632 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8633 ;; Maven puts compilation results in the target directory, while we
8634 ;; put them in the build directory.
8635 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8636 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8637 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8638 (("target") "build"))
8639 ;; One test is expected to fail, but it doesn't throw the expected exception
8640 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8641 (("AssertionError") "IllegalArgumentException"))
8642 #t)))))
8643 (inputs
8644 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8645 ("lang" ,java-ops4j-base-lang)
8646 ("monitors" ,java-ops4j-base-monitors)
8647 ("store" ,java-ops4j-base-store)
8648 ("io" ,java-ops4j-base-io)
8649 ("spi" ,java-ops4j-base-spi)
8650 ("osgi" ,java-osgi-core)
8651 ("slf4j" ,java-slf4j-api)
8652 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8653 (native-inputs
8654 `(("mockito" ,java-mockito-1)
8655 ("junit" ,java-junit)
8656 ("hamcrest" ,java-hamcrest-core)
8657 ("cglib" ,java-cglib)
8658 ("objenesis" ,java-objenesis)
8659 ("asm" ,java-asm)))))
8660
8661 (define-public java-ops4j-pax-exam-core-junit
8662 (package
8663 (inherit java-ops4j-pax-exam-core)
8664 (name "java-ops4j-pax-exam-core-junit")
8665 (arguments
8666 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8667 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8668 #:tests? #f)); no tests
8669 (inputs
8670 `(("junit" ,java-junit)
8671 ("slf4j" ,java-slf4j-api)
8672 ("core" ,java-ops4j-pax-exam-core)
8673 ("spi" ,java-ops4j-pax-exam-core-spi)))
8674 (native-inputs '())))
8675
8676 (define-public java-fasterxml-jackson-annotations
8677 (package
8678 (name "java-fasterxml-jackson-annotations")
8679 (version "2.9.4")
8680 (source (origin
8681 (method url-fetch)
8682 (uri (string-append "https://github.com/FasterXML/"
8683 "jackson-annotations/archive/"
8684 "jackson-annotations-" version ".tar.gz"))
8685 (sha256
8686 (base32
8687 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8688 (build-system ant-build-system)
8689 (arguments
8690 `(#:jar-name "jackson-annotations.jar"
8691 #:source-dir "src/main/java"
8692 #:test-dir "src/test"))
8693 (native-inputs
8694 `(("junit" ,java-junit)))
8695 (home-page "https://github.com/FasterXML/jackson-annotations")
8696 (synopsis "General purpose annotations for the Jackson Data Processor")
8697 (description "This package contains general purpose annotations for the
8698 Jackson Data Processor, used on value and handler types. The only annotations
8699 not included are ones that require dependency to the Databind package.")
8700 (license license:asl2.0)))
8701
8702 (define-public java-fasterxml-jackson-core
8703 (package
8704 (name "java-fasterxml-jackson-core")
8705 (version "2.9.4")
8706 (source (origin
8707 (method url-fetch)
8708 (uri (string-append "https://github.com/FasterXML/"
8709 "jackson-core/archive/"
8710 "jackson-core-" version ".tar.gz"))
8711 (sha256
8712 (base32
8713 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8714 (build-system ant-build-system)
8715 (arguments
8716 `(#:jar-name "jackson-core.jar"
8717 #:source-dir "src/main/java"
8718 #:test-dir "src/test"
8719 #:test-exclude
8720 (list
8721 ;; Expected failure. pom.xml excludes these
8722 "**/failing/**"
8723 ;; Base classes that have no constructor for junit
8724 "**/BaseTest.java"
8725 "**/ConcurrencyReadTest.java"
8726 "**/ManualCharAccessTest.java"
8727 "**/ManualCharAccessTest.java"
8728 "**/TrailingCommasTest.java"
8729 "**/AsyncMissingValuesInObjectTest.java"
8730 "**/AsyncMissingValuesInArrayTest.java")
8731 #:phases
8732 (modify-phases %standard-phases
8733 (add-before 'configure 'generate-PackageVersion.java
8734 (lambda _
8735 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8736 (in (string-append out ".in")))
8737 (copy-file in out)
8738 (substitute* out
8739 (("@package@") "com.fasterxml.jackson.core.json")
8740 (("@projectversion@") ,version)
8741 (("@projectgroupid@") "com.fasterxml.jackson.core")
8742 (("@projectartifactid@") "jackson-core")))
8743 #t))
8744 (add-before 'build 'copy-resources
8745 (lambda _
8746 (copy-recursively "src/main/resources"
8747 "build/classes")
8748 #t))
8749 (add-before 'check 'copy-test-resources
8750 (lambda _
8751 (copy-recursively "src/test/resources"
8752 "build/test-classes")
8753 #t)))))
8754 (native-inputs
8755 `(("junit" ,java-junit)
8756 ("hamcrest" ,java-hamcrest-core)))
8757 (home-page "https://github.com/FasterXML/jackson-core")
8758 (synopsis "")
8759 (description "")
8760 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8761
8762 (define-public java-fasterxml-jackson-databind
8763 (package
8764 (name "java-fasterxml-jackson-databind")
8765 (version "2.9.4")
8766 (source (origin
8767 (method url-fetch)
8768 (uri (string-append "https://github.com/FasterXML/"
8769 "jackson-databind/archive/"
8770 "jackson-databind-" version ".tar.gz"))
8771 (sha256
8772 (base32
8773 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8774 (build-system ant-build-system)
8775 (arguments
8776 `(#:jar-name "jackson-databind.jar"
8777 #:source-dir "src/main/java"
8778 #:tests? #f; requires javax.measures for which I can't find a free implementation
8779 #:phases
8780 (modify-phases %standard-phases
8781 (add-before 'configure 'generate-PackageVersion.java
8782 (lambda _
8783 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8784 (in (string-append out ".in")))
8785 (copy-file in out)
8786 (substitute* out
8787 (("@package@") "com.fasterxml.jackson.databind.cfg")
8788 (("@projectversion@") ,version)
8789 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8790 (("@projectartifactid@") "jackson-databind")))
8791 #t))
8792 (add-before 'build 'copy-resources
8793 (lambda _
8794 (copy-recursively "src/main/resources" "build/classes")
8795 #t)))))
8796 (inputs
8797 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8798 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8799 (home-page "https://github.com/FasterXML/jackson-databind")
8800 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8801 (description "This package contains the general-purpose data-binding
8802 functionality and tree-model for Jackson Data Processor. It builds on core
8803 streaming parser/generator package, and uses Jackson Annotations for
8804 configuration.")
8805 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8806
8807 (define-public java-fasterxml-jackson-modules-base-jaxb
8808 (package
8809 (name "java-fasterxml-jackson-modules-base-jaxb")
8810 (version "2.9.4")
8811 (source (origin
8812 (method url-fetch)
8813 (uri (string-append "https://github.com/FasterXML/"
8814 "jackson-modules-base/archive/"
8815 "jackson-modules-base-" version ".tar.gz"))
8816 (sha256
8817 (base32
8818 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8819 (build-system ant-build-system)
8820 (arguments
8821 `(#:jar-name "jackson-modules-base-jaxb.jar"
8822 #:source-dir "jaxb/src/main/java"
8823 #:test-dir "jaxb/src/test"
8824 #:test-exclude
8825 ;; Base class for tests
8826 (list "**/BaseJaxbTest.java")
8827 #:phases
8828 (modify-phases %standard-phases
8829 (add-before 'configure 'generate-PackageVersion.java
8830 (lambda _
8831 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8832 "jackson/module/jaxb/PackageVersion.java"))
8833 (in (string-append out ".in")))
8834 (copy-file in out)
8835 (substitute* out
8836 (("@package@") "com.fasterxml.jackson.module.jaxb")
8837 (("@projectversion@") ,version)
8838 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8839 (("@projectartifactid@") "jackson-module-jaxb")))
8840 #t))
8841 (add-before 'build 'copy-resources
8842 (lambda _
8843 (copy-recursively "jaxb/src/main/resources" "build/classes")
8844 #t)))))
8845 (inputs
8846 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8847 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8848 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8849 (native-inputs
8850 `(("java-junit" ,java-junit)))
8851 (home-page "https://github.com/FasterXML/jackson-modules-base")
8852 (synopsis "Jaxb annotations jackson module")
8853 (description "This package is the jaxb annotations module for jackson.")
8854 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8855
8856 (define-public java-fasterxml-jackson-modules-base-mrbean
8857 (package
8858 (name "java-fasterxml-jackson-modules-base-mrbean")
8859 (version "2.9.4")
8860 (source (origin
8861 (method url-fetch)
8862 (uri (string-append "https://github.com/FasterXML/"
8863 "jackson-modules-base/archive/"
8864 "jackson-modules-base-" version ".tar.gz"))
8865 (sha256
8866 (base32
8867 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8868 (build-system ant-build-system)
8869 (arguments
8870 `(#:jar-name "jackson-modules-base-mrbean.jar"
8871 #:source-dir "mrbean/src/main/java"
8872 #:test-dir "mrbean/src/test"
8873 #:test-exclude
8874 ;; Base class for tests
8875 (list "**/BaseTest.java")
8876 #:phases
8877 (modify-phases %standard-phases
8878 (add-before 'configure 'generate-PackageVersion.java
8879 (lambda _
8880 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8881 "jackson/module/mrbean/PackageVersion.java"))
8882 (in (string-append out ".in")))
8883 (copy-file in out)
8884 (substitute* out
8885 (("@package@") "com.fasterxml.jackson.module.mrbean")
8886 (("@projectversion@") ,version)
8887 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8888 (("@projectartifactid@") "jackson-module-mrbean")))
8889 #t)))))
8890 (inputs
8891 `(("java-asm" ,java-asm)
8892 ("java-fasterxml-jackson-annotations"
8893 ,java-fasterxml-jackson-annotations)
8894 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8895 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8896 (native-inputs
8897 `(("java-junit" ,java-junit)))
8898 (home-page "https://github.com/FasterXML/jackson-modules-base")
8899 (synopsis "POJO type materialization for Java")
8900 (description "This package implements POJO type materialization.
8901 Databinders can construct implementation classes for Java interfaces as part
8902 of deserialization.")
8903 (license license:asl2.0)))
8904
8905 (define-public java-snakeyaml
8906 (package
8907 (name "java-snakeyaml")
8908 (version "1.18")
8909 (source (origin
8910 (method url-fetch)
8911 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8912 version ".tar.gz"))
8913 (file-name (string-append name "-" version ".tar.gz"))
8914 (sha256
8915 (base32
8916 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
8917 (build-system ant-build-system)
8918 (arguments
8919 `(#:jar-name "java-snakeyaml.jar"
8920 #:source-dir "src/main/java"
8921 ;; Tests require velocity, a cyclic dependency, and
8922 ;; java-spring-framework-context which is not packaged.
8923 #:tests? #f))
8924 (home-page "https://bitbucket.org/asomov/snakeyaml")
8925 (synopsis "YAML processor")
8926 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8927 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8928
8929 (define-public java-fasterxml-jackson-dataformat-yaml
8930 (package
8931 (name "java-fasterxml-jackson-dataformat-yaml")
8932 (version "2.9.4")
8933 (source (origin
8934 (method url-fetch)
8935 (uri (string-append "https://github.com/FasterXML/"
8936 "jackson-dataformats-text/archive/"
8937 "jackson-dataformats-text-" version ".tar.gz"))
8938 (sha256
8939 (base32
8940 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8941 (build-system ant-build-system)
8942 (arguments
8943 `(#:jar-name "jackson-dataformat-yaml.jar"
8944 #:source-dir "yaml/src/main/java"
8945 #:test-dir "yaml/src/test"
8946 #:test-exclude (list "**/failing/**.java")
8947 #:phases
8948 (modify-phases %standard-phases
8949 (add-before 'configure 'generate-PackageVersion.java
8950 (lambda _
8951 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8952 (in (string-append out ".in")))
8953 (copy-file in out)
8954 (substitute* out
8955 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8956 (("@projectversion@") ,version)
8957 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8958 (("@projectartifactid@") "jackson-dataformat-yaml")))
8959 #t)))))
8960 (inputs
8961 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8962 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8963 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8964 ("java-snakeyaml" ,java-snakeyaml)))
8965 (native-inputs
8966 `(("junit" ,java-junit)
8967 ("hamcrest" ,java-hamcrest-core)
8968 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8969 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8970 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8971 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8972 (synopsis "Yaml backend for Jackson")
8973 (description "Dataformat backends are used to support format alternatives
8974 to JSON, supported by default. This is done by sub-classing Jackson core
8975 abstractions.")
8976 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8977
8978 (define-public java-stax2-api
8979 (package
8980 (name "java-stax2-api")
8981 (version "4.0.0")
8982 (source (origin
8983 (method url-fetch)
8984 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8985 "stax2-api-" version ".tar.gz"))
8986 (sha256
8987 (base32
8988 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8989 (build-system ant-build-system)
8990 (arguments
8991 `(#:jar-name "java-stax2-api.jar"
8992 #:source-dir "src/main/java"
8993 #:tests? #f)); no tests
8994 (home-page "https://github.com/FasterXML/stax2-api")
8995 (synopsis "Stax2 API")
8996 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8997 significant new functionalities, such as full-featured bi-direction validation
8998 interface and high-performance Typed Access API.")
8999 (license license:bsd-2)))
9000
9001 (define-public java-woodstox-core
9002 (package
9003 (name "java-woodstox-core")
9004 (version "5.0.3")
9005 (source (origin
9006 (method url-fetch)
9007 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9008 "woodstox-core-" version ".tar.gz"))
9009 (sha256
9010 (base32
9011 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9012 (build-system ant-build-system)
9013 (arguments
9014 `(#:jar-name "woodstox.jar"
9015 #:test-exclude
9016 (list "**/Base*.java" "failing/**")
9017 #:phases
9018 (modify-phases %standard-phases
9019 (add-before 'build 'remove-msv-dep
9020 (lambda _
9021 ;; we don't need osgi, and it depends on msv
9022 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9023 ;; msv's latest release is from 2011 and we don't need it
9024 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9025 (delete-file-recursively "src/test/java/wstxtest/osgi")
9026 (delete-file-recursively "src/test/java/wstxtest/msv")
9027 #t))
9028 (add-before 'build 'copy-resources
9029 (lambda _
9030 (copy-recursively "src/main/resources" "build/classes")
9031 #t)))))
9032 (inputs
9033 `(("stax2" ,java-stax2-api)))
9034 (native-inputs
9035 `(("junit" ,java-junit)))
9036 (home-page "https://github.com/FasterXML/woodstox")
9037 (synopsis "Stax XML API implementation")
9038 (description "Woodstox is a stax XML API implementation.")
9039 (license license:asl2.0)))
9040
9041 (define-public java-fasterxml-jackson-dataformat-xml
9042 (package
9043 (name "java-fasterxml-jackson-dataformat-xml")
9044 (version "2.9.4")
9045 (source (origin
9046 (method url-fetch)
9047 (uri (string-append "https://github.com/FasterXML/"
9048 "jackson-dataformat-xml/archive/"
9049 "jackson-dataformat-xml-" version ".tar.gz"))
9050 (sha256
9051 (base32
9052 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
9053 (build-system ant-build-system)
9054 (arguments
9055 `(#:jar-name "jackson-dataformat-xml.jar"
9056 #:source-dir "src/main/java"
9057 #:test-exclude
9058 (list "**/failing/**")
9059 #:phases
9060 (modify-phases %standard-phases
9061 (add-before 'configure 'generate-PackageVersion.java
9062 (lambda _
9063 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9064 (in (string-append out ".in")))
9065 (copy-file in out)
9066 (newline)
9067 (substitute* out
9068 (("@package@") "com.fasterxml.jackson.dataformat.xml")
9069 (("@projectversion@") ,version)
9070 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
9071 (("@projectartifactid@") "jackson-dataformat-xml")))
9072 #t))
9073 (add-before 'build 'copy-resources
9074 (lambda _
9075 (copy-recursively "src/main/resources" "build/classes")
9076 #t)))))
9077 (inputs
9078 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
9079 ("jackson-core" ,java-fasterxml-jackson-core)
9080 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
9081 ("jackson-databind" ,java-fasterxml-jackson-databind)
9082 ("stax2-api" ,java-stax2-api)
9083 ("woodstox" ,java-woodstox-core)))
9084 (native-inputs
9085 `(("junit" ,java-junit)
9086 ("hamcrest" ,java-hamcrest-core)))
9087 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
9088 (synopsis "Read and write XML")
9089 (description "This package contains Jackson extension component for reading
9090 and writing XML encoded data.
9091
9092 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
9093 approach (that is, no support is added for \"Schema-first\" approach). Support
9094 for JAXB annotations is provided by JAXB annotation module; this module
9095 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
9096 @code{JsonFactory}) as well as small number of higher level overrides needed to
9097 make data-binding work.")
9098 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9099
9100 (define-public java-hdrhistogram
9101 (package
9102 (name "java-hdrhistogram")
9103 (version "2.1.9")
9104 (source (origin
9105 (method url-fetch)
9106 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
9107 "archive/HdrHistogram-" version ".tar.gz"))
9108 (sha256
9109 (base32
9110 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
9111 (build-system ant-build-system)
9112 (arguments
9113 `(#:jar-name "java-hdrhistogram.jar"
9114 #:source-dir "src/main/java"
9115 #:phases
9116 (modify-phases %standard-phases
9117 (add-before 'configure 'set-version
9118 (lambda _
9119 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
9120 (template (string-append version-java ".template")))
9121 (copy-file template version-java)
9122 (substitute* version-java
9123 (("\\$VERSION\\$") ,version)
9124 (("\\$BUILD_TIME\\$") "0"))
9125 #t))))))
9126 (native-inputs
9127 `(("junit" ,java-junit)
9128 ("hamcrest" ,java-hamcrest-core)))
9129 (home-page "https://hdrhistogram.github.io/HdrHistogram")
9130 (synopsis "High dynamic range histogram")
9131 (description "Hdrhistogram creates histograms that support
9132 recording and analyzing sampled data value counts across a configurable integer
9133 value range with configurable value precision within the range. Value precision
9134 is expressed as the number of significant digits in the value recording, and
9135 provides control over value quantization behavior across the value range and
9136 the subsequent value resolution at any given level.")
9137 (license license:public-domain)))
9138
9139 (define-public java-cofoja
9140 (package
9141 (name "java-cofoja")
9142 (version "1.3")
9143 (source (origin
9144 (method git-fetch)
9145 (uri (git-reference
9146 (url "https://github.com/nhatminhle/cofoja")
9147 (commit (string-append "v" version))))
9148 (file-name (string-append "java-cofoja-" version "-checkout"))
9149 (sha256
9150 (base32
9151 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
9152 (build-system ant-build-system)
9153 (arguments
9154 `(#:build-target "dist"
9155 #:test-target "test"
9156 #:jdk ,icedtea-8
9157 #:make-flags
9158 (list "-Ddist.dir=dist")
9159 #:modules ((guix build ant-build-system)
9160 (guix build java-utils)
9161 (guix build utils)
9162 (srfi srfi-1)
9163 (ice-9 match))
9164 #:phases
9165 (modify-phases %standard-phases
9166 ;; The bulid system ignores the class path the ant-build-system sets
9167 ;; up and instead expects to find all dependencies in the "lib"
9168 ;; directory.
9169 (add-after 'unpack 'create-libdir
9170 (lambda* (#:key inputs #:allow-other-keys)
9171 (mkdir-p "lib")
9172 (for-each
9173 (lambda (file)
9174 (let ((target (string-append "lib/" (basename file))))
9175 (unless (file-exists? target)
9176 (symlink file target))))
9177 (append-map (match-lambda
9178 ((label . dir)
9179 (find-files dir "\\.jar$")))
9180 inputs))
9181 #t))
9182 (replace 'install (install-jars "dist")))))
9183 (inputs
9184 `(("java-asm" ,java-asm)))
9185 (native-inputs
9186 `(("java-junit" ,java-junit)))
9187 (home-page "https://github.com/nhatminhle/cofoja")
9188 (synopsis "Contracts for Java")
9189 (description "Contracts for Java, or Cofoja for short, is a contract
9190 programming framework and test tool for Java, which uses annotation processing
9191 and bytecode instrumentation to provide run-time checking. (In particular,
9192 this is not a static analysis tool.)")
9193 (license license:lgpl3+)))
9194
9195 (define-public java-aopalliance
9196 (package
9197 (name "java-aopalliance")
9198 (version "1.0")
9199 (source (origin
9200 (method git-fetch)
9201 ;; Note: this git repository is not official, but contains the
9202 ;; source code that is in the CVS repository. Downloading the
9203 ;; tarball from sourceforge is undeterministic, and the cvs download
9204 ;; fails.
9205 (uri (git-reference
9206 (url "https://github.com/hoverruan/aopalliance")
9207 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
9208 (file-name (string-append name "-" version))
9209 (sha256
9210 (base32
9211 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
9212 (build-system ant-build-system)
9213 (arguments
9214 `(#:jar-name "java-aopalliance.jar"
9215 #:jdk ,icedtea-8
9216 #:tests? #f; no tests
9217 #:source-dir "aopalliance/src/main"
9218 #:modules ((guix build ant-build-system)
9219 (guix build utils)
9220 (guix build maven pom)
9221 (guix build java-utils)
9222 (sxml simple))
9223 #:phases
9224 (modify-phases %standard-phases
9225 (add-before 'install 'create-pom
9226 (lambda _
9227 (with-output-to-file "pom.xml"
9228 (lambda _
9229 (sxml->xml
9230 `((project
9231 (modelVersion "4.0.0")
9232 (name "aopalliance")
9233 (groupId "aopalliance")
9234 (artifactId "aopalliance")
9235 (version "1.0"))))))
9236 #t))
9237 (replace 'install
9238 (install-from-pom "pom.xml")))))
9239 (home-page "http://aopalliance.sourceforge.net")
9240 (synopsis "Aspect-Oriented Programming")
9241 (description "The AOP Alliance project is a joint project between several
9242 software engineering people who are interested in Aspect-Oriented Programming
9243 (AOP) and Java.")
9244 (license license:public-domain)))
9245
9246 (define-public java-javax-inject
9247 (package
9248 (name "java-javax-inject")
9249 (version "1")
9250 (source (origin
9251 (method git-fetch)
9252 (uri (git-reference
9253 (url "https://github.com/javax-inject/javax-inject")
9254 (commit version)))
9255 (file-name (git-file-name name version))
9256 (sha256
9257 (base32
9258 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
9259 (build-system ant-build-system)
9260 (arguments
9261 `(#:jar-name "java-javax-inject.jar"
9262 #:tests? #f; no tests
9263 #:phases
9264 (modify-phases %standard-phases
9265 (replace 'install
9266 (install-from-pom "pom.xml")))))
9267 (home-page "https://github.com/javax-inject/javax-inject")
9268 (synopsis "JSR-330: Dependency Injection for Java")
9269 (description "This package specifies a means for obtaining objects in such
9270 a way as to maximize reusability, testability and maintainability compared to
9271 traditional approaches such as constructors, factories, and service locators
9272 (e.g., JNDI). This process, known as dependency injection, is beneficial to
9273 most nontrivial applications.
9274
9275 Many types depend on other types. For example, a @var{Stopwatch} might depend
9276 on a @var{TimeSource}. The types on which a type depends are known as its
9277 dependencies. The process of finding an instance of a dependency to use at run
9278 time is known as resolving the dependency. If no such instance can be found,
9279 the dependency is said to be unsatisfied, and the application is broken.")
9280 (license license:asl2.0)))
9281
9282 (define-public java-guice
9283 (package
9284 (name "java-guice")
9285 (version "4.1")
9286 (source (origin
9287 (method git-fetch)
9288 (uri (git-reference
9289 (url "https://github.com/google/guice")
9290 (commit version)))
9291 (file-name (git-file-name name version))
9292 (modules '((guix build utils)))
9293 (snippet
9294 `(begin
9295 (for-each delete-file (find-files "." ".*.jar")) #t))
9296 (sha256
9297 (base32
9298 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
9299 (build-system ant-build-system)
9300 (arguments
9301 `(#:jar-name "java-guice.jar"
9302 #:jdk ,icedtea-8
9303 #:tests? #f; FIXME: tests are not in a java sub directory
9304 #:source-dir "core/src"
9305 #:phases
9306 (modify-phases %standard-phases
9307 (add-after 'unpack 'make-files-writable
9308 (lambda _
9309 (for-each make-file-writable (find-files "."))
9310 #t))
9311 (replace 'install
9312 (install-from-pom "core/pom.xml")))))
9313 (propagated-inputs
9314 `(("java-aopalliance" ,java-aopalliance)
9315 ("java-asm" ,java-asm)
9316 ("java-cglib" ,java-cglib)
9317 ("java-guava" ,java-guava)
9318 ("java-javax-inject" ,java-javax-inject)
9319 ("java-guice-parent-pom" ,java-guice-parent-pom)))
9320 (home-page "https://github.com/google/guice")
9321 (synopsis "Lightweight dependency injection framework")
9322 (description "Guice is a lightweight dependency injection framework for
9323 Java 6 and above.")
9324 (license license:asl2.0)))
9325
9326 (define-public java-guice-servlet
9327 (package
9328 (inherit java-guice)
9329 (name "java-guice-servlet")
9330 (arguments
9331 `(#:jar-name "guice-servlet.jar"
9332 #:source-dir "extensions/servlet/src/"
9333 #:jdk ,icedtea-8
9334 #:tests? #f ; FIXME: not in a java subdir
9335 #:phases
9336 (modify-phases %standard-phases
9337 (add-after 'unpack 'make-files-writable
9338 (lambda _
9339 (for-each make-file-writable (find-files "."))
9340 #t)))))
9341 (inputs
9342 `(("guice" ,java-guice)
9343 ("servlet" ,java-classpathx-servletapi)
9344 ,@(package-inputs java-guice)))))
9345
9346 (define java-guice-parent-pom
9347 (package
9348 (inherit java-guice)
9349 (name "java-guice-parent-pom")
9350 (arguments
9351 `(#:tests? #f
9352 #:phases
9353 (modify-phases %standard-phases
9354 (delete 'configure)
9355 (delete 'build)
9356 (add-after 'install 'install-extensions
9357 (install-pom-file "extensions/pom.xml"))
9358 (replace 'install
9359 (install-pom-file "pom.xml")))))
9360 (propagated-inputs
9361 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
9362
9363 (define java-google-parent-pom-5
9364 (package
9365 (name "java-google-parent-pom")
9366 (version "5")
9367 (source (origin
9368 (method git-fetch)
9369 (uri (git-reference
9370 (url "https://github.com/google/google-maven-parents")
9371 (commit (string-append "google-" version))))
9372 (file-name (git-file-name name version))
9373 (sha256
9374 (base32
9375 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
9376 (build-system ant-build-system)
9377 (arguments
9378 `(#:tests? #f
9379 #:phases
9380 (modify-phases %standard-phases
9381 (delete 'configure)
9382 (delete 'build)
9383 (replace 'install
9384 (install-pom-file "pom.xml")))))
9385 (home-page "https://github.com/google/google-maven-parents")
9386 (synopsis "Google parent pom")
9387 (description "This package contains the Maven parent POM for other Google
9388 Java projects.")
9389 (license license:asl2.0)))
9390
9391 (define-public java-assertj
9392 (package
9393 (name "java-assertj")
9394 (version "3.8.0")
9395 (source (origin
9396 (method git-fetch)
9397 (uri (git-reference
9398 (url "https://github.com/joel-costigliola/assertj-core")
9399 (commit (string-append "assertj-core-" version))))
9400 (file-name (git-file-name name version))
9401 (sha256
9402 (base32
9403 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
9404 (build-system ant-build-system)
9405 (arguments
9406 `(#:jar-name "java-assertj.jar"
9407 #:jdk ,icedtea-8
9408 #:source-dir "src/main/java"
9409 #:tests? #f)); depends on tng-junit which depends on assertj
9410 (inputs
9411 `(("cglib" ,java-cglib)
9412 ("junit" ,java-junit)
9413 ("hamcrest" ,java-hamcrest-core)))
9414 (native-inputs
9415 `(("mockito" ,java-mockito-1)))
9416 (home-page "https://joel-costigliola.github.io/assertj/index.html")
9417 (synopsis "Fluent assertions for java")
9418 (description "AssertJ core is a Java library that provides a fluent
9419 interface for writing assertions. Its main goal is to improve test code
9420 readability and make maintenance of tests easier.")
9421 (license license:asl2.0)))
9422
9423 (define-public java-jboss-javassist
9424 (package
9425 (name "java-jboss-javassist")
9426 (version "3.21.0")
9427 (source (origin
9428 (method git-fetch)
9429 (uri (git-reference
9430 (url "https://github.com/jboss-javassist/javassist")
9431 (commit
9432 (string-append "rel_"
9433 (string-map
9434 (lambda (x) (if (eq? x #\.) #\_ x)) version)
9435 "_ga"))))
9436 (file-name (git-file-name name version))
9437 (sha256
9438 (base32
9439 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
9440 (modules '((guix build utils)))
9441 (snippet
9442 '(begin
9443 (delete-file "javassist.jar")))))
9444 (build-system ant-build-system)
9445 (arguments
9446 `(#:jar-name "java-jboss-javassist.jar"
9447 #:jdk ,icedtea-8
9448 #:source-dir "src/main"
9449 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
9450 #:phases
9451 (modify-phases %standard-phases
9452 (add-after 'unpack 'make-files-writable
9453 (lambda _
9454 (for-each make-file-writable (find-files "."))
9455 #t)))))
9456 (native-inputs
9457 `(("junit" ,java-junit)))
9458 (home-page "https://github.com/jboss-javassist/javassist")
9459 (synopsis "Java bytecode engineering toolkit")
9460 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9461 manipulation simple. It is a class library for editing bytecodes in Java; it
9462 enables Java programs to define a new class at runtime and to modify a class
9463 file when the JVM loads it.")
9464 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
9465
9466 (define-public java-jcommander
9467 (package
9468 (name "java-jcommander")
9469 (version "1.71")
9470 (source (origin
9471 (method git-fetch)
9472 (uri (git-reference
9473 (url "https://github.com/cbeust/jcommander")
9474 (commit version)))
9475 (file-name (git-file-name name version))
9476 (sha256
9477 (base32
9478 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
9479 (build-system ant-build-system)
9480 (arguments
9481 `(#:jar-name "java-jcommander.jar"
9482 #:jdk ,icedtea-8
9483 #:tests? #f; requires testng which depends on jcommander
9484 #:source-dir "src/main/java"))
9485 (home-page "https://jcommander.org")
9486 (synopsis "Command line parameters parser")
9487 (description "JCommander is a very small Java framework that makes it
9488 trivial to parse command line parameters. Parameters are declared with
9489 annotations.")
9490 (license license:asl2.0)))
9491
9492 (define-public java-bsh
9493 (package
9494 (name "java-bsh")
9495 (version "2.0b6")
9496 (source (origin
9497 (method git-fetch)
9498 (uri (git-reference
9499 (url "https://github.com/beanshell/beanshell")
9500 (commit version)))
9501 (file-name (git-file-name name version))
9502 (sha256
9503 (base32
9504 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
9505 (modules '((guix build utils)))
9506 (snippet
9507 '(begin
9508 ;; Delete bundled third-party jar archives.
9509 (for-each delete-file (find-files "." ".*.jar$"))
9510 (for-each (lambda (file) (chmod file #o644))
9511 (find-files "." "."))
9512 #t))))
9513 (build-system ant-build-system)
9514 (arguments
9515 `(#:build-target "jarall"
9516 #:test-target "junit-tests-all"
9517 #:phases
9518 (modify-phases %standard-phases
9519 (add-before 'install 'fix-pom
9520 (lambda _
9521 (substitute* "pom.xml"
9522 (("org.apache-extras.beanshell") "org.beanshell"))
9523 #t))
9524 (replace 'install
9525 (lambda* (#:key outputs #:allow-other-keys)
9526 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9527 (mkdir-p share)
9528 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9529 #t))))))
9530 (inputs
9531 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
9532 ("java-commons-bsf" ,java-commons-bsf)))
9533 (native-inputs
9534 `(("java-junit" ,java-junit)
9535 ("javacc" ,javacc-3)))
9536 (home-page "http://beanshell.org/")
9537 (synopsis "Lightweight Scripting for Java")
9538 (description "BeanShell is a small, free, embeddable Java source
9539 interpreter with object scripting language features, written in Java.
9540 BeanShell dynamically executes standard Java syntax and extends it with common
9541 scripting conveniences such as loose types, commands, and method closures like
9542 those in Perl and JavaScript.")
9543 (license license:asl2.0)))
9544
9545 (define-public java-fest-util
9546 (package
9547 (name "java-fest-util")
9548 (version "1.2.5")
9549 (source (origin
9550 (method git-fetch)
9551 (uri (git-reference
9552 (url "https://github.com/alexruiz/fest-util/")
9553 (commit (string-append "fest-util-" version))))
9554 (file-name (git-file-name name version))
9555 (sha256
9556 (base32
9557 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
9558 (build-system ant-build-system)
9559 (arguments
9560 `(#:jar-name "java-fest-util.jar"
9561 #:source-dir "src/main/java"))
9562 (native-inputs
9563 `(("junit" ,java-junit)
9564 ("hamcrest" ,java-hamcrest-core)))
9565 (home-page "https://github.com/alexruiz/fest-util")
9566 (synopsis "FEST common utilities")
9567 (description "Common utilities used in all FEST module.")
9568 (license license:asl2.0)))
9569
9570 (define-public java-fest-test
9571 (package
9572 (name "java-fest-test")
9573 (version "2.1.0")
9574 (source (origin
9575 (method git-fetch)
9576 (uri (git-reference
9577 (url "https://github.com/alexruiz/fest-test/")
9578 (commit (string-append "fest-test-" version))))
9579 (file-name (git-file-name name version))
9580 (sha256
9581 (base32
9582 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
9583 (build-system ant-build-system)
9584 (arguments
9585 `(#:jar-name "java-fest-test.jar"
9586 #:source-dir "src/main/java"
9587 #:tests? #f)); no tests
9588 (inputs
9589 `(("junit" ,java-junit)))
9590 (home-page "https://github.com/alexruiz/fest-test")
9591 (synopsis "Common FEST testing infrastructure")
9592 (description "Fest-test contains the common FEST testing infrastructure.")
9593 (license license:asl2.0)))
9594
9595 (define-public java-fest-assert
9596 (package
9597 (name "java-fest-assert")
9598 (version "2.0M10")
9599 (source (origin
9600 (method git-fetch)
9601 (uri (git-reference
9602 (url "https://github.com/alexruiz/fest-assert-2.x/")
9603 (commit (string-append "fest-assert-core-" version))))
9604 (file-name (git-file-name name version))
9605 (sha256
9606 (base32
9607 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
9608 (build-system ant-build-system)
9609 (arguments
9610 `(#:jar-name "java-fest-assert.jar"
9611 #:source-dir "src/main/java"
9612 #:test-exclude
9613 (list
9614 "**/Abstract*.java"
9615 "**/*BaseTest.java"
9616 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9617 "**/MessageFormatter_format_Test.java"
9618 "**/internal/*/*_assert*_Test.java")))
9619 (inputs
9620 `(("java-fest-util" ,java-fest-util)))
9621 (native-inputs
9622 `(("java-junit" ,java-junit)
9623 ("java-fest-test" ,java-fest-test)
9624 ("java-hamcrest-core" ,java-hamcrest-core)
9625 ("java-mockito" ,java-mockito-1)
9626 ("java-cglib" ,java-cglib)
9627 ("java-objenesis" ,java-objenesis)
9628 ("java-asm" ,java-asm)))
9629 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9630 (synopsis "FEST fluent assertions")
9631 (description "FEST-Assert provides a fluent interface for assertions.")
9632 (license license:asl2.0)))
9633
9634 (define-public java-testng
9635 (package
9636 (name "java-testng")
9637 (version "6.14.3")
9638 (source (origin
9639 (method git-fetch)
9640 (uri (git-reference
9641 (url "https://github.com/cbeust/testng")
9642 (commit version)))
9643 (file-name (string-append name "-" version "-checkout"))
9644 (sha256
9645 (base32
9646 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
9647 (build-system ant-build-system)
9648 (arguments
9649 `(#:jdk ,icedtea-8; java.util.function
9650 #:jar-name "java-testng.jar"
9651 #:source-dir "src/main/java"
9652 #:phases
9653 (modify-phases %standard-phases
9654 ;; FIXME: I don't know why these tests fail
9655 (add-after 'unpack 'delete-failing-tests
9656 (lambda _
9657 (substitute* "src/test/resources/testng.xml"
9658 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9659 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9660 #t))
9661 ;; We don't have groovy
9662 (add-after 'unpack 'delete-groovy-tests
9663 (lambda _
9664 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9665 (substitute* "src/test/resources/testng.xml"
9666 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9667 #t))
9668 (add-before 'build 'copy-resources
9669 (lambda _
9670 (copy-recursively "src/main/resources" "build/classes")
9671 #t))
9672 (add-before 'check 'copy-test-resources
9673 (lambda _
9674 (copy-recursively "src/test/resources" "build/test-classes")
9675 #t))
9676 (replace 'check
9677 (lambda _
9678 (invoke "ant" "compile-tests")
9679 ;; we don't have groovy
9680 (substitute* "src/test/resources/testng.xml"
9681 (("<class name=\"test.groovy.GroovyTest\" />") ""))
9682 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9683 ":build/classes"
9684 ":build/test-classes")
9685 "-Dtest.resources.dir=src/test/resources"
9686 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
9687 (propagated-inputs
9688 `(("junit" ,java-junit)
9689 ("java-jsr305" ,java-jsr305)
9690 ("java-bsh" ,java-bsh)
9691 ("java-jcommander" ,java-jcommander)
9692 ("java-guice" ,java-guice)
9693 ("snakeyaml" ,java-snakeyaml)))
9694 (native-inputs
9695 `(("guava" ,java-guava)
9696 ("java-javax-inject" ,java-javax-inject)
9697 ("java-hamcrest" ,java-hamcrest-all)
9698 ("java-assertj" ,java-assertj)
9699 ("java-mockito" ,java-mockito-1)
9700 ("cglib" ,java-cglib)
9701 ("asm" ,java-asm)
9702 ("aopalliance" ,java-aopalliance)))
9703 (home-page "https://testng.org")
9704 (synopsis "Testing framework")
9705 (description "TestNG is a testing framework inspired from JUnit and NUnit
9706 but introducing some new functionalities that make it more powerful and easier
9707 to use.")
9708 (license license:asl2.0)))
9709
9710 (define-public java-jnacl
9711 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9712 (revision "2"))
9713 (package
9714 (name "java-jnacl")
9715 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9716 (source (origin
9717 (method git-fetch)
9718 (uri (git-reference
9719 (url "https://github.com/neilalexander/jnacl")
9720 (commit commit)))
9721 (file-name (git-file-name name version))
9722 (sha256
9723 (base32
9724 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9725 (build-system ant-build-system)
9726 (arguments
9727 `(#:jar-name "jnacl.jar"
9728 #:source-dir "src/main/java"
9729 #:jdk ,icedtea-8
9730 #:phases
9731 (modify-phases %standard-phases
9732 (add-before 'build 'fix-tests
9733 (lambda _
9734 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9735 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9736 (("assertions.Assertions") "assertions.api.Assertions"))
9737 #t))
9738 (replace 'check
9739 (lambda _
9740 (invoke "ant" "compile-tests")
9741 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9742 ":build/classes"
9743 ":build/test-classes")
9744 "org.testng.TestNG" "-testclass"
9745 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9746 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9747 ":build/classes"
9748 ":build/test-classes")
9749 "org.testng.TestNG" "-testclass"
9750 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9751 (native-inputs
9752 `(("java-testng" ,java-testng)
9753 ("java-fest-util" ,java-fest-util)
9754 ("java-fest-assert" ,java-fest-assert)))
9755 (home-page "https://github.com/neilalexander/jnacl")
9756 (synopsis "Java implementation of NaCl")
9757 (description "Pure Java implementation of the NaCl: Networking and
9758 Cryptography library.")
9759 (license license:bsd-2))))
9760
9761 (define-public java-mvel2
9762 (package
9763 (name "java-mvel2")
9764 (version "2.3.1")
9765 (source (origin
9766 (method url-fetch)
9767 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9768 version ".Final.tar.gz"))
9769 (sha256
9770 (base32
9771 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9772 (build-system ant-build-system)
9773 (arguments
9774 `(#:jar-name "mvel2.jar"
9775 #:source-dir "src/main/java"
9776 #:test-exclude
9777 (list "**/Abstract*.java"
9778 ;; Base class with no tests
9779 "**/MVELThreadTest.java")
9780 #:phases
9781 (modify-phases %standard-phases
9782 (add-after 'install 'install-bin
9783 (lambda* (#:key outputs #:allow-other-keys)
9784 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9785 (mkdir-p bin)
9786 (with-output-to-file (string-append bin "/mvel2")
9787 (lambda _
9788 (display
9789 (string-append
9790 "#!" (which "bash") "\n"
9791 "if [ \"$#\" -ne \"2\" ]; then\n"
9792 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9793 "exit\n"
9794 "fi\n"
9795 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9796 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9797 " org.mvel2.sh.Main $1"))))
9798 (chmod (string-append bin "/mvel2") #o755))
9799 #t)))))
9800 (native-inputs
9801 `(("junit" ,java-junit)
9802 ("hamcrest" ,java-hamcrest-core)))
9803 (home-page "https://github.com/mvel/mvel")
9804 (synopsis "MVFLEX Expression Language")
9805 (description "MVEL has largely been inspired by Java syntax, but has some
9806 fundamental differences aimed at making it more efficient as an expression
9807 language, such as operators that directly support collection, array and string
9808 matching, as well as regular expressions. MVEL is used to evaluate expressions
9809 written using Java syntax.
9810
9811 In addition to the expression language, MVEL serves as a templating language for
9812 configuration and string construction.")
9813 (license license:asl2.0)))
9814
9815 (define-public java-commons-jexl-2
9816 (package
9817 (name "java-commons-jexl")
9818 (version "2.1.1")
9819 (source (origin
9820 (method url-fetch)
9821 (uri (string-append "mirror://apache/commons/jexl/source/"
9822 "commons-jexl-" version "-src.tar.gz"))
9823 (sha256
9824 (base32
9825 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9826 (build-system ant-build-system)
9827 (arguments
9828 `(#:jar-name "commons-jexl-2.jar"
9829 #:jdk ,icedtea-8
9830 #:source-dir "src/main/java"
9831 #:phases
9832 (modify-phases %standard-phases
9833 (add-before 'check 'disable-broken-tests
9834 (lambda* (#:key inputs #:allow-other-keys)
9835 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9836 (substitute* "ArithmeticTest.java"
9837 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9838 (("asserter.assertExpression\\(\"imanull") "//"))
9839 ;; This test fails with "ambiguous method invocation"
9840 (delete-file "CacheTest.java")
9841 ;; This test doesn't have access to the temp directory
9842 (substitute* "ClassCreatorTest.java"
9843 (("java.io.tmpdir") "user.dir"))
9844 ;; This test fails in trying to detect whether it can run.
9845 (substitute* "ClassCreator.java"
9846 (("boolean canRun =.*") "boolean canRun = false;\n"))
9847 ;; ...and these tests depend on it.
9848 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9849 (delete-file "scripting/JexlScriptEngineTest.java"))
9850 #t))
9851 (add-before 'build 'run-javacc
9852 (lambda _
9853 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9854 (invoke "java" "jjtree" "Parser.jjt")
9855 (invoke "java" "javacc" "Parser.jj"))
9856 #t)))))
9857 (inputs
9858 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9859 (native-inputs
9860 `(("java-junit" ,java-junit)
9861 ("java-hamcrest-core" ,java-hamcrest-core)
9862 ("javacc" ,javacc-4)))
9863 (home-page "https://commons.apache.org/proper/commons-jexl/")
9864 (synopsis "Java Expression Language ")
9865 (description "JEXL is a library intended to facilitate the implementation
9866 of dynamic and scripting features in applications and frameworks written in
9867 Java. JEXL implements an Expression Language based on some extensions to the
9868 JSTL Expression Language supporting most of the constructs seen in
9869 shell-script or ECMAScript. Its goal is to expose scripting features usable
9870 by technical operatives or consultants working with enterprise platforms.")
9871 (license license:asl2.0)))
9872
9873 (define-public java-lz4
9874 (package
9875 (name "java-lz4")
9876 (version "1.4.0")
9877 (source (origin
9878 (method git-fetch)
9879 (uri (git-reference
9880 (url "https://github.com/lz4/lz4-java")
9881 (commit version)))
9882 (file-name (git-file-name name version))
9883 (sha256
9884 (base32
9885 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
9886 (build-system ant-build-system)
9887 (arguments
9888 `(#:jar-name "lz4.jar"
9889 #:jdk ,icedtea-8
9890 #:source-dir "src/java:src/java-unsafe"
9891 #:tests? #f; FIXME: requires more dependencies
9892 #:phases
9893 (modify-phases %standard-phases
9894 (add-after 'unpack 'make-files-writable
9895 (lambda _
9896 (for-each make-file-writable (find-files "."))
9897 #t))
9898 (add-before 'configure 'generate-source
9899 (lambda _
9900 (with-directory-excursion "src/build/source_templates"
9901 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9902 #t)))))
9903 (native-inputs
9904 `(("mvel" ,java-mvel2)))
9905 (home-page "https://jpountz.github.io/lz4-java")
9906 (synopsis "Compression algorithm")
9907 (description "LZ4 - Java is a Java port of the popular lz4 compression
9908 algorithms and xxHash hashing algorithm.")
9909 (license license:asl2.0)))
9910
9911 (define-public java-bouncycastle
9912 (package
9913 (name "java-bouncycastle")
9914 (version "1.60")
9915 (source (origin
9916 (method git-fetch)
9917 (uri (git-reference
9918 (url "http://git.bouncycastle.org/repositories/bc-java")
9919 ;(url "https://github.com/bcgit/bc-java")
9920 (commit (string-append "r1rv" (substring version 2 4)))))
9921 (file-name (git-file-name name version))
9922 (sha256
9923 (base32
9924 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
9925 (modules '((guix build utils)))
9926 (snippet
9927 '(begin
9928 (for-each delete-file
9929 (find-files "." "\\.jar$"))
9930 #t))))
9931 (build-system ant-build-system)
9932 (arguments
9933 `(#:jdk ,icedtea-8
9934 #:tests? #f
9935 #:phases
9936 (modify-phases %standard-phases
9937 (replace 'build
9938 (lambda _
9939 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9940 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9941 ;; FIXME: the tests freeze.
9942 ;; (replace 'check
9943 ;; (lambda _
9944 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9945 (replace 'install
9946 (install-jars "build/artifacts/jdk1.5/jars")))))
9947 (inputs
9948 `(("java-javax-mail" ,java-javax-mail)))
9949 (native-inputs
9950 `(("unzip" ,unzip)
9951 ("junit" ,java-junit)
9952 ("java-native-access" ,java-native-access)
9953 ("java-native-access-platform" ,java-native-access-platform)))
9954 (home-page "https://www.bouncycastle.org")
9955 (synopsis "Cryptographic library")
9956 (description "Bouncy Castle is a cryptographic library for the Java
9957 programming language.")
9958 (license license:expat)))
9959
9960 (define-public java-lmax-disruptor
9961 (package
9962 (name "java-lmax-disruptor")
9963 (version "3.3.7")
9964 (source (origin
9965 (method url-fetch)
9966 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9967 "archive/" version ".tar.gz"))
9968 (file-name (string-append name "-" version ".tar.gz"))
9969 (sha256
9970 (base32
9971 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9972 (build-system ant-build-system)
9973 (arguments
9974 `(#:jar-name "java-lmax-disruptor.jar"
9975 #:jdk ,icedtea-8
9976 #:tests? #f)); tests hang
9977 (inputs
9978 `(("junit" ,java-junit)
9979 ("java-hdrhistogram" ,java-hdrhistogram)
9980 ("java-jmock" ,java-jmock)
9981 ("java-jmock-legacy" ,java-jmock-legacy)
9982 ("java-jmock-junit4" ,java-jmock-junit4)
9983 ("java-hamcrest-all" ,java-hamcrest-all)))
9984 (native-inputs
9985 `(("cglib" ,java-cglib)
9986 ("objenesis" ,java-objenesis)
9987 ("asm" ,java-asm)))
9988 (home-page "https://www.lmax.com/disruptor")
9989 (synopsis "High performance inter-thread communication")
9990 (description "LMAX Disruptor is a software pattern and software component
9991 for high performance inter-thread communication that avoids the need for
9992 message queues or resource locking.")
9993 (license license:asl2.0)))
9994
9995 (define-public java-commons-bcel
9996 (package
9997 (name "java-commons-bcel")
9998 (version "6.1")
9999 (source (origin
10000 (method url-fetch)
10001 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10002 version "-src.tar.gz"))
10003 (sha256
10004 (base32
10005 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10006 (build-system ant-build-system)
10007 (arguments
10008 `(#:jar-name "bcel.jar"
10009 #:jdk ,icedtea-8
10010 #:source-dir "src/main/java"
10011 #:test-dir "src/test/java"
10012 ;; FIXME: Tests require the unpackaged jna.
10013 #:tests? #f))
10014 (home-page "https://commons.apache.org/proper/commons-bcel/")
10015 (synopsis "Byte code engineering library")
10016 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10017 intended to give users a convenient way to analyze, create, and
10018 manipulate (binary) Java class files. Classes are represented by objects
10019 which contain all the symbolic information of the given class: methods, fields
10020 and byte code instructions, in particular.
10021
10022 Such objects can be read from an existing file, be transformed by a
10023 program (e.g. a class loader at run-time) and written to a file again. An
10024 even more interesting application is the creation of classes from scratch at
10025 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10026 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10027 of Java @code{.class} files.")
10028 (license license:asl2.0)))
10029
10030 (define-public java-xerial-core
10031 (package
10032 (name "java-xerial-core")
10033 (version "2.1")
10034 (source (origin
10035 (method url-fetch)
10036 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10037 version ".tar.gz"))
10038 (file-name (string-append name "-" version ".tar.gz"))
10039 (sha256
10040 (base32
10041 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10042 (build-system ant-build-system)
10043 (arguments
10044 `(#:jar-name "xerial-core.jar"
10045 #:source-dir "xerial-core/src/main/java"
10046 #:test-dir "xerial-core/src/test"
10047 #:phases
10048 (modify-phases %standard-phases
10049 (add-before 'build 'copy-resources
10050 (lambda _
10051 (copy-recursively "xerial-core/src/main/resources"
10052 "build/classes")
10053 #t)))))
10054 (native-inputs
10055 `(("junit" ,java-junit)
10056 ("hamcrest" ,java-hamcrest-core)))
10057 (home-page "https://github.com/xerial/xerial-java")
10058 (synopsis "Data management libraries for Java")
10059 (description "Xerial is a set of data management libraries for the Java
10060 programming language. The ultimate goal of the Xerial project is to manage
10061 everything as database, including class objects, text format data, data
10062 streams, etc.")
10063 (license license:asl2.0)))
10064
10065 (define-public java-powermock-reflect
10066 (package
10067 (name "java-powermock-reflect")
10068 (version "1.7.3")
10069 (source (origin
10070 (method url-fetch)
10071 (uri (string-append "https://github.com/powermock/powermock/"
10072 "archive/powermock-" version ".tar.gz"))
10073 (file-name (string-append name "-" version ".tar.gz"))
10074 (sha256
10075 (base32
10076 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
10077 (patches
10078 (search-patches "java-powermock-fix-java-files.patch"))))
10079 (build-system ant-build-system)
10080 (arguments
10081 `(#:jar-name "java-powermock-reflect.jar"
10082 #:jdk ,icedtea-8
10083 #:source-dir "powermock-reflect/src/main/java"
10084 #:test-dir "powermock-reflect/src/test"))
10085 (inputs
10086 `(("java-objenesis" ,java-objenesis)))
10087 (native-inputs
10088 `(("junit" ,java-junit)
10089 ("cglib" ,java-cglib)
10090 ("asm" ,java-asm)
10091 ("hamcrest" ,java-hamcrest-core)
10092 ("assertj" ,java-assertj)))
10093 (home-page "https://github.com/powermock/powermock")
10094 (synopsis "Mock library extension framework")
10095 (description "PowerMock is a framework that extends other mock libraries
10096 such as EasyMock with more powerful capabilities. PowerMock uses a custom
10097 classloader and bytecode manipulation to enable mocking of static methods,
10098 constructors, final classes and methods, private methods, removal of static
10099 initializers and more. By using a custom classloader no changes need to be
10100 done to the IDE or continuous integration servers which simplifies adoption.")
10101 (license license:asl2.0)))
10102
10103 (define-public java-powermock-core
10104 (package
10105 (inherit java-powermock-reflect)
10106 (name "java-powermock-core")
10107 (arguments
10108 `(#:jar-name "java-powermock-core.jar"
10109 #:source-dir "powermock-core/src/main/java"
10110 #:test-dir "powermock-core/src/test"
10111 #:tests? #f; requires powermock-api
10112 #:jdk ,icedtea-8
10113 #:phases
10114 (modify-phases %standard-phases
10115 (add-before 'build 'copy-resources
10116 (lambda _
10117 (copy-recursively "powermock-core/src/main/resources"
10118 "build/classes")
10119 #t)))))
10120 (inputs
10121 `(("reflect" ,java-powermock-reflect)
10122 ("javassist" ,java-jboss-javassist)))
10123 (native-inputs
10124 `(("junit" ,java-junit)
10125 ("assertj" ,java-assertj)
10126 ("mockito" ,java-mockito-1)))))
10127
10128 (define-public java-powermock-api-support
10129 (package
10130 (inherit java-powermock-reflect)
10131 (name "java-powermock-api-support")
10132 (build-system ant-build-system)
10133 (arguments
10134 `(#:jar-name "java-powermock-api-support.jar"
10135 #:jdk ,icedtea-8
10136 #:source-dir "powermock-api/powermock-api-support/src/main/java"
10137 #:tests? #f)); no tests
10138 (inputs
10139 `(("core" ,java-powermock-core)
10140 ("reflect" ,java-powermock-reflect)))))
10141
10142 (define-public java-powermock-modules-junit4-common
10143 (package
10144 (inherit java-powermock-reflect)
10145 (name "java-powermock-modules-junit4-common")
10146 (build-system ant-build-system)
10147 (arguments
10148 `(#:jar-name "java-powermock-modules-junit4-common.jar"
10149 #:jdk ,icedtea-8
10150 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
10151 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
10152 (inputs
10153 `(("core" ,java-powermock-core)
10154 ("easymock" ,java-easymock)
10155 ("reflect" ,java-powermock-reflect)
10156 ("hamcrest" ,java-hamcrest-core)
10157 ("cglib" ,java-cglib)))))
10158
10159 (define-public java-powermock-modules-junit4
10160 (package
10161 (inherit java-powermock-reflect)
10162 (name "java-powermock-modules-junit4")
10163 (build-system ant-build-system)
10164 (arguments
10165 `(#:jar-name "java-powermock-modules-junit4.jar"
10166 #:jdk ,icedtea-8
10167 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
10168 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
10169 #:phases
10170 (modify-phases %standard-phases
10171 (add-before 'build 'fix-junit-detection
10172 (lambda _
10173 ;; Our junit version is 4.12-SNAPSHOT
10174 (substitute* (find-files "powermock-modules/powermock-module-junit4"
10175 "PowerMockJUnit4MethodValidator.java")
10176 (("4.12") "4.12-SNAPSHOT"))
10177 #t)))))
10178 (inputs
10179 `(("core" ,java-powermock-core)
10180 ("reflect" ,java-powermock-reflect)
10181 ("common" ,java-powermock-modules-junit4-common)
10182 ("cglib" ,java-cglib)))
10183 (native-inputs
10184 `(("easymock" ,java-easymock)
10185 ("hamcrest" ,java-hamcrest-core)
10186 ("objenesis" ,java-objenesis)
10187 ("asm" ,java-asm)
10188 ("junit" ,java-junit)))))
10189
10190 (define-public java-powermock-api-easymock
10191 (package
10192 (inherit java-powermock-reflect)
10193 (name "java-powermock-api-easymock")
10194 (build-system ant-build-system)
10195 (arguments
10196 `(#:jar-name "java-powermock-api-easymock.jar"
10197 #:jdk ,icedtea-8
10198 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
10199 #:tests? #f; no tests
10200 #:phases
10201 (modify-phases %standard-phases
10202 (add-before 'build 'fix-file
10203 (lambda _
10204 ;; FIXME: This looks wrong, but it fixes a build error.
10205 (with-directory-excursion "powermock-api/powermock-api-easymock"
10206 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
10207 (("classLoader instanceof MockClassLoader") "false")
10208 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
10209 #t)))))
10210 (inputs
10211 `(("core" ,java-powermock-core)
10212 ("easymock" ,java-easymock)
10213 ("reflect" ,java-powermock-reflect)
10214 ("support" ,java-powermock-api-support)
10215 ("cglib" ,java-cglib)))))
10216
10217 (define-public java-jboss-jms-api-spec
10218 (package
10219 (name "java-jboss-jms-api-spec")
10220 (version "2.0")
10221 (source (origin
10222 (method url-fetch)
10223 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
10224 "archive/jboss-jms-api_" version
10225 "_spec-1.0.1.Final.tar.gz"))
10226 (sha256
10227 (base32
10228 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
10229 (build-system ant-build-system)
10230 (arguments
10231 `(#:jar-name "java-jboss-jms-api_spec.jar"
10232 #:jdk ,icedtea-8
10233 #:source-dir "."
10234 #:tests? #f)); no tests
10235 (home-page "https://github.com/jboss/jboss-jms-api_spec")
10236 (synopsis "Java Message Service API specification")
10237 (description "Java Message Service (JMS) API is used to send messages
10238 messages between two or more clients. It is a messaging standard that allows
10239 application components to create, send, receive, and read messages.")
10240 ; either gpl2 only with GPL Classpath Exception, or cddl.
10241 (license (list license:gpl2 license:cddl1.0))))
10242
10243 (define-public java-mail
10244 (package
10245 (name "java-mail")
10246 (version "1.6.0")
10247 (source (origin
10248 (method url-fetch)
10249 (uri (string-append "https://github.com/javaee/javamail/archive/"
10250 "JAVAMAIL-1_6_0.tar.gz"))
10251 (sha256
10252 (base32
10253 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
10254 (build-system ant-build-system)
10255 (arguments
10256 `(#:jar-name "java-mail.jar"
10257 #:jdk ,icedtea-8
10258 #:source-dir "mail/src/main/java"
10259 #:test-dir "mail/src/test"
10260 #:test-exclude
10261 (list "**/CollectorFormatterTest.java"
10262 "**/CompactFormatterTest.java"
10263 "**/DurationFilterTest.java"
10264 "**/MailHandlerTest.java"
10265 "**/GetLocalAddressTest.java"
10266 ;; FIXME: both end with:
10267 ;; java.lang.ClassNotFoundException:
10268 ;; javax.mail.internet.MimeMultipartParseTest
10269 "**/MimeMultipartParseTest.java"
10270 "**/SearchTermSerializationTest.java")
10271 #:phases
10272 (modify-phases %standard-phases
10273 (add-before 'configure 'move-version.java
10274 (lambda _
10275 (copy-file "mail/src/main/resources/javax/mail/Version.java"
10276 "mail/src/main/java/javax/mail/Version.java")
10277 #t))
10278 (add-before 'build 'copy-resources
10279 (lambda _
10280 (copy-recursively "mail/src/main/resources/META-INF"
10281 "build/classes/META-INF")
10282 #t)))))
10283 (native-inputs
10284 `(("junit" ,java-junit)
10285 ("hamcrest" ,java-hamcrest-core)))
10286 (home-page "https://javaee.github.io/javamail/")
10287 (synopsis "Mail-related functionnalities in Java")
10288 (description "The JavaMail API provides a platform-independent and
10289 protocol-independent framework to build mail and messaging applications.")
10290 ;; General Public License Version 2 only ("GPL") or the Common Development
10291 ;; and Distribution License("CDDL")
10292 (license (list license:cddl1.1
10293 license:gpl2)))); with classpath exception
10294
10295 (define-public java-jeromq
10296 (package
10297 (name "java-jeromq")
10298 (version "0.4.3")
10299 (source (origin
10300 (method git-fetch)
10301 (uri (git-reference
10302 (url "https://github.com/zeromq/jeromq")
10303 (commit (string-append "v" version))))
10304 (file-name (string-append name "-" version "-checkout"))
10305 (sha256
10306 (base32
10307 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
10308 (patches (search-patches "java-jeromq-fix-tests.patch"))))
10309 (build-system ant-build-system)
10310 (arguments
10311 `(#:jar-name "java-jeromq.jar"
10312 #:source-dir "src/main/java"
10313 #:jdk ,icedtea-8
10314 #:test-exclude
10315 (list
10316 "**/Abstract*.java"
10317 ;; Requires network
10318 "**/ZBeaconTest.java"
10319 ;; Failures
10320 "**/DealerSpecTest.java"
10321 "**/CustomDecoderTest.java"
10322 "**/CustomEncoderTest.java"
10323 "**/ConnectRidTest.java"
10324 "**/ReqSpecTest.java"
10325 "**/PushPullSpecTest.java"
10326 "**/PubSubHwmTest.java"
10327 "**/RouterSpecTest.java"
10328 "**/ProxyTest.java")))
10329 (inputs
10330 `(("java-jnacl" ,java-jnacl)))
10331 (native-inputs
10332 `(("java-hamcrest-core" ,java-hamcrest-core)
10333 ("junit" ,java-junit)))
10334 (home-page "http://zeromq.org/bindings:java")
10335 (synopsis "Java binding for 0MQ")
10336 (description "Jeromq provides the java bindings for 0MQ.")
10337 (license license:mpl2.0)))
10338
10339 (define-public java-kafka-clients
10340 (package
10341 (name "java-kafka-clients")
10342 (version "1.0.0")
10343 (source (origin
10344 (method url-fetch)
10345 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
10346 version "-src.tgz"))
10347 (sha256
10348 (base32
10349 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
10350 (build-system ant-build-system)
10351 (arguments
10352 `(#:jar-name "java-kafka-clients.jar"
10353 #:jdk ,icedtea-8
10354 #:source-dir "clients/src/main/java"
10355 #:test-dir "clients/src/test"
10356 #:test-exclude
10357 (list
10358 ;; This file does not contain a class
10359 "**/IntegrationTest.java"
10360 ;; Requires network
10361 "**/ClientUtilsTest.java"
10362 ;; End with errors that seem related to our powermock
10363 "**/KafkaProducerTest.java"
10364 "**/BufferPoolTest.java")))
10365 (inputs
10366 `(("java-slf4j-api" ,java-slf4j-api)
10367 ("java-lz4" ,java-lz4)))
10368 (native-inputs
10369 `(("junit" ,java-junit)
10370 ("hamcrest" ,java-hamcrest-all)
10371 ("objenesis" ,java-objenesis)
10372 ("asm" ,java-asm)
10373 ("cglib" ,java-cglib)
10374 ("javassist" ,java-jboss-javassist)
10375 ("snappy" ,java-snappy)
10376 ("easymock" ,java-easymock)
10377 ("powermock" ,java-powermock-core)
10378 ("powermock-easymock" ,java-powermock-api-easymock)
10379 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
10380 ("powermock-junit4" ,java-powermock-modules-junit4)
10381 ("powermock-support" ,java-powermock-api-support)
10382 ("java-bouncycastle" ,java-bouncycastle)))
10383 (home-page "https://kafka.apache.org")
10384 (synopsis "Distributed streaming platform")
10385 (description "Kafka is a distributed streaming platform, which means:
10386 @itemize
10387 @item it can publish and subscribe to streams of records;
10388 @item it can store streams of records in a fault-tolerant way;
10389 @item it can process streams of records as they occur.
10390 @end itemize")
10391 ;; Either cddl or gpl2 only.
10392 (license (list license:cddl1.1; actually cddl1.1
10393 license:gpl2)))); with classpath exception
10394
10395 (define-public java-jdom
10396 (package
10397 (name "java-jdom")
10398 (version "1.1.3")
10399 (source (origin
10400 (method url-fetch)
10401 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
10402 version ".tar.gz"))
10403 (sha256
10404 (base32
10405 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
10406 (build-system ant-build-system)
10407 (arguments
10408 `(#:build-target "package"
10409 #:tests? #f; tests are run as part of the build process
10410 #:phases
10411 (modify-phases %standard-phases
10412 (replace 'install
10413 (install-jars "build")))))
10414 (home-page "http://jdom.org/")
10415 (synopsis "Access, manipulate, and output XML data")
10416 (description "Java-based solution for accessing, manipulating, and
10417 outputting XML data from Java code.")
10418 (license license:bsd-4)))
10419
10420 (define-public java-geronimo-xbean-reflect
10421 (package
10422 (name "java-geronimo-xbean-reflect")
10423 (version "4.5")
10424 (source (origin
10425 (method svn-fetch)
10426 (uri (svn-reference
10427 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
10428 (revision 1807396)))
10429 (file-name (string-append name "-" version))
10430 (sha256
10431 (base32
10432 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
10433 (build-system ant-build-system)
10434 (arguments
10435 `(#:jar-name "geronimo-xbean-reflect.jar"
10436 #:source-dir "xbean-reflect/src/main/java"
10437 #:test-dir "xbean-reflect/src/test"
10438 #:jdk ,icedtea-8
10439 #:test-exclude
10440 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
10441 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
10442 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
10443 #:phases
10444 (modify-phases %standard-phases
10445 (add-before 'build 'fix-source
10446 (lambda _
10447 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
10448 ;; org.apache.xbean.asm6 is actually repackaged java-asm
10449 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
10450 (("org.apache.xbean.asm5") "org.objectweb.asm"))
10451 #t)))
10452 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
10453 (inputs
10454 `(("asm" ,java-asm)
10455 ("log4j" ,java-log4j-api)
10456 ("log4j-1.2" ,java-log4j-1.2-api)
10457 ("log4j-core" ,java-log4j-core)
10458 ("logging" ,java-commons-logging-minimal)))
10459 (propagated-inputs
10460 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
10461 (native-inputs
10462 `(("junit" ,java-junit)))
10463 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
10464 (synopsis "Dependency injection helper")
10465 (description "Xbean-reflect provides very flexible ways to create objects
10466 and graphs of objects for dependency injection frameworks")
10467 (license license:asl2.0)))
10468
10469 (define java-geronimo-genesis-2.1
10470 (package
10471 (name "java-geronimo-genesis")
10472 (version "2.1")
10473 (source (origin
10474 (method svn-fetch)
10475 (uri (svn-reference
10476 (url (string-append "https://svn.apache.org/repos/asf/"
10477 "geronimo/genesis/tags/genesis-"
10478 version))
10479 (revision 1807396)))
10480 (file-name (string-append name "-" version "-source"))
10481 (sha256
10482 (base32
10483 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
10484 (build-system ant-build-system)
10485 (arguments
10486 `(#:tests? #f
10487 #:phases
10488 (modify-phases %standard-phases
10489 (delete 'configure)
10490 (delete 'build)
10491 (replace 'install
10492 (install-pom-file "pom.xml"))
10493 (add-after 'install 'install-enforcer-rules
10494 (install-pom-file "genesis-enforcer-rules/pom.xml"))
10495 (add-after 'install 'install-flava
10496 (install-pom-file "genesis-default-flava/pom.xml"))
10497 (add-after 'install 'install-packaging
10498 (install-pom-file "genesis-packaging/pom.xml"))
10499 (add-after 'install-flava 'install-flava-java4
10500 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
10501 (add-after 'install-flava 'install-flava-java5
10502 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
10503 (add-after 'install-flava 'install-flava-java6
10504 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
10505 (propagated-inputs
10506 `(("apache-parent-pom" ,apache-parent-pom-13)))
10507 (home-page "https://geronimo.apache.org")
10508 (synopsis "Collection of maven POM files for the Geronimo project")
10509 (description "Apache Geronimo is a server runtime. This package contains
10510 only pom files used by other components in the Geronimo project.")
10511 (license license:asl2.0)))
10512
10513 (define java-geronimo-parent-pom
10514 (package
10515 (inherit java-geronimo-xbean-reflect)
10516 (name "java-geronimo-parent-pom")
10517 (arguments
10518 `(#:tests? #f
10519 #:phases
10520 (modify-phases %standard-phases
10521 (delete 'configure)
10522 (delete 'build)
10523 (replace 'install
10524 (install-pom-file "pom.xml")))))
10525 (propagated-inputs
10526 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
10527
10528 (define-public java-geronimo-xbean-bundleutils
10529 (package
10530 (inherit java-geronimo-xbean-reflect)
10531 (name "java-geronimo-xbean-bundleutils")
10532 (arguments
10533 `(#:jar-name "geronimo-xbean-bundleutils.jar"
10534 #:source-dir "xbean-bundleutils/src/main/java"
10535 #:test-dir "xbean-bundleutils/src/test"
10536 #:phases
10537 (modify-phases %standard-phases
10538 (add-before 'build 'fix-java
10539 (lambda _
10540 ;; We use a more recent version of osgi, so this file requires
10541 ;; more interface method implementations.
10542 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
10543 (("import org.osgi.framework.ServiceRegistration;")
10544 "import org.osgi.framework.ServiceRegistration;
10545 import org.osgi.framework.ServiceFactory;
10546 import java.util.Collection;
10547 import org.osgi.framework.ServiceObjects;")
10548 (("public Bundle getBundle\\(\\)")
10549 "@Override
10550 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
10551 throw new UnsupportedOperationException();
10552 }
10553 @Override
10554 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10555 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10556 throw new UnsupportedOperationException();
10557 }
10558 public Bundle getBundle()"))
10559 #t)))))
10560 (inputs
10561 `(("java-slf4j" ,java-slf4j-api)
10562 ("java-asm" ,java-asm)
10563 ("java-osgi-framework" ,java-osgi-framework)
10564 ("java-eclipse-osgi" ,java-eclipse-osgi)
10565 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
10566
10567 (define-public java-geronimo-xbean-asm-util
10568 (package
10569 (inherit java-geronimo-xbean-reflect)
10570 (name "java-geronimo-xbean-asm-util")
10571 (arguments
10572 `(#:jar-name "geronimo-xbean-asm-util.jar"
10573 #:source-dir "xbean-asm-util/src/main/java"
10574 #:tests? #f)); no tests
10575 (inputs
10576 `(("java-asm" ,java-asm)))
10577 (native-inputs '())))
10578
10579 (define-public java-geronimo-xbean-finder
10580 (package
10581 (inherit java-geronimo-xbean-reflect)
10582 (name "java-geronimo-xbean-finder")
10583 (arguments
10584 `(#:jar-name "geronimo-xbean-finder.jar"
10585 #:source-dir "xbean-finder/src/main/java"
10586 #:test-dir "xbean-finder/src/test"))
10587 (inputs
10588 `(("java-slf4j-api" ,java-slf4j-api)
10589 ("java-asm" ,java-asm)
10590 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10591 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10592 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10593 ("java-osgi-framework" ,java-osgi-framework)))
10594 (native-inputs
10595 `(("java-junit" ,java-junit)
10596 ("java-hamcrest-core" ,java-hamcrest-core)))))
10597
10598 (define-public java-gson
10599 (package
10600 (name "java-gson")
10601 (version "2.8.2")
10602 (source (origin
10603 (method url-fetch)
10604 (uri (string-append "https://github.com/google/gson/archive/"
10605 "gson-parent-" version ".tar.gz"))
10606 (sha256
10607 (base32
10608 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10609 (build-system ant-build-system)
10610 (arguments
10611 `(#:jar-name "gson.jar"
10612 #:source-dir "gson/src/main/java"
10613 #:test-dir "gson/src/test"))
10614 (native-inputs
10615 `(("java-junit" ,java-junit)
10616 ("java-hamcrest-core" ,java-hamcrest-core)))
10617 (home-page "https://github.com/google/gson")
10618 (synopsis "Java serialization/deserialization library from/to JSON")
10619 (description "Gson is a Java library that can be used to convert Java
10620 Objects into their JSON representation. It can also be used to convert a JSON
10621 string to an equivalent Java object. Gson can work with arbitrary Java objects
10622 including pre-existing objects that you do not have source-code of.")
10623 (license license:asl2.0)))
10624
10625 (define-public java-hawtjni
10626 (package
10627 (name "java-hawtjni")
10628 (version "1.15")
10629 (source (origin
10630 (method url-fetch)
10631 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10632 "hawtjni-project-" version ".tar.gz"))
10633 (sha256
10634 (base32
10635 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10636 (build-system ant-build-system)
10637 (arguments
10638 `(#:jar-name "hawtjni.jar"
10639 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10640 #:tests? #f; no tests
10641 #:phases
10642 (modify-phases %standard-phases
10643 (add-before 'build 'build-native
10644 (lambda* (#:key inputs #:allow-other-keys)
10645 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10646 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10647 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10648 "-fPIC" "-O2" include)
10649 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10650 "-fPIC" "-O2" include)
10651 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10652 "hawtjni.o" "hawtjni-callback.o")))
10653 #t))
10654 (add-after 'install 'install-native
10655 (lambda* (#:key outputs #:allow-other-keys)
10656 (let* ((out (assoc-ref outputs "out"))
10657 (lib (string-append out "/lib"))
10658 (inc (string-append out "/include")))
10659 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10660 (install-file "libhawtjni.so" lib)
10661 (install-file "hawtjni.h" inc)))
10662 #t)))))
10663 (inputs
10664 `(("java-commons-cli" ,java-commons-cli)
10665 ("java-asm" ,java-asm)
10666 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10667 (home-page "https://fusesource.github.io/hawtjni/")
10668 (synopsis "JNI code generator")
10669 (description "HawtJNI is a code generator that produces the JNI code needed
10670 to implement Java native methods. It is based on the jnigen code generator
10671 that is part of the SWT Tools project.")
10672 (license license:asl2.0)))
10673
10674 (define-public java-jansi-native
10675 (package
10676 (name "java-jansi-native")
10677 (version "1.7")
10678 (source (origin
10679 (method url-fetch)
10680 (uri (string-append "https://github.com/fusesource/jansi-native/"
10681 "archive/jansi-native-" version ".tar.gz"))
10682 (sha256
10683 (base32
10684 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10685 (build-system ant-build-system)
10686 (arguments
10687 `(#:jar-name "jansi-native.jar"
10688 #:source-dir "src/main/java"
10689 #:tests? #f; no tests
10690 #:phases
10691 (modify-phases %standard-phases
10692 (add-before 'build 'build-native
10693 (lambda* (#:key inputs #:allow-other-keys)
10694 ;; there are more required files for windows in windows/
10695 (with-directory-excursion "src/main/native-package/src"
10696 (substitute* "jansi_ttyname.c"
10697 (("#include \"jansi_.*") ""))
10698 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10699 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10700 "/include")
10701 (string-append "-I" (assoc-ref inputs "jdk")
10702 "/include/linux")
10703 "-fPIC" "-O2")
10704 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
10705 (add-before 'build 'install-native
10706 (lambda _
10707 (let ((dir (string-append "build/classes/META-INF/native/"
10708 ,(match (%current-system)
10709 ((or "i686-linux" "armhf-linux")
10710 "linux32")
10711 ((or "x86_64-linux" "aarch64-linux"
10712 "mips64el-linux")
10713 "linux64")
10714 (_ "unknown-kernel")))))
10715 (install-file "src/main/native-package/src/libjansi.so" dir))
10716 #t))
10717 (add-after 'install 'install-native
10718 (lambda* (#:key outputs #:allow-other-keys)
10719 (install-file "src/main/native-package/src/jansi.h"
10720 (string-append (assoc-ref outputs "out") "/include"))
10721 #t)))))
10722 (inputs
10723 `(("java-hawtjni" ,java-hawtjni)))
10724 (home-page "https://fusesource.github.io/jansi/")
10725 (synopsis "Native library for jansi")
10726 (description "This package provides the native library for jansi, a small
10727 Java library that allows you to use ANSI escape sequences to format your
10728 console output.")
10729 (license license:asl2.0)))
10730
10731 (define-public java-jansi
10732 (package
10733 (name "java-jansi")
10734 (version "1.16")
10735 (source (origin
10736 (method url-fetch)
10737 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10738 "jansi-project-" version ".tar.gz"))
10739 (sha256
10740 (base32
10741 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10742 (build-system ant-build-system)
10743 (arguments
10744 `(#:jar-name "jansi.jar"
10745 #:source-dir "jansi/src/main/java"
10746 #:test-dir "jansi/src/test"
10747 #:phases
10748 (modify-phases %standard-phases
10749 (add-after 'check 'clear-term
10750 (lambda _
10751 (invoke "echo" "-e" "\\e[0m"))))))
10752 (inputs
10753 `(("java-jansi-native" ,java-jansi-native)))
10754 (native-inputs
10755 `(("java-junit" ,java-junit)
10756 ("java-hamcrest-core" ,java-hamcrest-core)))
10757 (home-page "https://fusesource.github.io/jansi/")
10758 (synopsis "Portable ANSI escape sequences")
10759 (description "Jansi is a Java library that allows you to use ANSI escape
10760 sequences to format your console output which works on every platform.")
10761 (license license:asl2.0)))
10762
10763 (define-public java-jboss-el-api-spec
10764 (package
10765 (name "java-jboss-el-api-spec")
10766 (version "3.0")
10767 (source (origin
10768 (method url-fetch)
10769 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10770 "archive/jboss-el-api_" version
10771 "_spec-1.0.7.Final.tar.gz"))
10772 (sha256
10773 (base32
10774 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10775 (build-system ant-build-system)
10776 (arguments
10777 `(#:jar-name "java-jboss-el-api_spec.jar"
10778 #:jdk ,icedtea-8))
10779 (inputs
10780 `(("java-junit" ,java-junit)))
10781 (home-page "https://github.com/jboss/jboss-el-api_spec")
10782 (synopsis "JSR-341 expression language 3.0 API")
10783 (description "This package contains an implementation of the JSR-341
10784 specification for the expression language 3.0. It implements an expression
10785 language inspired by ECMAScript and XPath. This language is used with
10786 JavaServer Pages (JSP).")
10787 ;; Either GPL2 only or CDDL.
10788 (license (list license:gpl2 license:cddl1.1))))
10789
10790 (define-public java-jboss-interceptors-api-spec
10791 (package
10792 (name "java-jboss-interceptors-api-spec")
10793 (version "1.2")
10794 (source (origin
10795 (method url-fetch)
10796 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10797 "archive/jboss-interceptors-api_" version
10798 "_spec-1.0.0.Final.tar.gz"))
10799 (sha256
10800 (base32
10801 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10802 (build-system ant-build-system)
10803 (arguments
10804 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10805 #:jdk ,icedtea-8
10806 #:source-dir "."
10807 #:tests? #f)); no tests
10808 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10809 (synopsis "Interceptors 1.2 API classes from JSR 318")
10810 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10811 API. Interceptors are used to interpose on business method invocations and
10812 specific events.")
10813 ;; Either GPL2 only or CDDL.
10814 (license (list license:gpl2 license:cddl1.1))))
10815
10816 (define-public java-cdi-api
10817 (package
10818 (name "java-cdi-api")
10819 (version "2.0")
10820 (source (origin
10821 (method url-fetch)
10822 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10823 version ".tar.gz"))
10824 (file-name (string-append name "-" version ".tar.gz"))
10825 (sha256
10826 (base32
10827 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10828 (build-system ant-build-system)
10829 (arguments
10830 `(#:source-dir "api/src/main/java"
10831 #:jar-name "java-cdi-api.jar"
10832 #:test-dir "api/src/test"
10833 #:jdk ,icedtea-8
10834 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10835 (inputs
10836 `(("java-javax-inject" ,java-javax-inject)
10837 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10838 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10839 (native-inputs
10840 `(("java-testng" ,java-testng)
10841 ("java-hamcrest-core" ,java-hamcrest-core)))
10842 (home-page "http://cdi-spec.org/")
10843 (synopsis "Contexts and Dependency Injection APIs")
10844 (description "Java-cdi-api contains the required APIs for Contexts and
10845 Dependency Injection (CDI).")
10846 (license license:asl2.0)))
10847
10848 (define-public java-joda-convert
10849 (package
10850 (name "java-joda-convert")
10851 (version "1.9.2")
10852 (source (origin
10853 (method url-fetch)
10854 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10855 version ".tar.gz"))
10856 (file-name (string-append name "-" version ".tar.gz"))
10857 (sha256
10858 (base32
10859 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10860 (build-system ant-build-system)
10861 (arguments
10862 `(#:jar-name (string-append ,name "-" ,version ".jar")
10863 #:source-dir "src/main/java"
10864 #:test-include (list "**/Test*.java")
10865 ;; Contains only interfaces and base classes (no test)
10866 #:test-exclude (list "**/test*/**.java")))
10867 (inputs
10868 `(("java-guava" ,java-guava)))
10869 (native-inputs
10870 `(("java-junit" ,java-junit)
10871 ("java-hamcrest-core" ,java-hamcrest-core)))
10872 (home-page "https://www.joda.org/joda-convert/")
10873 (synopsis "Conversion between Objects and Strings")
10874 (description "Joda-Convert provides a small set of classes to aid
10875 conversion between Objects and Strings. It is not intended to tackle the
10876 wider problem of Object to Object transformation.")
10877 (license license:asl2.0)))
10878
10879 (define-public java-joda-time
10880 (package
10881 (name "java-joda-time")
10882 (version "2.9.9")
10883 (source (origin
10884 (method url-fetch)
10885 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10886 version ".tar.gz"))
10887 (file-name (string-append name "-" version ".tar.gz"))
10888 (sha256
10889 (base32
10890 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10891 (build-system ant-build-system)
10892 (arguments
10893 `(#:jar-name "java-joda-time.jar"
10894 #:source-dir "src/main/java"
10895 #:test-include (list "**/Test*.java")
10896 ;; There is no runnable test in these files
10897 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10898 #:phases
10899 (modify-phases %standard-phases
10900 (add-after 'build 'build-resources
10901 (lambda _
10902 (mkdir-p "build/classes/org/joda/time/tz/data")
10903 (mkdir-p "build/classes/org/joda/time/format")
10904 ;; This will produce the following exception:
10905 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10906 ;; which is normal, because it doesn't exist yet. It still generates
10907 ;; the same file as in the binary one can find on maven.
10908 (invoke "java" "-cp"
10909 (string-append "build/classes:" (getenv "CLASSPATH"))
10910 "org.joda.time.tz.ZoneInfoCompiler"
10911 "-src" "src/main/java/org/joda/time/tz/src"
10912 "-dst" "build/classes/org/joda/time/tz/data"
10913 "africa" "antarctica" "asia" "australasia"
10914 "europe" "northamerica" "southamerica"
10915 "pacificnew" "etcetera" "backward" "systemv")
10916 (for-each (lambda (f)
10917 (copy-file f (string-append
10918 "build/classes/org/joda/time/format/"
10919 (basename f))))
10920 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10921 #t))
10922 (add-before 'install 'regenerate-jar
10923 (lambda _
10924 ;; We need to regenerate the jar file to add generated data.
10925 (delete-file "build/jar/java-joda-time.jar")
10926 (invoke "ant" "jar")))
10927 (add-before 'check 'copy-test-resources
10928 (lambda _
10929 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10930 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10931 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10932 (copy-recursively "src/test/resources" "build/test-classes")
10933 #t)))))
10934 (inputs
10935 `(("java-joda-convert" ,java-joda-convert)))
10936 (native-inputs
10937 `(("java-junit" ,java-junit)
10938 ("java-hamcrest-core" ,java-hamcrest-core)
10939 ("tzdata" ,tzdata)))
10940 (home-page "https://www.joda.org/joda-time/")
10941 (synopsis "Replacement for the Java date and time classes")
10942 (description "Joda-Time is a replacement for the Java date and time
10943 classes prior to Java SE 8.")
10944 (license license:asl2.0)))
10945
10946 (define-public java-xerces
10947 (package
10948 (name "java-xerces")
10949 (version "2.12.1")
10950 (source
10951 (origin
10952 (method url-fetch)
10953 (uri (string-append "mirror://apache/xerces/j/source/"
10954 "Xerces-J-src." version ".tar.gz"))
10955 (sha256
10956 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
10957 (patches (search-patches
10958 "java-xerces-xjavac_taskdef.patch"
10959 "java-xerces-build_dont_unzip.patch"
10960 "java-xerces-bootclasspath.patch"))))
10961 (build-system ant-build-system)
10962 (arguments
10963 `(#:tests? #f;; Test files are not present
10964 #:test-target "test"
10965 #:jdk ,icedtea-8
10966 #:phases
10967 (modify-phases %standard-phases
10968 (add-after 'unpack 'create-build.properties
10969 (lambda* (#:key inputs #:allow-other-keys)
10970 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10971 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10972 (with-output-to-file "build.properties"
10973 (lambda _
10974 (format #t
10975 "jar.jaxp = ~a/share/java/jaxp.jar~@
10976 jar.apis-ext = ~a/share/java/jaxp.jar~@
10977 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10978 jaxp jaxp resolver)))
10979 ;; Make xerces use our version of jaxp in tests
10980 (substitute* "build.xml"
10981 (("xml-apis.jar")
10982 (string-append jaxp "/share/java/jaxp.jar"))
10983 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10984 "${jar.apis}")))
10985 #t))
10986 (replace 'install (install-jars "build")))))
10987 (inputs
10988 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10989 ("java-jaxp" ,java-jaxp)))
10990 (home-page "https://xerces.apache.org/xerces2-j/")
10991 (synopsis "Validating XML parser for Java with DOM level 3 support")
10992 (description "The Xerces2 Java parser is the reference implementation of
10993 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10994 processor.
10995
10996 Xerces2-J supports the following standards and APIs:
10997
10998 @itemize
10999 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
11000 @item Namespaces in XML Recommendation
11001 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
11002 Range Recommendations
11003 @item Simple API for XML (SAX) 2.0.1 Core and Extension
11004 @item Java APIs for XML Processing (JAXP) 1.2.01
11005 @item XML Schema 1.0 Structures and Datatypes Recommendations
11006 @item Experimental implementation of the Document Object Model (DOM) Level 3
11007 Core and Load/Save Working Drafts
11008 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
11009 Candidate Recommendation
11010 @end itemize
11011
11012 Xerces is now able to parse documents written according to the XML 1.1
11013 Candidate Recommendation, except that it does not yet provide an option to
11014 enable normalization checking as described in section 2.13 of this
11015 specification. It also handles namespaces according to the XML Namespaces 1.1
11016 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
11017 the DOM level 3 load/save API's are in use.")
11018 (license license:asl2.0)))
11019
11020 (define-public java-jakarta-regexp
11021 (package
11022 (name "java-jakarta-regexp")
11023 (version "1.5")
11024 (source
11025 (origin
11026 (method url-fetch)
11027 (uri (string-append
11028 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
11029 version ".tar.gz"))
11030 (sha256
11031 (base32
11032 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
11033 (build-system ant-build-system)
11034 (arguments
11035 `(#:test-target "test"
11036 #:phases
11037 (modify-phases %standard-phases
11038 (replace 'install
11039 (lambda* (#:key outputs #:allow-other-keys)
11040 (let* ((out (assoc-ref outputs "out"))
11041 (out-share (string-append out "/share/java")))
11042 (mkdir-p out-share)
11043 (for-each (lambda (name)
11044 (install-file name out-share))
11045 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
11046 #t))))))
11047 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
11048 (synopsis "Regular expression parser generator for Java.")
11049 (description "@code{jakarta-regexp} is an old regular expression parser
11050 generator for Java.")
11051 (license license:asl2.0)))
11052
11053 (define-public java-jline
11054 (package
11055 (name "java-jline")
11056 (version "1.0")
11057 (source (origin
11058 (method url-fetch)
11059 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
11060 version ".tar.gz"))
11061 (sha256
11062 (base32
11063 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
11064 (build-system ant-build-system)
11065 (arguments
11066 `(#:jar-name "jline.jar"
11067 #:source-dir "src/main/java"
11068 #:test-dir "src/test"
11069 #:phases
11070 (modify-phases %standard-phases
11071 (add-before 'build 'copy-resources
11072 (lambda _
11073 (copy-recursively "src/main/resources" "build/classes")
11074 #t)))))
11075 (native-inputs
11076 `(("java-junit" ,java-junit)))
11077 (home-page "https://jline.github.io")
11078 (synopsis "Console input handling library")
11079 (description "JLine is a Java library for handling console input. It is
11080 similar in functionality to BSD editline and GNU readline but with additional
11081 features that bring it on par with the Z shell line editor.")
11082 (license license:bsd-3)))
11083
11084 (define-public java-jline-2
11085 (package
11086 (inherit java-jline)
11087 (version "2.14.5")
11088 (source (origin
11089 (method url-fetch)
11090 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
11091 version ".tar.gz"))
11092 (sha256
11093 (base32
11094 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
11095 (arguments
11096 `(#:jdk ,icedtea-8
11097 ,@(package-arguments java-jline)))
11098 (inputs
11099 `(("java-jansi" ,java-jansi)
11100 ("java-jansi-native" ,java-jansi-native)))
11101 (native-inputs
11102 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
11103 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
11104 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
11105 ("java-powermock-api-support" ,java-powermock-api-support)
11106 ("java-powermock-core" ,java-powermock-core)
11107 ("java-powermock-reflect" ,java-powermock-reflect)
11108 ("java-easymock" ,java-easymock)
11109 ("java-jboss-javassist" ,java-jboss-javassist)
11110 ("java-objenesis" ,java-objenesis)
11111 ("java-asm" ,java-asm)
11112 ("java-hamcrest-core" ,java-hamcrest-core)
11113 ("java-cglib" ,java-cglib)
11114 ("java-junit" ,java-junit)
11115 ("java-hawtjni" ,java-hawtjni)))))
11116
11117 (define-public java-xmlunit
11118 (package
11119 (name "java-xmlunit")
11120 (version "2.5.1")
11121 (source (origin
11122 (method url-fetch)
11123 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
11124 version ".tar.gz"))
11125 (file-name (string-append name "-" version ".tar.gz"))
11126 (sha256
11127 (base32
11128 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
11129 (build-system ant-build-system)
11130 (arguments
11131 `(#:jar-name "java-xmlunit.jar"
11132 #:source-dir "xmlunit-core/src/main/java"
11133 #:test-dir "xmlunit-core/src/test"
11134 #:phases
11135 (modify-phases %standard-phases
11136 (add-before 'check 'copy-test-resources
11137 (lambda* (#:key inputs #:allow-other-keys)
11138 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
11139 #t)))))
11140 (native-inputs
11141 `(("java-junit" ,java-junit)
11142 ("java-mockito-1" ,java-mockito-1)
11143 ("java-hamcrest-all" ,java-hamcrest-all)
11144 ("java-objenesis" ,java-objenesis)
11145 ("java-asm" ,java-asm)
11146 ("java-cglib" ,java-cglib)
11147 ("resources"
11148 ,(origin
11149 (method git-fetch)
11150 (uri (git-reference
11151 (url "https://github.com/xmlunit/test-resources")
11152 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
11153 (file-name "java-xmlunit-test-resources")
11154 (sha256
11155 (base32
11156 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
11157 (home-page "https://www.xmlunit.org/")
11158 (synopsis "XML output testing")
11159 (description "XMLUnit provides you with the tools to verify the XML you
11160 emit is the one you want to create. It provides helpers to validate against
11161 an XML Schema, assert the values of XPath queries or compare XML documents
11162 against expected outcomes.")
11163 (license license:asl2.0)))
11164
11165 (define-public java-xmlunit-legacy
11166 (package
11167 (inherit java-xmlunit)
11168 (name "java-xmlunit-legacy")
11169 (arguments
11170 `(#:jar-name "java-xmlunit-legacy.jar"
11171 #:source-dir "xmlunit-legacy/src/main/java"
11172 #:test-dir "xmlunit-legacy/src/test"))
11173 (inputs
11174 `(("java-xmlunit" ,java-xmlunit)
11175 ("java-junit" ,java-junit)))
11176 (native-inputs
11177 `(("java-mockito-1" ,java-mockito-1)))))
11178
11179 (define-public java-xmlunit-matchers
11180 (package
11181 (inherit java-xmlunit)
11182 (name "java-xmlunit-matchers")
11183 (arguments
11184 `(#:jar-name "java-xmlunit-matchers.jar"
11185 #:source-dir "xmlunit-matchers/src/main/java"
11186 #:test-dir "xmlunit-matchers/src/test"
11187 #:test-exclude
11188 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
11189 (list "**/ValidationMatcherTest.java")
11190 #:phases
11191 (modify-phases %standard-phases
11192 (add-before 'build 'copy-test-class
11193 (lambda _
11194 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
11195 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
11196 #t))
11197 (add-before 'build 'fix-test-resources-path
11198 (lambda _
11199 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
11200 (("../test-resources") "test-resources"))
11201 #t))
11202 (add-before 'check 'copy-test-resources
11203 (lambda* (#:key inputs #:allow-other-keys)
11204 (copy-recursively (assoc-ref inputs "resources") "test-resources")
11205 #t)))))
11206 (inputs
11207 `(("java-xmlunit" ,java-xmlunit)
11208 ("java-junit" ,java-junit)))))
11209
11210 (define-public java-openchart2
11211 (package
11212 (name "java-openchart2")
11213 (version "1.4.3")
11214 (source (origin
11215 (method url-fetch)
11216 (uri (string-append "http://download.approximatrix.com/openchart2/"
11217 "openchart2-" version ".source.zip"))
11218 (sha256
11219 (base32
11220 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
11221 (build-system ant-build-system)
11222 (arguments
11223 `(#:test-target "test"
11224 #:phases
11225 (modify-phases %standard-phases
11226 (add-after 'unpack 'fix-junit-errors
11227 (lambda _
11228 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
11229 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
11230 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
11231 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
11232 "model/DefaultChartDataModelConstraintsTest.java"
11233 "model/MultiScatterDataModelConstraintsTest.java"
11234 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
11235 (("(assertEquals[^;]+);" before _)
11236 (string-append (string-drop-right before 2) ", 1E-6);"))))
11237 #t))
11238 (replace 'install (install-jars ".")))))
11239 (native-inputs
11240 `(("unzip" ,unzip)
11241 ("java-junit" ,java-junit)
11242 ("java-hamcrest-core" ,java-hamcrest-core)))
11243 (home-page "https://approximatrix.com/products/openchart2/")
11244 (synopsis "Simple plotting for Java")
11245 (description "Openchart2 provides a simple, yet powerful, interface for
11246 Java programmers to create two-dimensional charts and plots. The library
11247 features an assortment of graph styles, including advanced scatter plots, bar
11248 graphs, and pie charts.")
11249 (license license:lgpl2.1+)))
11250
11251 (define-public java-commons-httpclient
11252 (package
11253 (name "java-commons-httpclient")
11254 (version "3.1")
11255 (source (origin
11256 (method url-fetch)
11257 (uri (string-append "mirror://apache/httpcomponents/"
11258 "commons-httpclient/source/commons-httpclient-"
11259 version "-src.tar.gz"))
11260 (sha256
11261 (base32
11262 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
11263 (build-system ant-build-system)
11264 (arguments
11265 `(#:build-target "compile"
11266 #:test-target "test"
11267 #:tests? #f; requires junit-textui (junit 3)
11268 #:phases
11269 (modify-phases %standard-phases
11270 (add-before 'build 'fix-accent
11271 (lambda _
11272 (for-each (lambda (file)
11273 (with-fluids ((%default-port-encoding "ISO-8859-1"))
11274 (substitute* file
11275 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
11276 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
11277 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
11278 "src/test/org/apache/commons/httpclient/TestHttps.java"
11279 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
11280 #t))
11281 (replace 'install
11282 (lambda* (#:key outputs #:allow-other-keys)
11283 (invoke "ant" "dist"
11284 (string-append "-Ddist.home=" (assoc-ref outputs "out")
11285 "/share/java"))
11286 #t)))))
11287 (propagated-inputs
11288 `(("java-commons-logging" ,java-commons-logging-minimal)
11289 ("java-commons-codec" ,java-commons-codec)))
11290 (home-page "https://hc.apache.org")
11291 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
11292 (description "This package contains an HTTP/1.1 compliant HTTP agent
11293 implementation. It also provides reusable components for client-side
11294 authentication, HTTP state management, and HTTP connection management.")
11295 (license license:asl2.0)))
11296
11297 (define-public java-commons-vfs
11298 (package
11299 (name "java-commons-vfs")
11300 (version "2.2")
11301 (source (origin
11302 (method url-fetch)
11303 (uri (string-append "mirror://apache/commons/vfs/source/"
11304 "commons-vfs2-distribution-" version "-src.tar.gz"))
11305 (file-name (string-append name "-" version ".tar.gz"))
11306 (sha256
11307 (base32
11308 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
11309 (modules '((guix build utils)))
11310 (snippet
11311 '(begin
11312 (for-each delete-file
11313 (find-files "." "\\.jar$"))
11314 #t))))
11315 (build-system ant-build-system)
11316 (arguments
11317 `(#:jar-name "commons-vfs.jar"
11318 #:source-dir "commons-vfs2/src/main/java"
11319 #:test-dir "commons-vfs2/src/test"
11320 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
11321 #:tests? #f
11322 #:phases
11323 (modify-phases %standard-phases
11324 (add-before 'build 'remove-hadoop-and-webdav
11325 ; Remove these files as they are not required and depend on difficult
11326 ; packages.
11327 (lambda _
11328 (for-each delete-file-recursively
11329 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
11330 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
11331 #t)))))
11332 (inputs
11333 `(("java-commons-collections4" ,java-commons-collections4)
11334 ("java-commons-compress" ,java-commons-compress)
11335 ("java-commons-httpclient" ,java-commons-httpclient)
11336 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
11337 ("java-commons-net" ,java-commons-net)
11338 ("java-jsch" ,java-jsch)))
11339 (home-page "https://commons.apache.org/proper/commons-vfs/")
11340 (synopsis "Java file system library")
11341 (description "Commons VFS provides a single API for accessing various
11342 different file systems. It presents a uniform view of the files from various
11343 different sources, such as the files on local disk, on an HTTP server, or
11344 inside a Zip archive.")
11345 (license license:asl2.0)))
11346
11347 (define-public java-jakarta-oro
11348 (package
11349 (name "java-jakarta-oro")
11350 (version "2.0.8")
11351 (source (origin
11352 (method url-fetch)
11353 (uri (string-append "mirror://apache/jakarta/oro/"
11354 "jakarta-oro-" version ".tar.gz"))
11355 (sha256
11356 (base32
11357 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
11358 (modules '((guix build utils)))
11359 (snippet
11360 `(begin
11361 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
11362 #t))))
11363 (build-system ant-build-system)
11364 (arguments
11365 `(#:build-target "package"
11366 #:tests? #f; tests are run as part of the build process
11367 #:phases
11368 (modify-phases %standard-phases
11369 (replace 'install
11370 (install-jars ,(string-append "jakarta-oro-" version))))))
11371 (home-page "https://jakarta.apache.org/oro/")
11372 (synopsis "Text-processing for Java")
11373 (description "The Jakarta-ORO Java classes are a set of text-processing
11374 Java classes that provide Perl5 compatible regular expressions, AWK-like
11375 regular expressions, glob expressions, and utility classes for performing
11376 substitutions, splits, filtering filenames, etc. This library is the successor
11377 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
11378 from ORO, Inc.")
11379 (license license:asl1.1)))
11380
11381 (define-public java-native-access
11382 (package
11383 (name "java-native-access")
11384 (version "4.5.1")
11385 (source (origin
11386 (method url-fetch)
11387 (uri (string-append "https://github.com/java-native-access/jna/"
11388 "archive/" version ".tar.gz"))
11389 (file-name (string-append name "-" version ".tar.gz"))
11390 (sha256
11391 (base32
11392 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
11393 (modules '((guix build utils)))
11394 (snippet
11395 `(begin
11396 (for-each delete-file (find-files "." ".*.jar"))
11397 (delete-file-recursively "native/libffi")
11398 (delete-file-recursively "dist")
11399 #t))))
11400 (build-system ant-build-system)
11401 (arguments
11402 `(#:tests? #f; FIXME: tests require reflections.jar
11403 #:test-target "test"
11404 #:make-flags (list "-Ddynlink.native=true")
11405 #:phases
11406 (modify-phases %standard-phases
11407 (add-before 'build 'fix-build.xml
11408 (lambda* (#:key inputs #:allow-other-keys)
11409 (substitute* "build.xml"
11410 ;; Since we removed the bundled ant.jar, give the correct path
11411 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
11412 ;; We removed generated native libraries. We can only rebuild one
11413 ;; so don't fail if we can't find a native library for another architecture.
11414 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
11415 ;; Copy test dependencies
11416 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
11417 "lib/junit.jar")
11418 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
11419 "jar$"))
11420 "lib/hamcrest-core.jar")
11421 ;; FIXME: once reflections.jar is built, copy it to lib/test.
11422 #t))
11423 (add-before 'build 'build-native
11424 (lambda _
11425 (invoke "ant" "-Ddynlink.native=true" "native")
11426 #t))
11427 (replace 'install
11428 (install-jars "build")))))
11429 (inputs
11430 `(("libffi" ,libffi)
11431 ("libx11" ,libx11)
11432 ("libxt" ,libxt)))
11433 (native-inputs
11434 `(("java-junit" ,java-junit)
11435 ("java-hamcrest-core" ,java-hamcrest-core)))
11436 (home-page "https://github.com/java-native-access/jna")
11437 (synopsis "Access to native shared libraries from Java")
11438 (description "JNA provides Java programs easy access to native shared
11439 libraries without writing anything but Java code - no JNI or native code is
11440 required. JNA allows you to call directly into native functions using natural
11441 Java method invocation.")
11442 ;; Java Native Access project (JNA) is dual-licensed under 2
11443 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
11444 (license (list
11445 license:asl2.0
11446 license:lgpl2.1+))))
11447
11448 (define-public java-native-access-platform
11449 (package
11450 (inherit java-native-access)
11451 (name "java-native-access-platform")
11452 (arguments
11453 `(#:test-target "test"
11454 #:tests? #f; require jna-test.jar
11455 #:phases
11456 (modify-phases %standard-phases
11457 (add-before 'build 'chdir
11458 (lambda _
11459 (chdir "contrib/platform")
11460 #t))
11461 (add-after 'chdir 'fix-ant
11462 (lambda* (#:key inputs #:allow-other-keys)
11463 (substitute* "nbproject/project.properties"
11464 (("../../build/jna.jar")
11465 (string-append (assoc-ref inputs "java-native-access")
11466 "/share/java/jna.jar"))
11467 (("../../lib/hamcrest-core-.*.jar")
11468 (car (find-files (assoc-ref inputs "java-hamcrest-core")
11469 "jar$")))
11470 (("../../lib/junit.jar")
11471 (car (find-files (assoc-ref inputs "java-junit")
11472 "jar$"))))
11473 #t))
11474 (replace 'install
11475 (install-jars "dist")))))
11476 (inputs
11477 `(("java-native-access" ,java-native-access)))
11478 (synopsis "Cross-platform mappings for jna")
11479 (description "java-native-access-platfrom has cross-platform mappings
11480 and mappings for a number of commonly used platform functions, including a
11481 large number of Win32 mappings as well as a set of utility classes that
11482 simplify native access.")))
11483
11484 (define-public java-jsch-agentproxy-core
11485 (package
11486 (name "java-jsch-agentproxy-core")
11487 (version "0.0.8")
11488 (source (origin
11489 (method url-fetch)
11490 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
11491 version ".tar.gz"))
11492 (file-name (string-append name "-" version ".tar.gz"))
11493 (sha256
11494 (base32
11495 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
11496 (build-system ant-build-system)
11497 (arguments
11498 `(#:jar-name "jsch-agentproxy-core.jar"
11499 #:source-dir "jsch-agent-proxy-core/src/main/java"
11500 #:tests? #f)); no tests
11501 (home-page "https://github.com/ymnk/jsch-agent-proxy")
11502 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
11503 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11504 and Pageant included Putty. It will be easily integrated into JSch, and users
11505 will be allowed to use these programs for authentication.")
11506 (license license:bsd-3)))
11507
11508 (define-public java-jsch-agentproxy-sshagent
11509 (package
11510 (inherit java-jsch-agentproxy-core)
11511 (name "java-jsch-agentproxy-sshagent")
11512 (arguments
11513 `(#:jar-name "jsch-agentproxy-sshagent.jar"
11514 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
11515 #:tests? #f)); no tests
11516 (inputs
11517 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11518 (synopsis "Proxy to ssh-agent")
11519 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11520 and Pageant included in Putty. This component contains the code for a proxy to
11521 ssh-agent.")))
11522
11523 (define-public java-jsch-agentproxy-usocket-jna
11524 (package
11525 (inherit java-jsch-agentproxy-core)
11526 (name "java-jsch-agentproxy-usocket-jna")
11527 (arguments
11528 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
11529 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
11530 #:tests? #f)); no tests
11531 (inputs
11532 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11533 ("java-native-access" ,java-native-access)))
11534 (synopsis "USocketFactory implementation using JNA")
11535 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11536 and Pageant included in Putty. This component contains an implementation of
11537 USocketFactory using @dfn{JNA} (Java Native Access).")))
11538
11539 (define-public java-jsch-agentproxy-pageant
11540 (package
11541 (inherit java-jsch-agentproxy-core)
11542 (name "java-jsch-agentproxy-pageant")
11543 (arguments
11544 `(#:jar-name "jsch-agentproxy-pageant.jar"
11545 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
11546 #:tests? #f)); no tests
11547 (inputs
11548 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11549 ("java-native-access" ,java-native-access)
11550 ("java-native-access-platform" ,java-native-access-platform)))
11551 (synopsis "Proxy to pageant")
11552 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11553 and Pageant included in Putty. This component contains the code for a proxy to
11554 pageant.")))
11555
11556 (define-public java-jsch-agentproxy-usocket-nc
11557 (package
11558 (inherit java-jsch-agentproxy-core)
11559 (name "java-jsch-agentproxy-usocket-nc")
11560 (arguments
11561 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
11562 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
11563 #:tests? #f)); no tests
11564 (inputs
11565 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11566 (synopsis "USocketFactory implementation using netcat")
11567 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11568 and Pageant included in Putty. This component contains an implementation of
11569 USocketFactory using netcat.")))
11570
11571 (define-public java-jsch-agentproxy-connector-factory
11572 (package
11573 (inherit java-jsch-agentproxy-core)
11574 (name "java-jsch-agentproxy-connector-factory")
11575 (arguments
11576 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11577 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11578 #:tests? #f)); no tests
11579 (inputs
11580 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11581 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11582 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11583 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11584 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11585 (synopsis "Connector factory for jsch agent proxy")
11586 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11587 and Pageant included in Putty. This component contains a connector factory.")))
11588
11589 (define-public java-jsch-agentproxy-jsch
11590 (package
11591 (inherit java-jsch-agentproxy-core)
11592 (name "java-jsch-agentproxy-jsch")
11593 (arguments
11594 `(#:jar-name "jsch-agentproxy-jsch.jar"
11595 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11596 #:tests? #f)); no tests
11597 (inputs
11598 `(("java-jsch" ,java-jsch)
11599 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11600 (synopsis "JSch integration library for agentproxy")
11601 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11602 and Pageant included in Putty. This component contains a library to use
11603 jsch-agent-proxy with JSch.")))
11604
11605 (define-public java-apache-ivy
11606 (package
11607 (name "java-apache-ivy")
11608 (version "2.4.0")
11609 (source (origin
11610 (method url-fetch)
11611 (uri (string-append "mirror://apache//ant/ivy/" version
11612 "/apache-ivy-" version "-src.tar.gz"))
11613 (sha256
11614 (base32
11615 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11616 (patches
11617 (search-patches
11618 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11619 (build-system ant-build-system)
11620 (arguments
11621 `(#:jar-name "ivy.jar"
11622 #:tests? #f
11623 #:phases
11624 (modify-phases %standard-phases
11625 (add-before 'build 'remove-example
11626 (lambda _
11627 (delete-file-recursively "src/example")
11628 #t))
11629 (add-before 'build 'copy-resources
11630 (lambda _
11631 (with-directory-excursion "src/java"
11632 (for-each (lambda (file)
11633 (install-file file (string-append "../../build/classes/" (dirname file))))
11634 (append
11635 (find-files "." ".*.css")
11636 (find-files "." ".*.ent")
11637 (find-files "." ".*.html")
11638 (find-files "." ".*.properties")
11639 (find-files "." ".*.xsd")
11640 (find-files "." ".*.xsl")
11641 (find-files "." ".*.xml"))))
11642 #t))
11643 (add-before 'build 'fix-vfs
11644 (lambda _
11645 (substitute*
11646 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11647 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11648 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11649 #t))
11650 (add-before 'install 'copy-manifest
11651 (lambda _
11652 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11653 #t))
11654 (add-before 'install 'repack
11655 (lambda _
11656 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
11657 "-C" "build/classes" ".")))
11658 (add-after 'install 'install-bin
11659 (lambda* (#:key outputs #:allow-other-keys)
11660 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11661 (ivy (string-append bin "/ivy"))
11662 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11663 (mkdir-p bin)
11664 (with-output-to-file ivy
11665 (lambda _
11666 (display (string-append
11667 "#!" (which "sh") "\n"
11668 "if [[ -z $CLASSPATH ]]; then\n"
11669 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11670 "else\n"
11671 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11672 "fi\n"
11673 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11674 (chmod ivy #o755)
11675 #t))))))
11676 (inputs
11677 `(("java-bouncycastle" ,java-bouncycastle)
11678 ("java-commons-cli" ,java-commons-cli)
11679 ("java-commons-collections" ,java-commons-collections)
11680 ("java-commons-httpclient" ,java-commons-httpclient)
11681 ("java-commons-lang" ,java-commons-lang)
11682 ("java-commons-vfs" ,java-commons-vfs)
11683 ("java-jakarta-oro" ,java-jakarta-oro)
11684 ("java-jsch" ,java-jsch)
11685 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11686 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11687 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11688 ("java-junit" ,java-junit)))
11689 (home-page "https://ant.apache.org/ivy")
11690 (synopsis "Dependency manager for the Java programming language")
11691 (description "Ivy is a tool for managing (recording, tracking, resolving
11692 and reporting) project dependencies. It is characterized by the following:
11693
11694 @itemize
11695 @item flexibility and configurability - Ivy is essentially process agnostic
11696 and is not tied to any methodology or structure. Instead it provides the
11697 necessary flexibility and configurability to be adapted to a broad range
11698 of dependency management and build processes.
11699 @item tight integration with Apache Ant - while available as a standalone tool,
11700 Ivy works particularly well with Apache Ant providing a number of
11701 powerful Ant tasks ranging from dependency resolution to dependency
11702 reporting and publication.
11703 @end itemize")
11704 (license license:asl2.0)))
11705
11706 (define-public java-eclipse-sisu-inject
11707 (package
11708 (name "java-eclipse-sisu-inject")
11709 (version "0.3.4")
11710 (source (origin
11711 (method git-fetch)
11712 (uri (git-reference
11713 (url "https://github.com/eclipse/sisu.inject/")
11714 (commit (string-append "releases/" version))))
11715 (file-name (git-file-name name version))
11716 (sha256
11717 (base32
11718 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
11719 (build-system ant-build-system)
11720 (arguments
11721 `(#:jar-name "eclipse-sisu-inject.jar"
11722 #:source-dir "org.eclipse.sisu.inject/src"
11723 #:tests? #f; no tests
11724 #:phases
11725 (modify-phases %standard-phases
11726 (replace 'install
11727 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
11728 (propagated-inputs
11729 `(("java-guice" ,java-guice)
11730 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
11731 (inputs
11732 `(("java-guice-servlet" ,java-guice-servlet)
11733 ("java-javax-inject" ,java-javax-inject)
11734 ("java-javaee-servletapi" ,java-javaee-servletapi)
11735 ("java-junit" ,java-junit)
11736 ("java-slf4j-api" ,java-slf4j-api)
11737 ("java-jsr305" ,java-jsr305)
11738 ("java-jsr250" ,java-jsr250)
11739 ("java-cdi-api" ,java-cdi-api)
11740 ("java-osgi-framework" ,java-osgi-framework)
11741 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11742 ("java-testng" ,java-testng)))
11743 (home-page "https://www.eclipse.org/sisu/")
11744 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11745 (description "Sisu is a modular JSR330-based container that supports
11746 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11747 Google-Guice to perform dependency injection and provide the core JSR330
11748 support, but removes the need to write explicit bindings in Guice modules.
11749 Integration with other containers via the Eclipse Extension Registry and the
11750 OSGi Service Registry is a goal of this project.")
11751 (license license:epl1.0)))
11752
11753 (define java-sisu-inject-parent-pom
11754 (package
11755 (inherit java-eclipse-sisu-inject)
11756 (name "java-sisu-inject-parent-pom")
11757 (arguments
11758 `(#:tests? #f
11759 #:phases
11760 (modify-phases %standard-phases
11761 (delete 'configure)
11762 (delete 'build)
11763 (replace 'install
11764 (install-pom-file "pom.xml")))))
11765 (propagated-inputs '())))
11766
11767 (define-public java-eclipse-sisu-plexus
11768 (package
11769 (name "java-eclipse-sisu-plexus")
11770 (version "0.3.4")
11771 (source (origin
11772 (method git-fetch)
11773 (uri (git-reference
11774 (url "https://github.com/eclipse/sisu.plexus")
11775 (commit (string-append "releases/" version))))
11776 (file-name (git-file-name name version))
11777 (sha256
11778 (base32
11779 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
11780 (modules '((guix build utils)))
11781 (snippet
11782 '(begin
11783 (for-each delete-file (find-files "." ".*.jar"))
11784 (rename-file "org.eclipse.sisu.plexus.tests/src"
11785 "org.eclipse.sisu.plexus.tests/java")
11786 #t))))
11787 (build-system ant-build-system)
11788 (arguments
11789 `(#:jar-name "eclipse-sisu-plexus.jar"
11790 #:source-dir "org.eclipse.sisu.plexus/src"
11791 #:test-dir "org.eclipse.sisu.plexus.tests"
11792 #:test-exclude
11793 (list
11794 ;; This test fails probably because we can't generate the necessary
11795 ;; meta-inf files.
11796 "**/PlexusLoggingTest.*"
11797 ;; FIXME: This test fails because of some injection error
11798 "**/PlexusRequirementTest.*")
11799 #:jdk ,icedtea-8
11800 #:phases
11801 (modify-phases %standard-phases
11802 (add-before 'build 'copy-resources
11803 (lambda _
11804 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11805 "build/classes/META-INF/plexus")
11806 #t))
11807 (add-before 'check 'build-test-jar
11808 (lambda _
11809 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11810 (mkdir "build")
11811 (with-directory-excursion "java"
11812 (apply invoke "javac" "-cp"
11813 (string-append (getenv "CLASSPATH")
11814 ":../../../../../build/classes")
11815 (find-files "." ".*.java"))
11816 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11817 (find-files "." ".*.jar")))
11818 (mkdir-p "build/META-INF/plexus")
11819 (copy-file "resources/META-INF/plexus/components.xml"
11820 "build/META-INF/plexus/components.xml")
11821 (with-directory-excursion "build"
11822 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11823 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11824 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11825 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11826 (("resources/component-jar")
11827 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11828 #t)))))
11829 (inputs
11830 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11831 ("java-plexus-util" ,java-plexus-utils)
11832 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11833 ("java-osgi-framework" ,java-osgi-framework)
11834 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11835 ("java-guice" ,java-guice)
11836 ("java-javax-inject" ,java-javax-inject)
11837 ("java-slf4j-api" ,java-slf4j-api)
11838 ("java-junit" ,java-junit)))
11839 (native-inputs
11840 `(("java-guava" ,java-guava)
11841 ("java-aopalliance" ,java-aopalliance)
11842 ("java-cglib" ,java-cglib)
11843 ("java-asm" ,java-asm)))
11844 (home-page "https://www.eclipse.org/sisu/")
11845 (synopsis "Plexus support for the sisu container")
11846 (description "Sisu is a modular JSR330-based container that supports
11847 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11848 adds Plexus support to the Sisu-Inject container.")
11849 (license license:epl1.0)))
11850
11851 (define-public java-commons-compiler
11852 (package
11853 (name "java-commons-compiler")
11854 (version "3.0.8")
11855 (source (origin
11856 (method git-fetch)
11857 (uri (git-reference
11858 (url "https://github.com/janino-compiler/janino")
11859 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11860 (file-name (string-append name "-" version))
11861 (sha256
11862 (base32
11863 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11864 (modules '((guix build utils)))
11865 (snippet
11866 '(begin
11867 (for-each delete-file
11868 (find-files "." "\\.jar$"))
11869 #t))))
11870 (build-system ant-build-system)
11871 (arguments
11872 `(#:jar-name "commons-compiler.jar"
11873 #:source-dir "commons-compiler/src/main"
11874 #:tests? #f)); no tests
11875 (home-page "https://github.com/janino-compiler/janino")
11876 (synopsis "Java compiler")
11877 (description "Commons-compiler contains an API for janino, including the
11878 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11879 and @code{ISimpleCompiler} interfaces.")
11880 (license license:bsd-3)))
11881
11882 (define-public java-janino
11883 (package
11884 (inherit java-commons-compiler)
11885 (name "java-janino")
11886 (arguments
11887 `(#:jar-name "janino.jar"
11888 #:source-dir "src/main/java"
11889 #:phases
11890 (modify-phases %standard-phases
11891 (add-before 'configure 'chdir
11892 (lambda _
11893 (chdir "janino")
11894 #t)))))
11895 (inputs
11896 `(("java-commons-compiler" ,java-commons-compiler)))
11897 (native-inputs
11898 `(("java-junit" ,java-junit)
11899 ("java-hamcrest-core" ,java-hamcrest-core)))
11900 (description "Janino is a Java compiler. Janino can compile a set of
11901 source files to a set of class files like @code{javac}, but also compile a
11902 Java expression, block, class body or source file in memory, load the bytecode
11903 and execute it directly in the same JVM. @code{janino} can also be used for
11904 static code analysis or code manipulation.")))
11905
11906 (define-public java-logback-core
11907 (package
11908 (name "java-logback-core")
11909 (version "1.2.3")
11910 (source (origin
11911 (method url-fetch)
11912 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11913 version ".tar.gz"))
11914 (file-name (string-append name "-" version ".tar.gz"))
11915 (sha256
11916 (base32
11917 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11918 (modules '((guix build utils)))
11919 (snippet
11920 '(begin
11921 (delete-file-recursively "logback-access/lib")
11922 #t))))
11923 (build-system ant-build-system)
11924 (arguments
11925 `(#:jar-name "logback.jar"
11926 #:source-dir "src/main/java"
11927 #:test-dir "src/test"
11928 #:test-exclude
11929 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11930 ;; which creates FastClasses
11931 (list "**/AllCoreTest.*"
11932 "**/AutoFlushingObjectWriterTest.*"
11933 "**/PackageTest.*"
11934 "**/ResilientOutputStreamTest.*"
11935 ;; And we still don't want to run abstract classes
11936 "**/Abstract*.*")
11937 #:phases
11938 (modify-phases %standard-phases
11939 (add-before 'configure 'chdir
11940 (lambda _
11941 (chdir "logback-core")
11942 #t)))))
11943 (inputs
11944 `(("java-javax-mail" ,java-javax-mail)
11945 ("servlet" ,java-javaee-servletapi)
11946 ("java-commons-compiler" ,java-commons-compiler)
11947 ("java-janino" ,java-janino)))
11948 (native-inputs
11949 `(("java-junit" ,java-junit)
11950 ("java-hamcrest-core" ,java-hamcrest-core)
11951 ("java-mockito-1" ,java-mockito-1)
11952 ("java-cglib" ,java-cglib)
11953 ("java-asm" ,java-asm)
11954 ("java-objenesis" ,java-objenesis)
11955 ("java-joda-time" ,java-joda-time)))
11956 (home-page "https://logback.qos.ch")
11957 (synopsis "Logging for java")
11958 (description "Logback is intended as a successor to the popular log4j project.
11959 This module lays the groundwork for the other two modules.")
11960 ;; Either epl1.0 or lgpl2.1
11961 (license (list license:epl1.0
11962 license:lgpl2.1))))
11963
11964 (define-public java-logback-classic
11965 (package
11966 (inherit java-logback-core)
11967 (name "java-logback-classic")
11968 (arguments
11969 `(#:jar-name "logback-classic.jar"
11970 #:source-dir "src/main/java"
11971 #:test-dir "src/test"
11972 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11973 #:jdk ,icedtea-8
11974 #:phases
11975 (modify-phases %standard-phases
11976 (add-before 'configure 'chdir
11977 (lambda _
11978 (chdir "logback-classic")
11979 #t))
11980 (replace 'build
11981 (lambda* (#:key inputs #:allow-other-keys)
11982 (mkdir-p "build/classes")
11983 (setenv "CLASSPATH"
11984 (string-join
11985 (apply append (map (lambda (input)
11986 (find-files (assoc-ref inputs input)
11987 ".*.jar"))
11988 '("java-logback-core" "java-slf4j-api"
11989 "java-commons-compiler" "servlet"
11990 "groovy")))
11991 ":"))
11992 (apply invoke "groovyc" "-d" "build/classes" "-j"
11993 (find-files "src/main/" ".*\\.(groovy|java)$"))
11994 (invoke "ant" "jar")
11995 #t)))))
11996 (inputs
11997 `(("java-logback-core" ,java-logback-core)
11998 ("java-slf4j-api" ,java-slf4j-api)
11999 ,@(package-inputs java-logback-core)))
12000 (native-inputs
12001 `(("groovy" ,groovy)))
12002 (description "Logback is intended as a successor to the popular log4j project.
12003 This module can be assimilated to a significantly improved version of log4j.
12004 Moreover, @code{logback-classic} natively implements the slf4j API so that you
12005 can readily switch back and forth between logback and other logging frameworks
12006 such as log4j or @code{java.util.logging} (JUL).")))
12007
12008 (define-public java-jgit
12009 (package
12010 (name "java-jgit")
12011 (version "4.7.0.201704051617-r")
12012 (source (origin
12013 (method url-fetch)
12014 (uri (string-append "https://repo1.maven.org/maven2/"
12015 "org/eclipse/jgit/org.eclipse.jgit/"
12016 version "/org.eclipse.jgit-"
12017 version "-sources.jar"))
12018 (sha256
12019 (base32
12020 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
12021 (build-system ant-build-system)
12022 (arguments
12023 `(#:tests? #f ; There are no tests to run.
12024 #:jar-name "jgit.jar"
12025 ;; JGit must be built with a JDK supporting Java 8.
12026 #:jdk ,icedtea-8
12027 ;; Target our older default JDK.
12028 #:make-flags (list "-Dtarget=1.7")
12029 #:phases
12030 (modify-phases %standard-phases
12031 ;; The jar file generated by the default build.xml does not include
12032 ;; the text properties files, so we need to add them.
12033 (add-after 'build 'add-properties
12034 (lambda* (#:key jar-name #:allow-other-keys)
12035 (with-directory-excursion "src"
12036 (apply invoke "jar" "-uf"
12037 (string-append "../build/jar/" jar-name)
12038 (find-files "." "\\.properties$")))
12039 #t)))))
12040 (inputs
12041 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
12042 ("java-javaewah" ,java-javaewah)
12043 ("java-jsch" ,java-jsch)
12044 ("java-slf4j-api" ,java-slf4j-api)))
12045 (home-page "https://eclipse.org/jgit/")
12046 (synopsis "Java library implementing the Git version control system")
12047 (description "JGit is a lightweight, pure Java library implementing the
12048 Git version control system, providing repository access routines, support for
12049 network protocols, and core version control algorithms.")
12050 (license license:edl1.0)))
12051
12052 ;; For axoloti. This package can still be built with icedtea-7, which is
12053 ;; currently used as the default JDK.
12054 (define-public java-jgit-4.2
12055 (package (inherit java-jgit)
12056 (version "4.2.0.201601211800-r")
12057 (source (origin
12058 (method url-fetch)
12059 (uri (string-append "https://repo1.maven.org/maven2/"
12060 "org/eclipse/jgit/org.eclipse.jgit/"
12061 version "/org.eclipse.jgit-"
12062 version "-sources.jar"))
12063 (sha256
12064 (base32
12065 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
12066 (build-system ant-build-system)
12067 (arguments
12068 (substitute-keyword-arguments (package-arguments java-jgit)
12069 ;; Build for default JDK.
12070 ((#:jdk _) icedtea-7)
12071 ((#:phases phases)
12072 `(modify-phases ,phases
12073 (add-after 'unpack 'use-latest-javaewah-API
12074 (lambda _
12075 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
12076 (("wordinbits") "WORD_IN_BITS"))
12077 #t))))))
12078 (inputs
12079 `(("java-javaewah" ,java-javaewah)
12080 ("java-jsch" ,java-jsch)
12081 ("java-slf4j-api" ,java-slf4j-api)))))
12082
12083 (define-public abcl
12084 (package
12085 (name "abcl")
12086 (version "1.6.0")
12087 (source
12088 (origin
12089 (method url-fetch)
12090 (uri (string-append "https://abcl.org/releases/"
12091 version "/abcl-src-" version ".tar.gz"))
12092 (sha256
12093 (base32
12094 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
12095 (patches
12096 (search-patches
12097 "abcl-fix-build-xml.patch"))))
12098 (build-system ant-build-system)
12099 (native-inputs
12100 `(("java-junit" ,java-junit)))
12101 (arguments
12102 `(#:build-target "abcl.jar"
12103 #:test-target "abcl.test"
12104 #:phases
12105 (modify-phases %standard-phases
12106 (replace 'install
12107 (lambda* (#:key outputs #:allow-other-keys)
12108 (let ((share (string-append (assoc-ref outputs "out")
12109 "/share/java/"))
12110 (bin (string-append (assoc-ref outputs "out")
12111 "/bin/")))
12112 (mkdir-p share)
12113 (install-file "dist/abcl.jar" share)
12114 (install-file "dist/abcl-contrib.jar" share)
12115 (mkdir-p bin)
12116 (with-output-to-file (string-append bin "abcl")
12117 (lambda _
12118 (let ((classpath (string-append
12119 share "abcl.jar"
12120 ":"
12121 share "abcl-contrib.jar")))
12122 (display (string-append
12123 "#!" (which "sh") "\n"
12124 "if [[ -z $CLASSPATH ]]; then\n"
12125 " cp=\"" classpath "\"\n"
12126 "else\n"
12127 " cp=\"" classpath ":$CLASSPATH\"\n"
12128 "fi\n"
12129 "exec " (which "java")
12130 " -cp $cp org.armedbear.lisp.Main $@\n")))))
12131 (chmod (string-append bin "abcl") #o755)
12132 #t))))))
12133 (home-page "https://abcl.org/")
12134 (synopsis "Common Lisp Implementation on the JVM")
12135 (description
12136 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
12137 Lisp language featuring both an interpreter and a compiler, running in the
12138 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
12139 in any Java application. Additionally, it can be used to implement (parts of)
12140 the application using Java to Lisp integration APIs.")
12141 (license (list license:gpl2+
12142 ;; named-readtables is released under 3 clause BSD
12143 license:bsd-3
12144 ;; jfli is released under CPL 1.0
12145 license:cpl1.0))))
12146
12147 (define-public java-jsonp-api
12148 (package
12149 (name "java-jsonp-api")
12150 (version "1.1.6")
12151 (source (origin
12152 (method git-fetch)
12153 (uri (git-reference
12154 (url "https://github.com/eclipse-ee4j/jsonp")
12155 (commit (string-append "1.1-" version "-RELEASE"))))
12156 (file-name (git-file-name name version))
12157 (sha256
12158 (base32
12159 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
12160 (build-system ant-build-system)
12161 (arguments
12162 `(#:jar-name "jsonp-api.jar"
12163 #:tests? #f
12164 #:source-dir "api/src/main/java"
12165 #:test-dir "api/src/test"))
12166 (home-page "https://eclipse-ee4j.github.io/jsonp/")
12167 (synopsis "JSON Processing in Java")
12168 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
12169 parse, generate, transform and query) JSON messages. It produces and
12170 consumes JSON text in a streaming fashion (similar to StAX API for XML)
12171 and allows building a Java object model for JSON text using API classes
12172 (similar to DOM API for XML).")
12173 ;; either gpl2 only with classpath exception, or epl2.0.
12174 (license (list license:gpl2
12175 license:epl2.0))))
12176
12177 (define-public java-jsonp-impl
12178 (package
12179 (inherit java-jsonp-api)
12180 (name "java-jsonp-impl")
12181 (arguments
12182 `(#:jar-name "jsonp-impl.jar"
12183 #:tests? #f
12184 #:source-dir "impl/src/main/java"
12185 #:test-dir "impl/src/test"
12186 #:phases
12187 (modify-phases %standard-phases
12188 (add-before 'build 'copy-resources
12189 (lambda _
12190 (copy-recursively
12191 "impl/src/main/resources/"
12192 "build/classes")
12193 #t)))))
12194 (propagated-inputs
12195 `(("java-jsonp-api" ,java-jsonp-api)))
12196 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
12197 parse, generate, transform and query) JSON messages. This package contains
12198 a reference implementation of that API.")))
12199
12200 (define-public java-xmp
12201 (package
12202 (name "java-xmp")
12203 (version "5.1.3")
12204 (source (origin
12205 (method url-fetch)
12206 (uri (string-append "http://download.macromedia.com/pub/developer"
12207 "/xmp/sdk/XMPCoreJava-" version ".zip"))
12208 (sha256
12209 (base32
12210 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
12211 (build-system ant-build-system)
12212 (arguments
12213 `(#:build-target "build"
12214 #:tests? #f; no tests
12215 #:phases
12216 (modify-phases %standard-phases
12217 (add-after 'unpack 'chdir
12218 (lambda _
12219 (chdir "XMPCore")
12220 #t))
12221 (add-before 'build 'fix-timestamp
12222 (lambda _
12223 (substitute* "build.xml"
12224 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
12225 #t))
12226 (replace 'install
12227 (install-jars "."))
12228 (add-after 'install 'install-doc
12229 (lambda* (#:key outputs #:allow-other-keys)
12230 (copy-recursively
12231 "docs"
12232 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
12233 #t)))))
12234 (native-inputs
12235 `(("unzip" ,unzip)))
12236 (home-page "https://www.adobe.com/devnet/xmp.html")
12237 (synopsis "Extensible Metadat Platform (XMP) support in Java")
12238 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
12239 technology that allows you to embed data about a file, known as metadata,
12240 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
12241 library and the API is similar.")
12242 (license license:bsd-3)))
12243
12244 (define-public java-metadata-extractor
12245 (package
12246 (name "java-metadata-extractor")
12247 (version "2.11.0")
12248 (source (origin
12249 (method git-fetch)
12250 (uri (git-reference
12251 (url "https://github.com/drewnoakes/metadata-extractor")
12252 (commit version)))
12253 (file-name (git-file-name name version))
12254 (sha256
12255 (base32
12256 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
12257 (build-system ant-build-system)
12258 (arguments
12259 `(#:jar-name "metadata-extractor.jar"
12260 #:source-dir "Source"
12261 #:test-dir "Tests"
12262 #:phases
12263 (modify-phases %standard-phases
12264 (add-before 'check 'fix-test-dir
12265 (lambda _
12266 (substitute* "build.xml"
12267 (("/java\">") "\">"))
12268 #t)))))
12269 (propagated-inputs
12270 `(("java-xmp" ,java-xmp)))
12271 (native-inputs
12272 `(("java-hamcrest-core" ,java-hamcrest-core)
12273 ("java-junit" ,java-junit)))
12274 (home-page "https://github.com/drewnoakes/metadata-extractor")
12275 (synopsis "Extract metadata from image and video files")
12276 (description "Metadata-extractor is a straightforward Java library for
12277 reading metadata from image files. It is able to read metadata in Exif,
12278 IPTC, XMP, ICC and more formats.")
12279 (license license:asl2.0)))
12280
12281 (define-public java-svg-salamander
12282 (package
12283 (name "java-svg-salamander")
12284 (version "1.1.2")
12285 (source (origin
12286 (method git-fetch)
12287 (uri (git-reference
12288 (url "https://github.com/blackears/svgSalamander")
12289 (commit (string-append "v" version))))
12290 (file-name (git-file-name name version))
12291 (sha256
12292 (base32
12293 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
12294 (modules '((guix build utils)))
12295 (snippet
12296 '(begin
12297 (for-each delete-file (find-files "." ".*.jar"))
12298 #t))
12299 (patches
12300 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
12301 (build-system ant-build-system)
12302 (arguments
12303 `(#:tests? #f; no tests
12304 #:phases
12305 (modify-phases %standard-phases
12306 (add-after 'unpack 'chdir
12307 (lambda _
12308 (chdir "svg-core")
12309 #t))
12310 (add-before 'build 'copy-jars
12311 (lambda* (#:key inputs #:allow-other-keys)
12312 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
12313 "../libraries/javacc.jar")
12314 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
12315 "../libraries/ant.jar")
12316 #t))
12317 (replace 'install
12318 (install-jars "dist")))))
12319 (native-inputs
12320 `(("javacc" ,javacc)))
12321 (home-page "https://github.com/blackears/svgSalamander")
12322 (synopsis "SVG engine for Java")
12323 (description "SVG Salamander is an SVG engine for Java that's designed
12324 to be small, fast, and allow programmers to use it with a minimum of fuss.
12325 It's in particular targeted for making it easy to integrate SVG into Java
12326 games and making it much easier for artists to design 2D game content - from
12327 rich interactive menus to charts and graphcs to complex animations.")
12328 (license license:bsd-2)))
12329
12330 (define-public java-jboss-transaction-api-spec
12331 (package
12332 (name "java-jboss-transaction-api-spec")
12333 (version "1.2+1.1.1")
12334 (source (origin
12335 (method git-fetch)
12336 (uri (git-reference
12337 (url "https://github.com/jboss/jboss-transaction-api_spec")
12338 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
12339 (file-name (git-file-name name version))
12340 (sha256
12341 (base32
12342 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
12343 (build-system ant-build-system)
12344 (arguments
12345 `(#:jar-name "java-jboss-transaction-api_spec.jar"
12346 #:source-dir "src/main/java"
12347 #:tests? #f)); no tests
12348 (inputs
12349 `(("java-cdi-api" ,java-cdi-api)
12350 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
12351 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
12352 (synopsis "Generic transaction management API in Java")
12353 (description "Java-jboss-transaction-api-spec implements the Transactions
12354 API. A transaction is a unit of work containing one or more operations
12355 involving one or more shared resources having ACID (Atomicity, Consistency,
12356 Isolation and Durability) properties.")
12357 ;; either gpl2 only with classpath exception or cddl.
12358 (license (list license:gpl2 license:cddl1.0))))
12359
12360 (define-public java-picocli
12361 (package
12362 (name "java-picocli")
12363 (version "4.3.2")
12364 (source (origin
12365 (method git-fetch)
12366 (uri (git-reference
12367 (url "https://github.com/remkop/picocli")
12368 (commit (string-append "v" version))))
12369 (file-name (git-file-name name version))
12370 (sha256
12371 (base32
12372 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
12373 (build-system ant-build-system)
12374 (arguments
12375 `(#:jar-name "picocli.jar"
12376 #:source-dir "src/main/java"
12377 ;; Tests require missing dependencies (junitparams, system-rules)
12378 #:tests? #f))
12379 (home-page "https://picocli.info")
12380 (synopsis "REPL for the JVM")
12381 (description "Picocli is a framework for building command line applications
12382 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
12383 in Java, usable from Groovy, Kotlin, Scala, etc.")
12384 (license license:asl2.0)))
12385
12386 (define-public java-jetbrains-annotations
12387 (package
12388 (name "java-jetbrains-annotations")
12389 (version "19.0.0")
12390 (source (origin
12391 (method git-fetch)
12392 (uri (git-reference
12393 (url "https://github.com/JetBrains/java-annotations")
12394 (commit version)))
12395 (file-name (git-file-name name version))
12396 (sha256
12397 (base32
12398 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
12399 (build-system ant-build-system)
12400 (arguments
12401 `(#:jar-name "jetbrains-annotations.jar"
12402 #:source-dir "common/src/main/java:java8/src/main/java"
12403 #:tests? #f)); no tests
12404 (home-page "https://github.com/JetBrains/java-annotations")
12405 (synopsis "Annotations for Java and other JVM languages")
12406 (description "This package contains a set of Java annotations which can be
12407 used in JVM-based languages. They serve as an additional documentation and
12408 can be interpreted by IDEs and static analysis tools to improve code analysis.")
12409 (license license:expat)))