gnu: maven: Install from pom file.
[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 "/lib/m2\" includes=\"**/*.jar\"/>"))
3595 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3596 (("lib/asm-commons-4.0.jar")
3597 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3598 "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 #:phases
4185 (modify-phases %standard-phases
4186 (add-before 'build 'fix-google-collections
4187 (lambda _
4188 ;; Google collections are now replaced with guava
4189 (substitute* "plexus-container-default/pom.xml"
4190 (("google-collections") "guava")
4191 (("com.google.collections") "com.google.guava"))
4192 #t))
4193 (add-before 'build 'copy-resources
4194 (lambda _
4195 (copy-recursively
4196 "plexus-container-default/src/main/resources/"
4197 "build/classes")
4198 #t))
4199 (add-before 'check 'fix-paths
4200 (lambda _
4201 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4202 (substitute*
4203 (string-append
4204 dir "/plexus/component/composition/"
4205 "ComponentRealmCompositionTest.java")
4206 (("src/test") "plexus-container-default/src/test"))
4207 #t)))
4208 (replace 'install
4209 (install-from-pom "plexus-container-default/pom.xml")))))
4210 (inputs
4211 `(("worldclass" ,java-plexus-classworlds)
4212 ("xbean" ,java-geronimo-xbean-reflect)
4213 ("utils" ,java-plexus-utils)
4214 ("junit" ,java-junit)
4215 ("guava" ,java-guava)))
4216 (native-inputs
4217 `(("archiver" ,java-plexus-archiver)
4218 ("hamcrest" ,java-hamcrest-core)))))
4219
4220 (define-public java-plexus-component-annotations
4221 (package
4222 (inherit java-plexus-container-default)
4223 (name "java-plexus-component-annotations")
4224 (arguments
4225 `(#:jar-name "plexus-component-annotations.jar"
4226 #:source-dir "plexus-component-annotations/src/main/java"
4227 #:tests? #f; no tests
4228 #:phases
4229 (modify-phases %standard-phases
4230 (replace 'install
4231 (install-from-pom "plexus-component-annotations/pom.xml")))))
4232 (propagated-inputs
4233 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4234 (inputs '())
4235 (native-inputs '())
4236 (synopsis "Plexus descriptors generator")
4237 (description "This package is a Maven plugin to generate Plexus descriptors
4238 from source tags and class annotations.")))
4239
4240 (define-public java-plexus-cipher
4241 (package
4242 (name "java-plexus-cipher")
4243 (version "1.7")
4244 (source (origin
4245 (method git-fetch)
4246 (uri (git-reference
4247 (url "https://github.com/codehaus-plexus/plexus-cipher")
4248 (commit (string-append "plexus-cipher-" version))))
4249 (file-name (git-file-name name version))
4250 (sha256
4251 (base32
4252 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4253 (build-system ant-build-system)
4254 (arguments
4255 `(#:jar-name "plexus-cipher.jar"
4256 #:source-dir "src/main/java"
4257 #:tests? #f; FIXME: requires sisu-inject-bean
4258 #:phases
4259 (modify-phases %standard-phases
4260 (add-before 'build 'copy-resources
4261 (lambda _
4262 (copy-recursively "src/main/resources" "build/classes")
4263 (mkdir-p "build/classes/META-INF/sisu")
4264 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4265 (lambda _
4266 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4267 #t))
4268 (add-before 'install 'fix-test-dependency
4269 (lambda _
4270 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4271 (substitute* "pom.xml"
4272 (("provided") "test"))
4273 #t))
4274 (replace 'install (install-from-pom "pom.xml")))))
4275 (inputs
4276 `(("java-cdi-api" ,java-cdi-api)
4277 ("java-javax-inject" ,java-javax-inject)))
4278 (propagated-inputs
4279 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4280 (native-inputs
4281 `(("java-junit" ,java-junit)))
4282 (home-page "https://github.com/sonatype/plexus-cipher")
4283 (synopsis "Encryption/decryption Component")
4284 (description "Plexus-cipher contains a component to deal with encryption
4285 and decryption.")
4286 (license license:asl2.0)))
4287
4288 (define-public java-plexus-compiler-api
4289 (package
4290 (name "java-plexus-compiler-api")
4291 (version "2.8.4")
4292 (source (origin
4293 (method git-fetch)
4294 (uri (git-reference
4295 (url "https://github.com/codehaus-plexus/plexus-compiler")
4296 (commit (string-append "plexus-compiler-" version))))
4297 (file-name (git-file-name name version))
4298 (sha256
4299 (base32
4300 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4301 (build-system ant-build-system)
4302 (arguments
4303 `(#:jar-name "plexus-compiler-api.jar"
4304 #:source-dir "plexus-compiler-api/src/main/java"
4305 #:jdk ,icedtea-8
4306 #:test-dir "plexus-compiler-api/src/test"))
4307 (inputs
4308 `(("java-plexus-container-default" ,java-plexus-container-default)
4309 ("java-plexus-util" ,java-plexus-utils)))
4310 (native-inputs
4311 `(("java-junit" ,java-junit)))
4312 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4313 (synopsis "Plexus Compilers component's API to manipulate compilers")
4314 (description "This package contains the API used by components to manipulate
4315 compilers.")
4316 (license (list license:asl2.0
4317 license:expat))))
4318
4319 (define-public java-plexus-compiler-javac
4320 (package
4321 (inherit java-plexus-compiler-api)
4322 (name "java-plexus-compiler-javac")
4323 (arguments
4324 `(#:jar-name "plexus-compiler-javac.jar"
4325 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4326 #:jdk ,icedtea-8
4327 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4328 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
4329 (inputs
4330 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4331 ("java-plexus-utils" ,java-plexus-utils)
4332 ("java-plexus-container-default" ,java-plexus-container-default)))
4333 (native-inputs
4334 `(("java-junit" ,java-junit)))
4335 (synopsis "Javac Compiler support for Plexus Compiler component")
4336 (description "This package contains the Javac Compiler support for Plexus
4337 Compiler component.")))
4338
4339 (define-public java-plexus-sec-dispatcher
4340 (package
4341 (name "java-plexus-sec-dispatcher")
4342 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4343 (source (origin
4344 ;; This project doesn't tag releases or publish tarballs, so we take
4345 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4346 (method git-fetch)
4347 (uri (git-reference
4348 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4349 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4350 (sha256
4351 (base32
4352 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4353 (file-name (git-file-name name version))))
4354 (arguments
4355 `(#:jar-name "plexus-sec-dispatcher.jar"
4356 #:source-dir "src/main/java"
4357 #:phases
4358 (modify-phases %standard-phases
4359 (add-before 'build 'generate-models
4360 (lambda* (#:key inputs #:allow-other-keys)
4361 (define (modello-single-mode file version mode)
4362 (invoke "java"
4363 "org.codehaus.modello.ModelloCli"
4364 file mode "src/main/java" version
4365 "false" "true"))
4366 (let ((file "src/main/mdo/settings-security.mdo"))
4367 (modello-single-mode file "1.0.0" "java")
4368 (modello-single-mode file "1.0.0" "xpp3-reader")
4369 (modello-single-mode file "1.0.0" "xpp3-writer"))
4370 #t))
4371 (add-before 'build 'generate-components.xml
4372 (lambda _
4373 (mkdir-p "build/classes/META-INF/plexus")
4374 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4375 (lambda _
4376 (display
4377 "<component-set>\n
4378 <components>\n
4379 <component>\n
4380 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4381 <role-hint>default</role-hint>\n
4382 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4383 <description></description>\n
4384 <requirements>\n
4385 <requirement>\n
4386 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4387 <field-name>_cipher</field-name>\n
4388 </requirement>\n
4389 <requirement>\n
4390 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4391 <field-name>_decryptors</field-name>\n
4392 </requirement>\n
4393 </requirements>\n
4394 <configuration>\n
4395 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4396 </configuration>\n
4397 </component>\n
4398 </components>\n
4399 </component-set>\n")))
4400 #t))
4401 (add-before 'check 'fix-paths
4402 (lambda _
4403 (copy-recursively "src/test/resources" "target")
4404 #t))
4405 (replace 'install (install-from-pom "pom.xml")))))
4406 (propagated-inputs
4407 `(("java-plexus-utils" ,java-plexus-utils)
4408 ("java-plexus-cipher" ,java-plexus-cipher)
4409 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4410 (native-inputs
4411 `(("java-modello-core" ,java-modello-core)
4412 ;; for modello:
4413 ("java-plexus-container-default" ,java-plexus-container-default)
4414 ("java-plexus-classworlds" ,java-plexus-classworlds)
4415 ("java-plexus-utils" ,java-plexus-utils)
4416 ("java-guava" ,java-guava)
4417 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4418 ("java-sisu-build-api" ,java-sisu-build-api)
4419 ;; modello plugins:
4420 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4421 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4422 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4423 ;; for tests
4424 ("java-junit" ,java-junit)))
4425 (build-system ant-build-system)
4426 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4427 (synopsis "Plexus Security Dispatcher Component")
4428 (description "This package is the Plexus Security Dispatcher Component.
4429 This component decrypts a string passed to it.")
4430 (license license:asl2.0)))
4431
4432 (define-public java-plexus-cli
4433 (package
4434 (name "java-plexus-cli")
4435 (version "1.7")
4436 (source (origin
4437 (method git-fetch)
4438 (uri (git-reference
4439 (url "https://github.com/sonatype/plexus-cli")
4440 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4441 (file-name (string-append name "-" version))
4442 (sha256
4443 (base32
4444 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4445 (build-system ant-build-system)
4446 (arguments
4447 `(#:jar-name "plexus-cli.jar"
4448 #:source-dir "src/main/java"
4449 #:jdk ,icedtea-8
4450 #:test-dir "src/test"))
4451 (inputs
4452 `(("java-commons-cli" ,java-commons-cli)
4453 ("java-plexus-container-default" ,java-plexus-container-default)
4454 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4455 (native-inputs
4456 `(("java-plexus-utils" ,java-plexus-utils)
4457 ("java-junit" ,java-junit)
4458 ("java-guava" ,java-guava)))
4459 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4460 (synopsis "CLI building library for plexus")
4461 (description "This package is a library to help creating CLI around
4462 Plexus components.")
4463 (license license:asl2.0)))
4464
4465 (define-public java-sisu-build-api
4466 (package
4467 (name "java-sisu-build-api")
4468 (version "0.0.7")
4469 (source (origin
4470 (method git-fetch)
4471 (uri (git-reference
4472 (url "https://github.com/sonatype/sisu-build-api")
4473 (commit (string-append "plexus-build-api-" version))))
4474 (file-name (git-file-name name version))
4475 (sha256
4476 (base32
4477 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4478 (build-system ant-build-system)
4479 (arguments
4480 `(#:jar-name "sisu-build-api.jar"
4481 #:source-dir "src/main/java"
4482 #:jdk ,icedtea-8
4483 #:tests? #f; FIXME: how to run the tests?
4484 #:phases
4485 (modify-phases %standard-phases
4486 (add-before 'build 'copy-resources
4487 (lambda _
4488 (copy-recursively "src/main/resources" "build/classes")
4489 (substitute* (find-files "build/classes")
4490 (("\\$\\{project.version\\}") ,version))
4491 #t))
4492 (add-before 'build 'generate-plexus-compontent
4493 (lambda _
4494 (mkdir-p "build/classes/META-INF/plexus")
4495 ;; This file is required for plexus to inject this package.
4496 ;; FIXME: how is it generated?
4497 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4498 (lambda _
4499 (display
4500 "<component-set>\n
4501 <components>\n
4502 <component>\n
4503 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4504 <role-hint>default</role-hint>\n
4505 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4506 <description>Filesystem based non-incremental build context implementation\n
4507 which behaves as if all files were just created.</description>\n
4508 </component>\n
4509 </components>\n
4510 </component-set>\n")))
4511 #t)))))
4512 (inputs
4513 `(("java-plexus-utils" ,java-plexus-utils)
4514 ("java-plexus-container-default" ,java-plexus-container-default)))
4515 (home-page "https://github.com/sonatype/sisu-build-api/")
4516 (synopsis "Base build API for maven")
4517 (description "This package contains the base build API for maven and
4518 a default implementation of it. This API is about scanning files in a
4519 project and determining what files need to be rebuilt.")
4520 (license license:asl2.0)))
4521
4522 (define-public java-modello-core
4523 (package
4524 (name "java-modello-core")
4525 (version "1.9.1")
4526 (source (origin
4527 (method git-fetch)
4528 (uri (git-reference
4529 (url "https://github.com/codehaus-plexus/modello")
4530 (commit (string-append "modello-" version))))
4531 (file-name (git-file-name name version))
4532 (sha256
4533 (base32
4534 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4535 (build-system ant-build-system)
4536 (arguments
4537 `(#:jar-name "modello-core.jar"
4538 #:source-dir "modello-core/src/main/java"
4539 #:test-dir "modello-core/src/test"
4540 #:main-class "org.codehaus.modello.ModelloCli"
4541 #:jdk ,icedtea-8
4542 #:phases
4543 (modify-phases %standard-phases
4544 (add-before 'build 'copy-resources
4545 (lambda _
4546 (mkdir-p "build/classes/META-INF/plexus")
4547 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4548 "build/classes/META-INF/plexus/components.xml")
4549 #t))
4550 (add-before 'check 'fix-tests
4551 (lambda _
4552 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4553 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4554 "modello/core/io/ModelReaderTest.java")
4555 (("src/test") "modello-core/src/test")))
4556 #t)))))
4557 (inputs
4558 `(("java-plexus-utils" ,java-plexus-utils)
4559 ("java-plexus-container-default" ,java-plexus-container-default)
4560 ("java-sisu-build-api" ,java-sisu-build-api)))
4561 (native-inputs
4562 `(("java-junit" ,java-junit)
4563 ("java-plexus-classworlds" ,java-plexus-classworlds)
4564 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4565 ("java-guava" ,java-guava)))
4566 (home-page "https://codehaus-plexus.github.io/modello/")
4567 (synopsis "Framework for code generation from a simple model")
4568 (description "Modello is a framework for code generation from a simple model.
4569
4570 Modello generates code from a simple model format: based on a plugin
4571 architecture, various types of code and descriptors can be generated from the
4572 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4573 XSD and documentation.")
4574 (license (list
4575 license:expat
4576 ;; Although this package uses only files licensed under expat,
4577 ;; other parts of the source are licensed under different
4578 ;; licenses. We include them to be inherited by other packages.
4579 license:asl2.0
4580 ;; Some files in modello-plugin-java are licensed under a
4581 ;; 5-clause BSD license.
4582 (license:non-copyleft
4583 (string-append "file:///modello-plugins/modello-plugin-java/"
4584 "src/main/java/org/codehaus/modello/plugin/"
4585 "java/javasource/JNaming.java"))))))
4586
4587 (define-public java-modello-plugins-java
4588 (package
4589 (inherit java-modello-core)
4590 (name "java-modello-plugins-java")
4591 (arguments
4592 `(#:jar-name "modello-plugins-java.jar"
4593 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4594 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4595 #:jdk ,icedtea-8
4596 #:tests? #f; requires maven-model, which depends on this package
4597 #:phases
4598 (modify-phases %standard-phases
4599 (add-before 'build 'copy-resources
4600 (lambda _
4601 (mkdir-p "build/classes")
4602 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4603 "build/classes")
4604 #t)))))
4605 (inputs
4606 `(("java-modello-core" ,java-modello-core)
4607 ,@(package-inputs java-modello-core)))
4608 (synopsis "Modello Java Plugin")
4609 (description "Modello Java Plugin generates Java objects for the model.")))
4610
4611 (define-public java-modello-plugins-xml
4612 (package
4613 (inherit java-modello-core)
4614 (name "java-modello-plugins-xml")
4615 (arguments
4616 `(#:jar-name "modello-plugins-xml.jar"
4617 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4618 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4619 #:jdk ,icedtea-8
4620 #:phases
4621 (modify-phases %standard-phases
4622 (add-before 'build 'copy-resources
4623 (lambda _
4624 (mkdir-p "build/classes")
4625 (copy-recursively
4626 "modello-plugins/modello-plugin-xml/src/main/resources"
4627 "build/classes")
4628 #t))
4629 (add-before 'check 'fix-paths
4630 (lambda _
4631 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4632 (substitute*
4633 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4634 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4635 #t)))))
4636 (inputs
4637 `(("java-modello-core" ,java-modello-core)
4638 ("java-modello-plugins-java" ,java-modello-plugins-java)
4639 ,@(package-inputs java-modello-core)))
4640 (synopsis "Modello XML Plugin")
4641 (description "Modello XML Plugin contains shared code for every plugins
4642 working on XML representation of the model.")))
4643
4644 (define-public java-modello-test
4645 (package
4646 (inherit java-modello-core)
4647 (name "java-modello-test")
4648 (arguments
4649 `(#:jar-name "modello-test.jar"
4650 #:source-dir "modello-test/src/main/java"
4651 #:tests? #f; no tests
4652 #:jdk ,icedtea-8))
4653 (inputs
4654 `(("java-plexus-utils" ,java-plexus-utils)
4655 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4656 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4657 ("java-plexus-container-default" ,java-plexus-container-default)))
4658 (synopsis "Modello test package")
4659 (description "The modello test package contains the basis to create
4660 Modello generator unit-tests, including sample models and xml files to test
4661 every feature for every plugin.")))
4662
4663 (define-public java-modello-plugins-xpp3
4664 (package
4665 (inherit java-modello-core)
4666 (name "java-modello-plugins-xpp3")
4667 (arguments
4668 `(#:jar-name "modello-plugins-xpp3.jar"
4669 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4670 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4671 ;; One of the test dependencies is maven-model which depends on this package.
4672 #:tests? #f
4673 #:jdk ,icedtea-8
4674 #:phases
4675 (modify-phases %standard-phases
4676 (add-before 'build 'copy-resources
4677 (lambda _
4678 (mkdir-p "build/classes")
4679 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4680 "build/classes")
4681 #t)))))
4682 (inputs
4683 `(("java-modello-core" ,java-modello-core)
4684 ("java-modello-plugins-java" ,java-modello-plugins-java)
4685 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4686 ,@(package-inputs java-modello-core)))
4687 (native-inputs
4688 `(("java-xmlunit" ,java-xmlunit)
4689 ("java-modello-test" ,java-modello-test)
4690 ,@(package-native-inputs java-modello-core)))
4691 (synopsis "Modello XPP3 Plugin")
4692 (description "The modello XPP3 plugin generates XML readers and writers based
4693 on the XPP3 API (XML Pull Parser).")))
4694
4695 (define-public java-asm
4696 (package
4697 (name "java-asm")
4698 (version "6.0")
4699 (source (origin
4700 (method url-fetch)
4701 (uri (string-append "https://download.forge.ow2.org/asm/"
4702 "asm-" version ".tar.gz"))
4703 (sha256
4704 (base32
4705 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4706 (build-system ant-build-system)
4707 (arguments
4708 `(#:build-target "compile"
4709 ;; The tests require an old version of Janino, which no longer compiles
4710 ;; with the JDK7.
4711 #:tests? #f
4712 #:make-flags
4713 (list
4714 ;; We don't need these extra ant tasks, but the build system asks us to
4715 ;; provide a path anyway.
4716 "-Dobjectweb.ant.tasks.path=dummy-path"
4717 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4718 ;; used during the build automatically by ant-build-system, but
4719 ;; java-asm's build.xml fails unless we provide something here.
4720 "-Dbiz.aQute.bnd.path=dummy-path")
4721 #:phases
4722 (modify-phases %standard-phases
4723 (add-before 'build 'remove-bnd-dependency
4724 (lambda _
4725 ;; This file is the only one to require bnd, and is not needed
4726 ;; because we don't build a bundle.
4727 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
4728 #t))
4729 (add-before 'install 'build-jars
4730 (lambda* (#:key make-flags #:allow-other-keys)
4731 ;; We cannot use the "jar" target because it depends on a couple
4732 ;; of unpackaged, complicated tools.
4733 (mkdir "dist")
4734 (invoke "jar"
4735 "-cf" (string-append "dist/asm-" ,version ".jar")
4736 "-C" "output/build/tmp" ".")))
4737 (add-before 'install 'fix-pom
4738 (lambda _
4739 (substitute* (find-files "archive" "\\.pom$")
4740 (("@product.artifact@") ,version))
4741 #t))
4742 (add-before 'install 'install-parent
4743 (install-pom-file "archive/asm-parent.pom"))
4744 (replace 'install
4745 (install-from-pom "archive/asm.pom")))))
4746 (native-inputs
4747 `(("java-junit" ,java-junit)))
4748 (propagated-inputs
4749 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
4750 (home-page "https://asm.ow2.io/")
4751 (synopsis "Very small and fast Java bytecode manipulation framework")
4752 (description "ASM is an all purpose Java bytecode manipulation and
4753 analysis framework. It can be used to modify existing classes or dynamically
4754 generate classes, directly in binary form. The provided common
4755 transformations and analysis algorithms allow easily assembling custom
4756 complex transformations and code analysis tools.")
4757 (license license:bsd-3)))
4758
4759 (define java-org-ow2-parent-pom-1.3
4760 (package
4761 (name "java-org-ow2-parent-pom")
4762 (version "1.3")
4763 (source (origin
4764 (method url-fetch)
4765 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
4766 (sha256
4767 (base32
4768 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
4769 (build-system ant-build-system)
4770 (arguments
4771 `(#:tests? #f
4772 #:phases
4773 (modify-phases %standard-phases
4774 (delete 'unpack)
4775 (delete 'build)
4776 (delete 'configure)
4777 (replace 'install
4778 (install-pom-file (assoc-ref %build-inputs "source"))))))
4779 (home-page "https://ow2.org")
4780 (synopsis "Ow2.org parent pom")
4781 (description "This package contains the parent pom for projects from ow2.org,
4782 including java-asm.")
4783 (license license:lgpl2.1+)))
4784
4785 (define java-asm-bootstrap
4786 (package
4787 (inherit java-asm)
4788 (name "java-asm-bootstrap")
4789 (arguments
4790 (substitute-keyword-arguments (package-arguments java-asm)
4791 ((#:tests? _) #f)))
4792 (native-inputs `())))
4793
4794 (define-public java-cglib
4795 (package
4796 (name "java-cglib")
4797 (version "3.2.4")
4798 (source
4799 (origin
4800 (method git-fetch)
4801 (uri (git-reference
4802 (url "https://github.com/cglib/cglib")
4803 (commit (string-append
4804 "RELEASE_"
4805 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4806 version)))))
4807 (file-name (git-file-name name version))
4808 (sha256
4809 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4810 (build-system ant-build-system)
4811 (arguments
4812 `(;; FIXME: tests fail because junit runs
4813 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4814 ;; to describe a test at all.
4815 #:tests? #f
4816 #:jar-name "cglib.jar"
4817 #:phases
4818 (modify-phases %standard-phases
4819 (add-after 'unpack 'chdir
4820 (lambda _ (chdir "cglib") #t)))))
4821 (inputs
4822 `(("java-asm" ,java-asm)
4823 ("java-junit" ,java-junit)))
4824 (home-page "https://github.com/cglib/cglib/")
4825 (synopsis "Java byte code generation library")
4826 (description "The byte code generation library CGLIB is a high level API
4827 to generate and transform Java byte code.")
4828 (license license:asl2.0)))
4829
4830 (define-public java-objenesis
4831 (package
4832 (name "java-objenesis")
4833 (version "2.5.1")
4834 (source (origin
4835 (method git-fetch)
4836 (uri (git-reference
4837 (url "https://github.com/easymock/objenesis")
4838 (commit version)))
4839 (file-name (git-file-name name version))
4840 (sha256
4841 (base32
4842 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
4843 (build-system ant-build-system)
4844 (arguments
4845 `(#:jar-name "objenesis.jar"
4846 #:source-dir "main/src/"
4847 #:test-dir "main/src/test/"))
4848 (native-inputs
4849 `(("java-junit" ,java-junit)
4850 ("java-hamcrest-core" ,java-hamcrest-core)))
4851 (home-page "http://objenesis.org/")
4852 (synopsis "Bypass the constructor when creating an object")
4853 (description "Objenesis is a small Java library that serves one purpose:
4854 to instantiate a new object of a particular class. It is common to see
4855 restrictions in libraries stating that classes must require a default
4856 constructor. Objenesis aims to overcome these restrictions by bypassing the
4857 constructor on object instantiation.")
4858 (license license:asl2.0)))
4859
4860 (define-public java-easymock
4861 (package
4862 (name "java-easymock")
4863 (version "3.4")
4864 (source (origin
4865 (method git-fetch)
4866 (uri (git-reference
4867 (url "https://github.com/easymock/easymock/")
4868 (commit (string-append "easymock-" version))))
4869 (file-name (git-file-name name version))
4870 (sha256
4871 (base32
4872 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
4873 (build-system ant-build-system)
4874 (arguments
4875 `(#:jar-name "easymock.jar"
4876 #:source-dir "core/src/main"
4877 #:test-dir "core/src/test"
4878 #:phases
4879 (modify-phases %standard-phases
4880 ;; FIXME: Android support requires the following packages to be
4881 ;; available: com.google.dexmaker.stock.ProxyBuilder
4882 (add-after 'unpack 'delete-android-support
4883 (lambda _
4884 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4885 (substitute* "MocksControl.java"
4886 (("AndroidSupport.isAndroid\\(\\)") "false")
4887 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4888 (delete-file "AndroidClassProxyFactory.java"))
4889 #t))
4890 (add-after 'unpack 'delete-broken-tests
4891 (lambda _
4892 (with-directory-excursion "core/src/test/java/org/easymock"
4893 ;; This test depends on dexmaker.
4894 (delete-file "tests2/ClassExtensionHelperTest.java")
4895
4896 ;; This is not a test.
4897 (delete-file "tests/BaseEasyMockRunnerTest.java")
4898
4899 ;; This test should be executed with a different runner...
4900 (delete-file "tests2/EasyMockAnnotationsTest.java")
4901 ;; ...but deleting it means that we also have to delete these
4902 ;; dependent files.
4903 (delete-file "tests2/EasyMockRunnerTest.java")
4904 (delete-file "tests2/EasyMockRuleTest.java")
4905
4906 ;; This test fails because the file "easymock.properties" does
4907 ;; not exist.
4908 (delete-file "tests2/EasyMockPropertiesTest.java"))
4909 #t)))))
4910 (inputs
4911 `(("java-asm" ,java-asm)
4912 ("java-cglib" ,java-cglib)
4913 ("java-objenesis" ,java-objenesis)))
4914 (native-inputs
4915 `(("java-junit" ,java-junit)
4916 ("java-hamcrest-core" ,java-hamcrest-core)))
4917 (home-page "https://easymock.org/")
4918 (synopsis "Java library providing mock objects for unit tests")
4919 (description "EasyMock is a Java library that provides an easy way to use
4920 mock objects in unit testing.")
4921 (license license:asl2.0)))
4922
4923 (define-public java-jmock-1
4924 (package
4925 (name "java-jmock")
4926 (version "1.2.0")
4927 (source (origin
4928 (method git-fetch)
4929 (uri (git-reference
4930 (url "https://github.com/jmock-developers/jmock-library")
4931 (commit version)))
4932 (file-name (git-file-name name version))
4933 (sha256
4934 (base32
4935 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
4936 (build-system ant-build-system)
4937 (arguments
4938 `(#:build-target "jars"
4939 #:test-target "run.tests"
4940 #:phases
4941 (modify-phases %standard-phases
4942 (replace 'install (install-jars "build")))))
4943 (home-page "http://jmock.org/")
4944 (synopsis "Mock object library for test-driven development")
4945 (description "JMock is a library that supports test-driven development of
4946 Java code with mock objects. Mock objects help you design and test the
4947 interactions between the objects in your programs.
4948
4949 The jMock library
4950
4951 @itemize
4952 @item makes it quick and easy to define mock objects
4953 @item lets you precisely specify the interactions between
4954 your objects, reducing the brittleness of your tests
4955 @item plugs into your favourite test framework
4956 @item is easy to extend.
4957 @end itemize\n")
4958 (license license:bsd-3)))
4959
4960 (define-public java-jmock
4961 (package
4962 (inherit java-jmock-1)
4963 (name "java-jmock")
4964 (version "2.8.2")
4965 (source (origin
4966 (method git-fetch)
4967 (uri (git-reference
4968 (url "https://github.com/jmock-developers/jmock-library")
4969 (commit version)))
4970 (file-name (git-file-name name version))
4971 (sha256
4972 (base32
4973 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
4974 (inputs
4975 `(("java-hamcrest-all" ,java-hamcrest-all)
4976 ("java-asm" ,java-asm)
4977 ("java-bsh" ,java-bsh)
4978 ("java-junit" ,java-junit)))
4979 (native-inputs
4980 `(("cglib" ,java-cglib)))
4981 (arguments
4982 `(#:jar-name "java-jmock.jar"
4983 #:source-dir "jmock/src/main/java"
4984 #:test-dir "jmock/src/test"))))
4985
4986 (define-public java-jmock-junit4
4987 (package
4988 (inherit java-jmock)
4989 (name "java-jmock-junit4")
4990 (arguments
4991 `(#:jar-name "java-jmock-junit4.jar"
4992 #:source-dir "jmock-junit4/src/main/java"
4993 #:test-dir "jmock-junit4/src/test"))
4994 (inputs
4995 `(("java-hamcrest-all" ,java-hamcrest-all)
4996 ("java-asm" ,java-asm)
4997 ("java-bsh" ,java-bsh)
4998 ("java-jmock" ,java-jmock)
4999 ("java-jumit" ,java-junit)))))
5000
5001 (define-public java-jmock-legacy
5002 (package
5003 (inherit java-jmock)
5004 (name "java-jmock-legacy")
5005 (arguments
5006 `(#:jar-name "java-jmock-legacy.jar"
5007 #:source-dir "jmock-legacy/src/main/java"
5008 #:test-dir "jmock-legacy/src/test"
5009 #:phases
5010 (modify-phases %standard-phases
5011 (add-before 'check 'copy-tests
5012 (lambda _
5013 ;; This file is a dependancy of some tests
5014 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5015 (copy-file (string-append "jmock/src/test/java/" file)
5016 (string-append "jmock-legacy/src/test/java/" file))
5017 #t))))))
5018 (inputs
5019 `(("java-hamcrest-all" ,java-hamcrest-all)
5020 ("java-objenesis" ,java-objenesis)
5021 ("java-cglib" ,java-cglib)
5022 ("java-jmock" ,java-jmock)
5023 ("java-asm" ,java-asm)
5024 ("java-bsh" ,java-bsh)
5025 ("java-junit" ,java-junit)))
5026 (native-inputs
5027 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5028
5029 (define-public java-hamcrest-all
5030 (package (inherit java-hamcrest-core)
5031 (name "java-hamcrest-all")
5032 (arguments
5033 `(#:jdk ,icedtea-8
5034 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5035 ((#:build-target _) "bigjar")
5036 ((#:phases phases)
5037 `(modify-phases ,phases
5038 ;; Some build targets override the classpath, so we need to patch
5039 ;; the build.xml to ensure that required dependencies are on the
5040 ;; classpath.
5041 (add-after 'unpack 'patch-classpath-for-integration
5042 (lambda* (#:key inputs #:allow-other-keys)
5043 (substitute* "build.xml"
5044 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5045 (string-join
5046 (cons line
5047 (append
5048 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5049 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5050 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5051 ";"))
5052 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5053 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5054 "jar$"))))
5055 #t))
5056 (replace 'install
5057 (lambda* (#:key outputs #:allow-other-keys)
5058 (let* ((target (string-append (assoc-ref outputs "out")
5059 "/share/java/"))
5060 (version-suffix
5061 ,(string-append
5062 "-" (package-version java-hamcrest-core) ".jar"))
5063 (install-without-version-suffix
5064 (lambda (jar)
5065 (copy-file jar
5066 (string-append target
5067 (basename jar version-suffix)
5068 ".jar")))))
5069 (mkdir-p target)
5070 (for-each
5071 install-without-version-suffix
5072 (find-files "build"
5073 (lambda (name _)
5074 (and (string-suffix? ".jar" name)
5075 (not (string-suffix? "-sources.jar" name)))))))
5076 #t)))))))
5077 (inputs
5078 `(("java-junit" ,java-junit)
5079 ("java-jmock" ,java-jmock-1)
5080 ;; This is necessary because of what seems to be a race condition.
5081 ;; This package would sometimes fail to build because hamcrest-core.jar
5082 ;; could not be found, even though it is built as part of this package.
5083 ;; Adding java-hamcrest-core appears to fix this problem. See
5084 ;; https://debbugs.gnu.org/31390 for more information.
5085 ("java-hamcrest-core" ,java-hamcrest-core)
5086 ("java-easymock" ,java-easymock)
5087 ,@(package-inputs java-hamcrest-core)))))
5088
5089 (define-public java-jopt-simple
5090 (package
5091 (name "java-jopt-simple")
5092 (version "5.0.3")
5093 (source (origin
5094 (method url-fetch)
5095 (uri (string-append "http://repo1.maven.org/maven2/"
5096 "net/sf/jopt-simple/jopt-simple/"
5097 version "/jopt-simple-"
5098 version "-sources.jar"))
5099 (sha256
5100 (base32
5101 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5102 (build-system ant-build-system)
5103 (arguments
5104 `(#:tests? #f ; there are no tests
5105 #:jar-name "jopt-simple.jar"))
5106 (home-page "https://pholser.github.io/jopt-simple/")
5107 (synopsis "Java library for parsing command line options")
5108 (description "JOpt Simple is a Java library for parsing command line
5109 options, such as those you might pass to an invocation of @code{javac}. In
5110 the interest of striving for simplicity, as closely as possible JOpt Simple
5111 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5112 GNU @code{getopt_long}. It also aims to make option parser configuration and
5113 retrieval of options and their arguments simple and expressive, without being
5114 overly clever.")
5115 (license license:expat)))
5116
5117 (define-public java-commons-math3
5118 (package
5119 (name "java-commons-math3")
5120 (version "3.6.1")
5121 (source (origin
5122 (method url-fetch)
5123 (uri (string-append "mirror://apache/commons/math/source/"
5124 "commons-math3-" version "-src.tar.gz"))
5125 (sha256
5126 (base32
5127 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5128 (build-system ant-build-system)
5129 (arguments
5130 `(#:build-target "jar"
5131 #:test-target "test"
5132 #:make-flags
5133 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5134 (junit (assoc-ref %build-inputs "java-junit")))
5135 (list (string-append "-Djunit.jar="
5136 (car (find-files junit "jar$")))
5137 (string-append "-Dhamcrest.jar="
5138 (car (find-files hamcrest ".*.jar$")))))
5139 #:phases
5140 (modify-phases %standard-phases
5141 ;; We want to build the jar in the build phase and run the tests
5142 ;; later in a separate phase.
5143 (add-after 'unpack 'untangle-targets
5144 (lambda _
5145 (substitute* "build.xml"
5146 (("name=\"jar\" depends=\"test\"")
5147 "name=\"jar\" depends=\"compile\""))
5148 #t))
5149 ;; There is no install target.
5150 (replace 'install
5151 (install-jars "target")))))
5152 (native-inputs
5153 `(("java-junit" ,java-junit)
5154 ("java-hamcrest-core" ,java-hamcrest-core)))
5155 (home-page "https://commons.apache.org/math/")
5156 (synopsis "Apache Commons mathematics library")
5157 (description "Commons Math is a library of lightweight, self-contained
5158 mathematics and statistics components addressing the most common problems not
5159 available in the Java programming language or Commons Lang.")
5160 (license license:asl2.0)))
5161
5162 (define-public java-jmh
5163 (package
5164 (name "java-jmh")
5165 (version "1.17.5")
5166 (source (origin
5167 (method hg-fetch)
5168 (uri (hg-reference
5169 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5170 (changeset version)))
5171 (file-name (string-append name "-" version "-checkout"))
5172 (sha256
5173 (base32
5174 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5175 (build-system ant-build-system)
5176 (arguments
5177 `(#:jar-name "jmh-core.jar"
5178 #:source-dir "jmh-core/src/main"
5179 #:test-dir "jmh-core/src/test"
5180 #:phases
5181 (modify-phases %standard-phases
5182 ;; This seems to be a bug in the JDK. It may not be necessary in
5183 ;; future versions of the JDK.
5184 (add-after 'unpack 'fix-bug
5185 (lambda _
5186 (with-directory-excursion
5187 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5188 (substitute* '("IntegerValueConverter.java"
5189 "ThreadsValueConverter.java")
5190 (("public Class<Integer> valueType")
5191 "public Class<? extends Integer> valueType")))
5192 #t)))))
5193 (inputs
5194 `(("java-jopt-simple" ,java-jopt-simple)
5195 ("java-commons-math3" ,java-commons-math3)))
5196 (native-inputs
5197 `(("java-junit" ,java-junit)
5198 ("java-hamcrest-core" ,java-hamcrest-core)))
5199 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5200 (synopsis "Benchmark harness for the JVM")
5201 (description "JMH is a Java harness for building, running, and analysing
5202 nano/micro/milli/macro benchmarks written in Java and other languages
5203 targeting the JVM.")
5204 ;; GPLv2 only
5205 (license license:gpl2)))
5206
5207 (define-public java-commons-collections4
5208 (package
5209 (name "java-commons-collections4")
5210 (version "4.1")
5211 (source (origin
5212 (method url-fetch)
5213 (uri (string-append "mirror://apache/commons/collections/source/"
5214 "commons-collections4-" version "-src.tar.gz"))
5215 (sha256
5216 (base32
5217 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5218 (build-system ant-build-system)
5219 (arguments
5220 `(#:test-target "test"
5221 #:make-flags
5222 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5223 (junit (assoc-ref %build-inputs "java-junit"))
5224 (easymock (assoc-ref %build-inputs "java-easymock")))
5225 (list (string-append "-Djunit.jar="
5226 (car (find-files junit "jar$")))
5227 (string-append "-Dhamcrest.jar="
5228 (car (find-files hamcrest "jar$")))
5229 (string-append "-Deasymock.jar=" easymock
5230 "/share/java/easymock.jar")))
5231 #:phases
5232 (modify-phases %standard-phases
5233 (replace 'install
5234 (install-jars "target")))))
5235 (native-inputs
5236 `(("java-junit" ,java-junit)
5237 ("java-hamcrest-core" ,java-hamcrest-core)
5238 ("java-easymock" ,java-easymock)))
5239 (home-page "https://commons.apache.org/collections/")
5240 (synopsis "Collections framework")
5241 (description "The Java Collections Framework is the recognised standard
5242 for collection handling in Java. Commons-Collections seek to build upon the
5243 JDK classes by providing new interfaces, implementations and utilities. There
5244 are many features, including:
5245
5246 @itemize
5247 @item @code{Bag} interface for collections that have a number of copies of
5248 each object
5249 @item @code{BidiMap} interface for maps that can be looked up from value to
5250 key as well and key to value
5251 @item @code{MapIterator} interface to provide simple and quick iteration over
5252 maps
5253 @item Transforming decorators that alter each object as it is added to the
5254 collection
5255 @item Composite collections that make multiple collections look like one
5256 @item Ordered maps and sets that retain the order elements are added in,
5257 including an LRU based map
5258 @item Reference map that allows keys and/or values to be garbage collected
5259 under close control
5260 @item Many comparator implementations
5261 @item Many iterator implementations
5262 @item Adapter classes from array and enumerations to collections
5263 @item Utilities to test or create typical set-theory properties of collections
5264 such as union, intersection, and closure.
5265 @end itemize\n")
5266 (license license:asl2.0)))
5267
5268 (define-public java-commons-collections
5269 (package
5270 (inherit java-commons-collections4)
5271 (name "java-commons-collections")
5272 (version "3.2.2")
5273 (source (origin
5274 (method url-fetch)
5275 (uri (string-append "mirror://apache/commons/collections/source/"
5276 "commons-collections-" version "-src.tar.gz"))
5277 (sha256
5278 (base32
5279 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5280 (patches
5281 (search-patches "java-commons-collections-fix-java8.patch"))))
5282 (arguments
5283 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5284 ((#:phases phases)
5285 `(modify-phases ,phases
5286 ;; The manifest is required by the build procedure
5287 (add-before 'build 'add-manifest
5288 (lambda _
5289 (mkdir-p "build/conf")
5290 (call-with-output-file "build/conf/MANIFEST.MF"
5291 (lambda (file)
5292 (format file "Manifest-Version: 1.0\n")))
5293 #t))
5294 (replace 'install
5295 (install-jars "build"))))))))
5296
5297 (define java-commons-collections-test-classes
5298 (package
5299 (inherit java-commons-collections)
5300 (arguments
5301 `(#:jar-name "commons-collections-test-classes.jar"
5302 #:source-dir "src/test"
5303 #:tests? #f))
5304 (inputs
5305 `(("collection" ,java-commons-collections)))))
5306
5307 (define-public java-commons-beanutils
5308 (package
5309 (name "java-commons-beanutils")
5310 (version "1.9.3")
5311 (source (origin
5312 (method url-fetch)
5313 (uri (string-append "mirror://apache/commons/beanutils/source/"
5314 "commons-beanutils-" version "-src.tar.gz"))
5315 (sha256
5316 (base32
5317 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5318 (build-system ant-build-system)
5319 (arguments
5320 `(#:test-target "test"
5321 #:tests? #f
5322 #:phases
5323 (modify-phases %standard-phases
5324 (replace 'install
5325 (lambda* (#:key outputs #:allow-other-keys)
5326 (rename-file (string-append "dist/commons-beanutils-" ,version
5327 "-SNAPSHOT.jar")
5328 "commons-beanutils.jar")
5329 (install-file "commons-beanutils.jar"
5330 (string-append (assoc-ref outputs "out") "/share/java/"))
5331 #t)))))
5332 (inputs
5333 `(("logging" ,java-commons-logging-minimal)
5334 ("collections" ,java-commons-collections)))
5335 (native-inputs
5336 `(("junit" ,java-junit)
5337 ("collections-test" ,java-commons-collections-test-classes)))
5338 (home-page "https://commons.apache.org/beanutils/")
5339 (synopsis "Dynamically set or get properties in Java")
5340 (description "BeanUtils provides a simplified interface to reflection and
5341 introspection to set or get dynamically determined properties through their
5342 setter and getter method.")
5343 (license license:asl2.0)))
5344
5345 (define-public java-commons-io
5346 (package
5347 (name "java-commons-io")
5348 (version "2.5")
5349 (source
5350 (origin
5351 (method url-fetch)
5352 (uri (string-append "mirror://apache/commons/io/source/"
5353 "commons-io-" version "-src.tar.gz"))
5354 (sha256
5355 (base32
5356 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5357 (build-system ant-build-system)
5358 (outputs '("out" "doc"))
5359 (arguments
5360 `(#:test-target "test"
5361 #:make-flags
5362 (list (string-append "-Djunit.jar="
5363 (car (find-files (assoc-ref %build-inputs "java-junit")
5364 "jar$"))))
5365 #:phases
5366 (modify-phases %standard-phases
5367 (add-after 'build 'build-javadoc ant-build-javadoc)
5368 (replace 'install (install-from-pom "pom.xml"))
5369 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5370 (native-inputs
5371 `(("java-junit" ,java-junit)
5372 ("java-hamcrest-core" ,java-hamcrest-core)))
5373 (propagated-inputs
5374 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5375 (home-page "https://commons.apache.org/io/")
5376 (synopsis "Common useful IO related classes")
5377 (description "Commons-IO contains utility classes, stream implementations,
5378 file filters and endian classes.")
5379 (license license:asl2.0)))
5380
5381 (define-public java-commons-exec-1.1
5382 (package
5383 (name "java-commons-exec")
5384 (version "1.1")
5385 (source
5386 (origin
5387 (method url-fetch)
5388 (uri (string-append "mirror://apache/commons/exec/source/"
5389 "commons-exec-" version "-src.tar.gz"))
5390 (sha256
5391 (base32
5392 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5393 (build-system ant-build-system)
5394 (arguments
5395 `(#:test-target "test"
5396 #:make-flags
5397 (list (string-append "-Dmaven.junit.jar="
5398 (car (find-files (assoc-ref %build-inputs "java-junit")
5399 "jar$"))))
5400 #:phases
5401 (modify-phases %standard-phases
5402 (add-before 'build 'delete-network-tests
5403 (lambda _
5404 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5405 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5406 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5407 #t))
5408 ;; The "build" phase automatically tests.
5409 (delete 'check)
5410 (replace 'install (install-jars "target")))))
5411 (native-inputs
5412 `(("java-junit" ,java-junit)))
5413 (home-page "https://commons.apache.org/proper/commons-exec/")
5414 (synopsis "Common program execution related classes")
5415 (description "Commons-Exec simplifies executing external processes.")
5416 (license license:asl2.0)))
5417
5418 (define-public java-commons-exec
5419 (package
5420 (inherit java-commons-exec-1.1)
5421 (version "1.3")
5422 (source
5423 (origin
5424 (method url-fetch)
5425 (uri (string-append "mirror://apache/commons/exec/source/"
5426 "commons-exec-" version "-src.tar.gz"))
5427 (sha256
5428 (base32
5429 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5430 (arguments
5431 `(#:test-target "test"
5432 #:make-flags
5433 (list (string-append "-Dmaven.junit.jar="
5434 (car (find-files (assoc-ref %build-inputs "java-junit")
5435 "jar$")))
5436 "-Dmaven.compiler.source=1.7"
5437 "-Dmaven.compiler.target=1.7")
5438 #:phases
5439 (modify-phases %standard-phases
5440 (add-before 'build 'delete-network-tests
5441 (lambda* (#:key inputs #:allow-other-keys)
5442 ;; This test hangs indefinitely.
5443 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5444 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5445 (("ping -c 10 127.0.0.1") "sleep 10"))
5446 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5447 (("/bin/ls") "ls"))
5448 (call-with-output-file "src/test/scripts/ping.sh"
5449 (lambda (port)
5450 (format port "#!~a/bin/sh\nsleep $1\n"
5451 (assoc-ref inputs "bash"))))
5452 #t))
5453 ;; The "build" phase automatically tests.
5454 (delete 'check)
5455 (replace 'install (install-jars "target")))))
5456 (native-inputs
5457 `(("java-junit" ,java-junit)
5458 ("java-hamcrest-core" ,java-hamcrest-core)))))
5459
5460 (define-public java-commons-lang
5461 (package
5462 (name "java-commons-lang")
5463 (version "2.6")
5464 (source
5465 (origin
5466 (method url-fetch)
5467 (uri (string-append "mirror://apache/commons/lang/source/"
5468 "commons-lang-" version "-src.tar.gz"))
5469 (sha256
5470 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5471 (build-system ant-build-system)
5472 (outputs '("out" "doc"))
5473 (arguments
5474 `(#:test-target "test"
5475 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5476 #:phases
5477 (modify-phases %standard-phases
5478 (add-after 'build 'build-javadoc ant-build-javadoc)
5479 (add-before 'check 'disable-failing-test
5480 (lambda _
5481 ;; Disable a failing test
5482 (substitute* "src/test/java/org/apache/commons/lang/\
5483 time/FastDateFormatTest.java"
5484 (("public void testFormat\\(\\)")
5485 "public void disabled_testFormat()"))
5486 #t))
5487 (replace 'install (install-jars "target"))
5488 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5489 (native-inputs
5490 `(("java-junit" ,java-junit)))
5491 (home-page "https://commons.apache.org/lang/")
5492 (synopsis "Extension of the java.lang package")
5493 (description "The Commons Lang components contains a set of Java classes
5494 that provide helper methods for standard Java classes, especially those found
5495 in the @code{java.lang} package in the Sun JDK. The following classes are
5496 included:
5497
5498 @itemize
5499 @item StringUtils - Helper for @code{java.lang.String}.
5500 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5501 of characters such as @code{[a-z]} and @code{[abcdez]}.
5502 @item RandomStringUtils - Helper for creating randomised strings.
5503 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5504 @item NumberRange - A range of numbers with an upper and lower bound.
5505 @item ObjectUtils - Helper for @code{java.lang.Object}.
5506 @item SerializationUtils - Helper for serializing objects.
5507 @item SystemUtils - Utility class defining the Java system properties.
5508 @item NestedException package - A sub-package for the creation of nested
5509 exceptions.
5510 @item Enum package - A sub-package for the creation of enumerated types.
5511 @item Builder package - A sub-package for the creation of @code{equals},
5512 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5513 @end itemize\n")
5514 (license license:asl2.0)))
5515
5516 (define-public java-commons-lang3
5517 (package
5518 (name "java-commons-lang3")
5519 (version "3.9")
5520 (source
5521 (origin
5522 (method url-fetch)
5523 (uri (string-append "mirror://apache/commons/lang/source/"
5524 "commons-lang3-" version "-src.tar.gz"))
5525 (sha256
5526 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5527 (build-system ant-build-system)
5528 (arguments
5529 `(#:jar-name "commons-lang3.jar"
5530 #:source-dir "src/main/java"
5531 #:tests? #f; require junit5
5532 #:phases
5533 (modify-phases %standard-phases
5534 (replace 'install (install-from-pom "pom.xml")))))
5535 (propagated-inputs
5536 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5537 (home-page "https://commons.apache.org/lang/")
5538 (synopsis "Extension of the java.lang package")
5539 (description "The Commons Lang components contains a set of Java classes
5540 that provide helper methods for standard Java classes, especially those found
5541 in the @code{java.lang} package. The following classes are included:
5542
5543 @itemize
5544 @item StringUtils - Helper for @code{java.lang.String}.
5545 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5546 characters such as @code{[a-z]} and @code{[abcdez]}.
5547 @item RandomStringUtils - Helper for creating randomised strings.
5548 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5549 @item NumberRange - A range of numbers with an upper and lower bound.
5550 @item ObjectUtils - Helper for @code{java.lang.Object}.
5551 @item SerializationUtils - Helper for serializing objects.
5552 @item SystemUtils - Utility class defining the Java system properties.
5553 @item NestedException package - A sub-package for the creation of nested
5554 exceptions.
5555 @item Enum package - A sub-package for the creation of enumerated types.
5556 @item Builder package - A sub-package for the creation of @code{equals},
5557 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5558 @end itemize\n")
5559 (license license:asl2.0)))
5560
5561 (define-public java-commons-bsf
5562 (package
5563 (name "java-commons-bsf")
5564 (version "2.4.0")
5565 (source (origin
5566 (method url-fetch)
5567 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5568 version ".tar.gz"))
5569 (sha256
5570 (base32
5571 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5572 (modules '((guix build utils)))
5573 (snippet
5574 '(begin
5575 (for-each delete-file
5576 (find-files "." "\\.jar$"))
5577 #t))))
5578 (build-system ant-build-system)
5579 (arguments
5580 `(#:build-target "jar"
5581 #:tests? #f; No test file
5582 #:modules ((guix build ant-build-system)
5583 (guix build utils)
5584 (guix build java-utils)
5585 (sxml simple))
5586 #:phases
5587 (modify-phases %standard-phases
5588 (add-before 'build 'create-properties
5589 (lambda _
5590 ;; This file is missing from the distribution
5591 (call-with-output-file "build-properties.xml"
5592 (lambda (port)
5593 (sxml->xml
5594 `(project (@ (basedir ".") (name "build-properties") (default ""))
5595 (property (@ (name "project.name") (value "bsf")))
5596 (property (@ (name "source.level") (value "1.5")))
5597 (property (@ (name "build.lib") (value "build/jar")))
5598 (property (@ (name "src.dir") (value "src")))
5599 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5600 (property (@ (name "build.tests") (value "build/test-classes")))
5601 (property (@ (name "build.dest") (value "build/classes"))))
5602 port)))
5603 #t))
5604 (replace 'install (install-jars "build")))))
5605 (native-inputs
5606 `(("java-junit" ,java-junit)))
5607 (inputs
5608 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5609 (home-page "https://commons.apache.org/proper/commons-bsf")
5610 (synopsis "Bean Scripting Framework")
5611 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5612 which provides scripting language support within Java applications, and access
5613 to Java objects and methods from scripting languages. BSF allows one to write
5614 JSPs in languages other than Java while providing access to the Java class
5615 library. In addition, BSF permits any Java application to be implemented in
5616 part (or dynamically extended) by a language that is embedded within it. This
5617 is achieved by providing an API that permits calling scripting language engines
5618 from within Java, as well as an object registry that exposes Java objects to
5619 these scripting language engines.")
5620 (license license:asl2.0)))
5621
5622 (define-public java-commons-jxpath
5623 (package
5624 (name "java-commons-jxpath")
5625 (version "1.3")
5626 (source (origin
5627 (method url-fetch)
5628 (uri (string-append "mirror://apache/commons/jxpath/source/"
5629 "commons-jxpath-" version "-src.tar.gz"))
5630 (sha256
5631 (base32
5632 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5633 (build-system ant-build-system)
5634 (arguments
5635 `(#:jar-name "commons-jxpath.jar"
5636 ;; tests require more dependencies, including mockrunner which depends on old software
5637 #:tests? #f
5638 #:source-dir "src/java"))
5639 (inputs
5640 `(("servlet" ,java-classpathx-servletapi)
5641 ("java-jdom" ,java-jdom)
5642 ("java-commons-beanutils" ,java-commons-beanutils)))
5643 (native-inputs
5644 `(("java-junit" ,java-junit)))
5645 (home-page "https://commons.apache.org/jxpath/")
5646 (synopsis "Simple interpreter of an expression language called XPath.")
5647 (description "The org.apache.commons.jxpath package defines a simple
5648 interpreter of an expression language called XPath. JXPath applies XPath
5649 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5650 contexts, DOM etc, including mixtures thereof.")
5651 (license license:asl2.0)))
5652
5653 (define-public java-commons-pool
5654 (package
5655 (name "java-commons-pool")
5656 (version "2.6.2")
5657 (source (origin
5658 (method url-fetch)
5659 (uri (string-append "mirror://apache/commons/pool/source/"
5660 "commons-pool2-" version "-src.tar.gz"))
5661 (sha256
5662 (base32
5663 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5664 (arguments
5665 `(#:jar-name "common-pool.jar"
5666 #:source-dir "src/main/java"
5667 #:test-exclude
5668 (list "**/PerformanceTest.java")))
5669 (build-system ant-build-system)
5670 (inputs
5671 `(("java-cglib" ,java-cglib)))
5672 (native-inputs
5673 `(("java-junit" ,java-junit)
5674 ("java-hamcrest-core" ,java-hamcrest-core)
5675 ("java-asm" ,java-asm)
5676 ("java-objenesis" ,java-objenesis)))
5677 (home-page "https://commons.apache.org/proper/commons-pool/")
5678 (synopsis "Object-pooling API in Java")
5679 (description "The commons-pool package provides an object-pooling API
5680 and a number of object pool implementations. This package defines a
5681 handful of pooling interfaces and some base classes that may be useful when
5682 creating new pool implementations.")
5683 (license license:asl2.0)))
5684
5685 (define-public java-commons-dbcp
5686 (package
5687 (name "java-commons-dbcp")
5688 (version "2.6.0")
5689 (source (origin
5690 (method url-fetch)
5691 (uri (string-append "mirror://apache/commons/dbcp/source/"
5692 "commons-dbcp2-" version "-src.tar.gz"))
5693 (sha256
5694 (base32
5695 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5696 (arguments
5697 `(#:source-dir "src/main/java"
5698 #:jar-name "java-commons-dbcp.jar"
5699 #:tests? #f)); requires apache-geronimo
5700 (inputs
5701 `(("java-commons-pool" ,java-commons-pool)
5702 ("java-commons-logging" ,java-commons-logging-minimal)
5703 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5704 (native-inputs
5705 `(("java-junit" ,java-junit)))
5706 (build-system ant-build-system)
5707 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5708 (synopsis "Database Connection Pool for Java")
5709 (description "Commons-dbcp allows you to share a pool of database
5710 connections between users. Creating a new connection for each user can be
5711 time consuming and even unfeasible when the number of simultaneous users is
5712 very large. This package provides a way to share a poole of connections to
5713 reduce that load.")
5714 (license license:asl2.0)))
5715
5716 (define-public java-commons-jcs
5717 (package
5718 (name "java-commons-jcs")
5719 (version "2.2.1")
5720 (source (origin
5721 (method url-fetch)
5722 (uri (string-append "mirror://apache/commons/jcs/source/"
5723 "commons-jcs-dist-" version "-src.tar.gz"))
5724 (sha256
5725 (base32
5726 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5727 (build-system ant-build-system)
5728 (arguments
5729 `(#:jar-name "commons-jcs.jar"
5730 #:source-dir "commons-jcs-core/src/main/java"
5731 #:test-dir "commons-jcs-core/src/test"
5732 #:tests? #f; requires hsqldb
5733 #:phases
5734 (modify-phases %standard-phases
5735 (add-before 'build 'prepare
5736 (lambda _
5737 (with-directory-excursion
5738 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5739 (substitute*
5740 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5741 (("commons.dbcp") "commons.dbcp2")
5742 ((".*\\.setMaxActive.*") ""))
5743 ;;; Remove dependency on velocity-tools
5744 (delete-file "admin/servlet/JCSAdminServlet.java"))
5745 #t)))))
5746 (propagated-inputs
5747 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5748 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5749 ("java-commons-httpclient" ,java-commons-httpclient)
5750 ("java-commons-dbcp" ,java-commons-dbcp)))
5751 (native-inputs
5752 `(("java-junit" ,java-junit)))
5753 (home-page "https://commons.apache.org/proper/commons-jcs/")
5754 (synopsis "Distributed caching system in Java")
5755 (description "JCS is a distributed caching system written in Java. It
5756 is intended to speed up applications by providing a means to manage cached
5757 data of various dynamic natures. Like any caching system, JCS is most useful
5758 for high read, low put applications. Latency times drop sharply and
5759 bottlenecks move away from the database in an effectively cached system.")
5760 (license license:asl2.0)))
5761
5762 (define-public java-jsr250
5763 (package
5764 (name "java-jsr250")
5765 (version "1.3")
5766 (source (origin
5767 (method url-fetch)
5768 (uri (string-append "https://repo1.maven.org/maven2/"
5769 "javax/annotation/javax.annotation-api/"
5770 version "/javax.annotation-api-"
5771 version "-sources.jar"))
5772 (sha256
5773 (base32
5774 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5775 (build-system ant-build-system)
5776 (arguments
5777 `(#:tests? #f ; no tests included
5778 #:jdk ,icedtea-8
5779 #:jar-name "jsr250.jar"
5780 #:modules ((guix build ant-build-system)
5781 (guix build utils)
5782 (guix build maven pom)
5783 (guix build java-utils)
5784 (sxml simple))
5785 #:phases
5786 (modify-phases %standard-phases
5787 (add-before 'install 'create-pom
5788 (lambda _
5789 (with-output-to-file "pom.xml"
5790 (lambda _
5791 (sxml->xml
5792 `((project
5793 (modelVersion "4.0.0")
5794 (name "jsr250")
5795 (groupId "javax.annotation")
5796 (artifactId "jsr250-api")
5797 (version ,,version))))))
5798 #t))
5799 (replace 'install
5800 (install-from-pom "pom.xml")))))
5801 (home-page "https://jcp.org/en/jsr/detail?id=250")
5802 (synopsis "Security-related annotations")
5803 (description "This package provides annotations for security. It provides
5804 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5805 namespaces.")
5806 ;; either cddl or gpl2 only, with classpath exception
5807 (license (list license:cddl1.0
5808 license:gpl2))))
5809
5810 (define-public java-jsr305
5811 (package
5812 (name "java-jsr305")
5813 (version "3.0.1")
5814 (source (origin
5815 (method url-fetch)
5816 (uri (string-append "https://repo1.maven.org/maven2/"
5817 "com/google/code/findbugs/"
5818 "jsr305/" version "/jsr305-"
5819 version "-sources.jar"))
5820 (sha256
5821 (base32
5822 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5823 (build-system ant-build-system)
5824 (arguments
5825 `(#:tests? #f ; no tests included
5826 #:jar-name "jsr305.jar"
5827 #:modules ((guix build ant-build-system)
5828 (guix build java-utils)
5829 (guix build maven pom)
5830 (guix build utils)
5831 (sxml simple))
5832 #:phases
5833 (modify-phases %standard-phases
5834 (add-before 'install 'create-pom
5835 (lambda _
5836 (with-output-to-file "pom.xml"
5837 (lambda _
5838 (sxml->xml
5839 `((project
5840 (modelVersion "4.0.0")
5841 (name "jsr305")
5842 (groupId "com.google.code.findbugs")
5843 (artifactId "jsr305")
5844 (version ,,version))))))
5845 #t))
5846 (replace 'install
5847 (install-from-pom "pom.xml")))))
5848 (home-page "http://findbugs.sourceforge.net/")
5849 (synopsis "Annotations for the static analyzer called findbugs")
5850 (description "This package provides annotations for the findbugs package.
5851 It provides packages in the @code{javax.annotations} namespace.")
5852 (license license:asl2.0)))
5853
5854 (define-public java-guava
5855 (package
5856 (name "java-guava")
5857 ;; This is the last release of Guava that can be built with Java 7.
5858 (version "20.0")
5859 (source (origin
5860 (method git-fetch)
5861 (uri (git-reference
5862 (url "https://github.com/google/guava/")
5863 (commit (string-append "v" version))))
5864 (sha256
5865 (base32
5866 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
5867 (build-system ant-build-system)
5868 (arguments
5869 `(#:tests? #f ; no tests included
5870 #:jar-name "guava.jar"
5871 #:source-dir "guava/src"
5872 #:phases
5873 (modify-phases %standard-phases
5874 (add-after 'unpack 'trim-sources
5875 (lambda _
5876 (with-directory-excursion "guava/src/com/google/common"
5877 ;; Remove annotations to avoid extra dependencies:
5878 ;; * "j2objc" annotations are used when converting Java to
5879 ;; Objective C;
5880 ;; * "errorprone" annotations catch common Java mistakes at
5881 ;; compile time;
5882 ;; * "IgnoreJRERequirement" is used for Android.
5883 (substitute* (find-files "." "\\.java$")
5884 (("import com.google.j2objc.*") "")
5885 (("import com.google.errorprone.annotation.*") "")
5886 (("import org.codehaus.mojo.animal_sniffer.*") "")
5887 (("@CanIgnoreReturnValue") "")
5888 (("@LazyInit") "")
5889 (("@WeakOuter") "")
5890 (("@RetainedWith") "")
5891 (("@Weak") "")
5892 (("@ForOverride") "")
5893 (("@J2ObjCIncompatible") "")
5894 (("@IgnoreJRERequirement") "")))
5895 #t))
5896 (replace 'install (install-from-pom "guava/pom.xml")))))
5897 (inputs
5898 `(("java-jsr305" ,java-jsr305)))
5899 (propagated-inputs
5900 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
5901 (home-page "https://github.com/google/guava")
5902 (synopsis "Google core libraries for Java")
5903 (description "Guava is a set of core libraries that includes new
5904 collection types (such as multimap and multiset), immutable collections, a
5905 graph library, functional types, an in-memory cache, and APIs/utilities for
5906 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5907 more!")
5908 (license license:asl2.0)))
5909
5910 (define java-guava-parent-pom
5911 (package
5912 (inherit java-guava)
5913 (name "java-guava-parent-pom")
5914 (arguments
5915 `(#:tests? #f
5916 #:phases
5917 (modify-phases %standard-phases
5918 (delete 'configure)
5919 (delete 'build)
5920 (replace 'install
5921 (install-pom-file "pom.xml")))))
5922 (propagated-inputs
5923 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
5924
5925 ;; The java-commons-logging package provides adapters to many different
5926 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5927 ;; it with only a minimal set of adapters.
5928 (define-public java-commons-logging-minimal
5929 (package
5930 (name "java-commons-logging-minimal")
5931 (version "1.2")
5932 (source (origin
5933 (method url-fetch)
5934 (uri (string-append "mirror://apache/commons/logging/source/"
5935 "commons-logging-" version "-src.tar.gz"))
5936 (sha256
5937 (base32
5938 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5939 (build-system ant-build-system)
5940 (arguments
5941 `(#:tests? #f ; avoid dependency on logging frameworks
5942 #:jar-name "commons-logging-minimal.jar"
5943 #:phases
5944 (modify-phases %standard-phases
5945 (add-after 'unpack 'delete-adapters-and-tests
5946 (lambda _
5947 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5948 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5949 ;; is used by applications; SimpleLog is the only actually usable
5950 ;; implementation that does not depend on another logging
5951 ;; framework.
5952 (for-each
5953 (lambda (file)
5954 (delete-file (string-append
5955 "src/main/java/org/apache/commons/logging/impl/" file)))
5956 (list "Jdk13LumberjackLogger.java"
5957 "WeakHashtable.java"
5958 "Log4JLogger.java"
5959 "ServletContextCleaner.java"
5960 "Jdk14Logger.java"
5961 "AvalonLogger.java"
5962 "LogKitLogger.java"))
5963 (delete-file-recursively "src/test")
5964 #t)))))
5965 (home-page "https://commons.apache.org/logging/")
5966 (synopsis "Common API for logging implementations")
5967 (description "The Logging package is a thin bridge between different
5968 logging implementations. A library that uses the commons-logging API can be
5969 used with any logging implementation at runtime.")
5970 (license license:asl2.0)))
5971
5972 ;; This is the last release of the 1.x series.
5973 (define-public java-mockito-1
5974 (package
5975 (name "java-mockito")
5976 (version "1.10.19")
5977 (source (origin
5978 (method url-fetch)
5979 (uri (string-append "http://repo1.maven.org/maven2/"
5980 "org/mockito/mockito-core/" version
5981 "/mockito-core-" version "-sources.jar"))
5982 (sha256
5983 (base32
5984 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5985 (build-system ant-build-system)
5986 (arguments
5987 `(#:jar-name "mockito.jar"
5988 #:tests? #f ; no tests included
5989 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5990 ;; patches in build phases.
5991 #:phases
5992 (modify-phases %standard-phases
5993 ;; Mockito was developed against a different version of hamcrest,
5994 ;; which does not require matcher implementations to provide an
5995 ;; implementation of the "describeMismatch" method. We add this
5996 ;; simple definition to pass the build with our version of hamcrest.
5997 (add-after 'unpack 'fix-hamcrest-build-error
5998 (lambda _
5999 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6000 (("public Matcher getActualMatcher\\(\\) .*" line)
6001 (string-append "
6002 public void describeMismatch(Object item, Description description) {
6003 actualMatcher.describeMismatch(item, description);
6004 }"
6005 line)))
6006 #t))
6007 ;; Mockito bundles cglib. We have a cglib package, so let's use
6008 ;; that instead.
6009 (add-after 'unpack 'use-system-libraries
6010 (lambda _
6011 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6012 (substitute* '("CGLIBHacker.java"
6013 "CglibMockMaker.java"
6014 "ClassImposterizer.java"
6015 "DelegatingMockitoMethodProxy.java"
6016 "MethodInterceptorFilter.java"
6017 "MockitoNamingPolicy.java"
6018 "SerializableMockitoMethodProxy.java"
6019 "SerializableNoOp.java")
6020 (("import org.mockito.cglib") "import net.sf.cglib")))
6021 #t)))))
6022 (inputs
6023 `(("java-junit" ,java-junit)
6024 ("java-objenesis" ,java-objenesis)
6025 ("java-cglib" ,java-cglib)
6026 ("java-hamcrest-core" ,java-hamcrest-core)))
6027 (home-page "http://mockito.org")
6028 (synopsis "Mockito is a mock library for Java")
6029 (description "Mockito is a mocking library for Java which lets you write
6030 tests with a clean and simple API. It generates mocks using reflection, and
6031 it records all mock invocations, including methods arguments.")
6032 (license license:asl2.0)))
6033
6034 (define-public java-httpcomponents-httpcore
6035 (package
6036 (name "java-httpcomponents-httpcore")
6037 (version "4.4.6")
6038 (source (origin
6039 (method url-fetch)
6040 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6041 "source/httpcomponents-core-"
6042 version "-src.tar.gz"))
6043 (sha256
6044 (base32
6045 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6046 (build-system ant-build-system)
6047 (arguments
6048 `(#:jar-name "httpcomponents-httpcore.jar"
6049 #:phases
6050 (modify-phases %standard-phases
6051 (add-after 'unpack 'chdir
6052 (lambda _ (chdir "httpcore") #t)))))
6053 (inputs
6054 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6055 ("java-commons-lang3" ,java-commons-lang3)))
6056 (native-inputs
6057 `(("java-junit" ,java-junit)
6058 ("java-mockito" ,java-mockito-1)))
6059 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6060 (synopsis "Low level HTTP transport components")
6061 (description "HttpCore is a set of low level HTTP transport components
6062 that can be used to build custom client and server side HTTP services with a
6063 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6064 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6065 NIO.
6066
6067 This package provides the blocking I/O model library.")
6068 (license license:asl2.0)))
6069
6070 (define-public java-httpcomponents-httpcore-nio
6071 (package (inherit java-httpcomponents-httpcore)
6072 (name "java-httpcomponents-httpcore-nio")
6073 (arguments
6074 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6075 #:phases
6076 (modify-phases %standard-phases
6077 (add-after 'unpack 'chdir
6078 (lambda _ (chdir "httpcore-nio") #t)))))
6079 (inputs
6080 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6081 ("java-hamcrest-core" ,java-hamcrest-core)
6082 ,@(package-inputs java-httpcomponents-httpcore)))
6083 (description "HttpCore is a set of low level HTTP transport components
6084 that can be used to build custom client and server side HTTP services with a
6085 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6086 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6087 NIO.
6088
6089 This package provides the non-blocking I/O model library based on Java
6090 NIO.")))
6091
6092 (define-public java-httpcomponents-httpcore-ab
6093 (package (inherit java-httpcomponents-httpcore)
6094 (name "java-httpcomponents-httpcore-ab")
6095 (arguments
6096 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6097 #:phases
6098 (modify-phases %standard-phases
6099 (add-after 'unpack 'chdir
6100 (lambda _ (chdir "httpcore-ab") #t)))))
6101 (inputs
6102 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6103 ("java-commons-cli" ,java-commons-cli)
6104 ("java-hamcrest-core" ,java-hamcrest-core)
6105 ,@(package-inputs java-httpcomponents-httpcore)))
6106 (synopsis "Apache HttpCore benchmarking tool")
6107 (description "This package provides the HttpCore benchmarking tool. It is
6108 an Apache AB clone based on HttpCore.")))
6109
6110 (define-public java-httpcomponents-httpclient
6111 (package
6112 (name "java-httpcomponents-httpclient")
6113 (version "4.5.12")
6114 (source (origin
6115 (method url-fetch)
6116 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6117 "source/httpcomponents-client-"
6118 version "-src.tar.gz"))
6119 (sha256
6120 (base32
6121 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6122 (build-system ant-build-system)
6123 (arguments
6124 `(#:jar-name "httpcomponents-httpclient.jar"
6125 #:phases
6126 (modify-phases %standard-phases
6127 (add-after 'unpack 'chdir
6128 (lambda _ (chdir "httpclient") #t)))))
6129 (inputs
6130 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6131 ("java-commons-codec" ,java-commons-codec)
6132 ("java-hamcrest-core" ,java-hamcrest-core)
6133 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6134 ("java-mockito" ,java-mockito-1)
6135 ("java-junit" ,java-junit)))
6136 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6137 (synopsis "HTTP client library for Java")
6138 (description "Although the @code{java.net} package provides basic
6139 functionality for accessing resources via HTTP, it doesn't provide the full
6140 flexibility or functionality needed by many applications. @code{HttpClient}
6141 seeks to fill this void by providing an efficient, up-to-date, and
6142 feature-rich package implementing the client side of the most recent HTTP
6143 standards and recommendations.")
6144 (license license:asl2.0)))
6145
6146 (define-public java-httpcomponents-httpmime
6147 (package (inherit java-httpcomponents-httpclient)
6148 (name "java-httpcomponents-httpmime")
6149 (arguments
6150 `(#:jar-name "httpcomponents-httpmime.jar"
6151 #:phases
6152 (modify-phases %standard-phases
6153 (add-after 'unpack 'chdir
6154 (lambda _ (chdir "httpmime") #t)))))
6155 (inputs
6156 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6157 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6158 ("java-junit" ,java-junit)
6159 ("java-hamcrest-core" ,java-hamcrest-core)))))
6160
6161 (define-public java-commons-net
6162 (package
6163 (name "java-commons-net")
6164 (version "3.6")
6165 (source (origin
6166 (method url-fetch)
6167 (uri (string-append "mirror://apache/commons/net/source/"
6168 "commons-net-" version "-src.tar.gz"))
6169 (sha256
6170 (base32
6171 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6172 (build-system ant-build-system)
6173 (arguments
6174 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6175 ;; should be "resources/examples/examples.properties"), but gets "null"
6176 ;; instead.
6177 #:tests? #f
6178 #:jar-name "commons-net.jar"))
6179 (native-inputs
6180 `(("java-junit" ,java-junit)
6181 ("java-hamcrest-core" ,java-hamcrest-core)))
6182 (home-page "https://commons.apache.org/net/")
6183 (synopsis "Client library for many basic Internet protocols")
6184 (description "The Apache Commons Net library implements the client side of
6185 many basic Internet protocols. The purpose of the library is to provide
6186 fundamental protocol access, not higher-level abstractions.")
6187 (license license:asl2.0)))
6188
6189 (define-public java-jsch
6190 (package
6191 (name "java-jsch")
6192 (version "0.1.55")
6193 (source (origin
6194 (method url-fetch)
6195 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6196 version "/jsch-" version ".zip"))
6197 (sha256
6198 (base32
6199 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6200 (build-system ant-build-system)
6201 (arguments
6202 `(#:build-target "dist"
6203 #:tests? #f ; no tests included
6204 #:phases
6205 (modify-phases %standard-phases
6206 (replace 'install (install-jars "dist")))))
6207 (native-inputs
6208 `(("unzip" ,unzip)))
6209 (home-page "http://www.jcraft.com/jsch/")
6210 (synopsis "Pure Java implementation of SSH2")
6211 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6212 to connect to an SSH server and use port forwarding, X11 forwarding, file
6213 transfer, etc., and you can integrate its functionality into your own Java
6214 programs.")
6215 (license license:bsd-3)))
6216
6217 (define-public java-commons-compress
6218 (package
6219 (name "java-commons-compress")
6220 (version "1.13")
6221 (source (origin
6222 (method url-fetch)
6223 (uri (string-append "mirror://apache/commons/compress/source/"
6224 "commons-compress-" version "-src.tar.gz"))
6225 (sha256
6226 (base32
6227 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6228 (build-system ant-build-system)
6229 (arguments
6230 `(#:jar-name "commons-compress.jar"
6231 #:phases
6232 (modify-phases %standard-phases
6233 (add-after 'unpack 'delete-bad-tests
6234 (lambda _
6235 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6236 ;; FIXME: These tests really should not fail. Maybe they are
6237 ;; indicative of problems with our Java packaging work.
6238
6239 ;; This test fails with a null pointer exception.
6240 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6241 ;; This test fails to open test resources.
6242 (delete-file "archivers/zip/ExplodeSupportTest.java")
6243
6244 ;; FIXME: This test adds a dependency on powermock, which is hard to
6245 ;; package at this point.
6246 ;; https://github.com/powermock/powermock
6247 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6248 #t))
6249 (replace 'install (install-from-pom "pom.xml")))))
6250 (propagated-inputs
6251 `(("java-xz" ,java-xz)
6252 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6253 (native-inputs
6254 `(("java-junit" ,java-junit)
6255 ("java-mockito" ,java-mockito-1)))
6256 (home-page "https://commons.apache.org/proper/commons-compress/")
6257 (synopsis "Java library for working with compressed files")
6258 (description "The Apache Commons Compress library defines an API for
6259 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6260 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6261 (license license:asl2.0)))
6262
6263 (define-public java-commons-csv
6264 (package
6265 (name "java-commons-csv")
6266 (version "1.4")
6267 (source (origin
6268 (method url-fetch)
6269 (uri (string-append "mirror://apache/commons/csv/source/"
6270 "commons-csv-" version "-src.tar.gz"))
6271 (sha256
6272 (base32
6273 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6274 (build-system ant-build-system)
6275 (arguments
6276 `(#:jar-name "commons-csv.jar"
6277 #:source-dir "src/main/java"
6278 #:tests? #f)); FIXME: requires java-h2
6279 (inputs
6280 `(("java-hamcrest-core" ,java-hamcrest-core)
6281 ("java-commons-io" ,java-commons-io)
6282 ("java-commons-lang3" ,java-commons-lang3)
6283 ("junit" ,java-junit)))
6284 (home-page "https://commons.apache.org/proper/commons-csv/")
6285 (synopsis "Read and write CSV documents")
6286 (description "Commons CSV reads and writes files in variations of the Comma
6287 Separated Value (CSV) format. The most common CSV formats are predefined in the
6288 CSVFormat class:
6289
6290 @itemize
6291 @item Microsoft Excel
6292 @item Informix UNLOAD
6293 @item Informix UNLOAD CSV
6294 @item MySQL
6295 @item RFC 4180
6296 @item TDF
6297 @end itemize
6298
6299 Custom formats can be created using a fluent style API.")
6300 (license license:asl2.0)))
6301
6302 (define-public java-osgi-annotation
6303 (package
6304 (name "java-osgi-annotation")
6305 (version "6.0.0")
6306 (source (origin
6307 (method url-fetch)
6308 (uri (string-append "https://repo1.maven.org/maven2/"
6309 "org/osgi/org.osgi.annotation/" version "/"
6310 "org.osgi.annotation-" version "-sources.jar"))
6311 (sha256
6312 (base32
6313 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6314 (build-system ant-build-system)
6315 (arguments
6316 `(#:tests? #f ; no tests
6317 #:jar-name "osgi-annotation.jar"))
6318 (home-page "https://www.osgi.org")
6319 (synopsis "Annotation module of OSGi framework")
6320 (description
6321 "OSGi, for Open Services Gateway initiative framework, is a module system
6322 and service platform for the Java programming language. This package contains
6323 the OSGi annotation module, providing additional services to help dynamic
6324 components.")
6325 (license license:asl2.0)))
6326
6327 (define-public java-osgi-core
6328 (package
6329 (name "java-osgi-core")
6330 (version "6.0.0")
6331 (source (origin
6332 (method url-fetch)
6333 (uri (string-append "https://repo1.maven.org/maven2/"
6334 "org/osgi/org.osgi.core/" version "/"
6335 "org.osgi.core-" version "-sources.jar"))
6336 (sha256
6337 (base32
6338 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6339 (build-system ant-build-system)
6340 (arguments
6341 `(#:tests? #f ; no tests
6342 #:jar-name "osgi-core.jar"))
6343 (inputs
6344 `(("java-osgi-annotation" ,java-osgi-annotation)))
6345 (home-page "https://www.osgi.org")
6346 (synopsis "Core module of OSGi framework")
6347 (description
6348 "OSGi, for Open Services Gateway initiative framework, is a module system
6349 and service platform for the Java programming language. This package contains
6350 the OSGi Core module.")
6351 (license license:asl2.0)))
6352
6353 (define-public java-osgi-service-event
6354 (package
6355 (name "java-osgi-service-event")
6356 (version "1.3.1")
6357 (source (origin
6358 (method url-fetch)
6359 (uri (string-append "https://repo1.maven.org/maven2/"
6360 "org/osgi/org.osgi.service.event/"
6361 version "/org.osgi.service.event-"
6362 version "-sources.jar"))
6363 (sha256
6364 (base32
6365 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6366 (build-system ant-build-system)
6367 (arguments
6368 `(#:tests? #f ; no tests
6369 #:jar-name "osgi-service-event.jar"))
6370 (inputs
6371 `(("java-osgi-annotation" ,java-osgi-annotation)
6372 ("java-osgi-core" ,java-osgi-core)))
6373 (home-page "https://www.osgi.org")
6374 (synopsis "OSGi service event module")
6375 (description
6376 "OSGi, for Open Services Gateway initiative framework, is a module system
6377 and service platform for the Java programming language. This package contains
6378 the OSGi @code{org.osgi.service.event} module.")
6379 (license license:asl2.0)))
6380
6381 (define-public java-eclipse-osgi
6382 (package
6383 (name "java-eclipse-osgi")
6384 (version "3.11.3")
6385 (source (origin
6386 (method url-fetch)
6387 (uri (string-append "https://repo1.maven.org/maven2/"
6388 "org/eclipse/platform/org.eclipse.osgi/"
6389 version "/org.eclipse.osgi-"
6390 version "-sources.jar"))
6391 (sha256
6392 (base32
6393 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6394 (build-system ant-build-system)
6395 (arguments
6396 `(#:tests? #f ; no tests included
6397 #:jar-name "eclipse-equinox-osgi.jar"))
6398 (inputs
6399 `(("java-osgi-annotation" ,java-osgi-annotation)))
6400 (home-page "http://www.eclipse.org/equinox/")
6401 (synopsis "Eclipse Equinox OSGi framework")
6402 (description "This package provides an implementation of the OSGi Core
6403 specification.")
6404 (license license:epl1.0)))
6405
6406 (define-public java-eclipse-equinox-common
6407 (package
6408 (name "java-eclipse-equinox-common")
6409 (version "3.10.200")
6410 (source (origin
6411 (method url-fetch)
6412 (uri (string-append "https://repo1.maven.org/maven2/"
6413 "org/eclipse/platform/org.eclipse.equinox.common/"
6414 version "/org.eclipse.equinox.common-"
6415 version "-sources.jar"))
6416 (sha256
6417 (base32
6418 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6419 (build-system ant-build-system)
6420 (arguments
6421 `(#:tests? #f ; no tests included
6422 #:jar-name "eclipse-equinox-common.jar"))
6423 (inputs
6424 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6425 (home-page "http://www.eclipse.org/equinox/")
6426 (synopsis "Common Eclipse runtime")
6427 (description "This package provides the common Eclipse runtime.")
6428 (license license:epl1.0)))
6429
6430 (define-public java-eclipse-core-jobs
6431 (package
6432 (name "java-eclipse-core-jobs")
6433 (version "3.8.0")
6434 (source (origin
6435 (method url-fetch)
6436 (uri (string-append "https://repo1.maven.org/maven2/"
6437 "org/eclipse/platform/org.eclipse.core.jobs/"
6438 version "/org.eclipse.core.jobs-"
6439 version "-sources.jar"))
6440 (sha256
6441 (base32
6442 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6443 (build-system ant-build-system)
6444 (arguments
6445 `(#:tests? #f ; no tests included
6446 #:jar-name "eclipse-core-jobs.jar"))
6447 (inputs
6448 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6449 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6450 (home-page "http://www.eclipse.org/equinox/")
6451 (synopsis "Eclipse jobs mechanism")
6452 (description "This package provides the Eclipse jobs mechanism.")
6453 (license license:epl1.0)))
6454
6455 (define-public java-eclipse-equinox-registry
6456 (package
6457 (name "java-eclipse-equinox-registry")
6458 (version "3.6.100")
6459 (source (origin
6460 (method url-fetch)
6461 (uri (string-append "https://repo1.maven.org/maven2/"
6462 "org/eclipse/platform/org.eclipse.equinox.registry/"
6463 version "/org.eclipse.equinox.registry-"
6464 version "-sources.jar"))
6465 (sha256
6466 (base32
6467 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6468 (build-system ant-build-system)
6469 (arguments
6470 `(#:tests? #f ; no tests included
6471 #:jar-name "eclipse-equinox-registry.jar"))
6472 (inputs
6473 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6474 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6475 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6476 (home-page "http://www.eclipse.org/equinox/")
6477 (synopsis "Eclipse extension registry support")
6478 (description "This package provides support for the Eclipse extension
6479 registry.")
6480 (license license:epl1.0)))
6481
6482 (define-public java-eclipse-equinox-app
6483 (package
6484 (name "java-eclipse-equinox-app")
6485 (version "1.3.400")
6486 (source (origin
6487 (method url-fetch)
6488 (uri (string-append "https://repo1.maven.org/maven2/"
6489 "org/eclipse/platform/org.eclipse.equinox.app/"
6490 version "/org.eclipse.equinox.app-"
6491 version "-sources.jar"))
6492 (sha256
6493 (base32
6494 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6495 (build-system ant-build-system)
6496 (arguments
6497 `(#:tests? #f ; no tests included
6498 #:jar-name "eclipse-equinox-app.jar"))
6499 (inputs
6500 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6501 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6502 ("java-eclipse-osgi" ,java-eclipse-osgi)
6503 ("java-osgi-service-event" ,java-osgi-service-event)))
6504 (home-page "http://www.eclipse.org/equinox/")
6505 (synopsis "Equinox application container")
6506 (description "This package provides the Equinox application container for
6507 Eclipse.")
6508 (license license:epl1.0)))
6509
6510 (define-public java-eclipse-equinox-preferences
6511 (package
6512 (name "java-eclipse-equinox-preferences")
6513 (version "3.6.1")
6514 (source (origin
6515 (method url-fetch)
6516 (uri (string-append "https://repo1.maven.org/maven2/"
6517 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6518 version "/org.eclipse.equinox.preferences-"
6519 version "-sources.jar"))
6520 (sha256
6521 (base32
6522 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6523 (build-system ant-build-system)
6524 (arguments
6525 `(#:tests? #f ; no tests included
6526 #:jar-name "eclipse-equinox-preferences.jar"))
6527 (inputs
6528 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6529 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6530 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6531 (home-page "http://www.eclipse.org/equinox/")
6532 (synopsis "Eclipse preferences mechanism")
6533 (description "This package provides the Eclipse preferences mechanism with
6534 the module @code{org.eclipse.equinox.preferences}.")
6535 (license license:epl1.0)))
6536
6537 (define-public java-eclipse-core-contenttype
6538 (package
6539 (name "java-eclipse-core-contenttype")
6540 (version "3.5.100")
6541 (source (origin
6542 (method url-fetch)
6543 (uri (string-append "https://repo1.maven.org/maven2/"
6544 "org/eclipse/platform/org.eclipse.core.contenttype/"
6545 version "/org.eclipse.core.contenttype-"
6546 version "-sources.jar"))
6547 (sha256
6548 (base32
6549 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6550 (build-system ant-build-system)
6551 (arguments
6552 `(#:tests? #f ; no tests included
6553 #:jar-name "eclipse-core-contenttype.jar"))
6554 (inputs
6555 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6556 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6557 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6558 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6559 (home-page "http://www.eclipse.org/")
6560 (synopsis "Eclipse content mechanism")
6561 (description "This package provides the Eclipse content mechanism in the
6562 @code{org.eclipse.core.contenttype} module.")
6563 (license license:epl1.0)))
6564
6565 (define-public java-eclipse-core-runtime
6566 (package
6567 (name "java-eclipse-core-runtime")
6568 (version "3.15.100")
6569 (source (origin
6570 (method url-fetch)
6571 (uri (string-append "https://repo1.maven.org/maven2/"
6572 "org/eclipse/platform/org.eclipse.core.runtime/"
6573 version "/org.eclipse.core.runtime-"
6574 version "-sources.jar"))
6575 (sha256
6576 (base32
6577 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6578 (build-system ant-build-system)
6579 (arguments
6580 `(#:tests? #f ; no tests included
6581 #:jar-name "eclipse-core-runtime.jar"))
6582 (inputs
6583 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6584 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6585 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6586 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6587 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6588 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6589 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6590 (home-page "https://www.eclipse.org/")
6591 (synopsis "Eclipse core runtime")
6592 (description "This package provides the Eclipse core runtime with the
6593 module @code{org.eclipse.core.runtime}.")
6594 (license license:epl1.0)))
6595
6596 (define-public java-eclipse-core-filesystem
6597 (package
6598 (name "java-eclipse-core-filesystem")
6599 (version "1.6.1")
6600 (source (origin
6601 (method url-fetch)
6602 (uri (string-append "https://repo1.maven.org/maven2/"
6603 "org/eclipse/platform/org.eclipse.core.filesystem/"
6604 version "/org.eclipse.core.filesystem-"
6605 version "-sources.jar"))
6606 (sha256
6607 (base32
6608 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6609 (build-system ant-build-system)
6610 (arguments
6611 `(#:tests? #f ; no tests included
6612 #:jar-name "eclipse-core-filesystem.jar"))
6613 (inputs
6614 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6615 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6616 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6617 (home-page "https://www.eclipse.org/")
6618 (synopsis "Eclipse core file system")
6619 (description "This package provides the Eclipse core file system with the
6620 module @code{org.eclipse.core.filesystem}.")
6621 (license license:epl1.0)))
6622
6623 (define-public java-eclipse-core-expressions
6624 (package
6625 (name "java-eclipse-core-expressions")
6626 (version "3.5.100")
6627 (source (origin
6628 (method url-fetch)
6629 (uri (string-append "https://repo1.maven.org/maven2/"
6630 "org/eclipse/platform/org.eclipse.core.expressions/"
6631 version "/org.eclipse.core.expressions-"
6632 version "-sources.jar"))
6633 (sha256
6634 (base32
6635 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6636 (build-system ant-build-system)
6637 (arguments
6638 `(#:tests? #f ; no tests included
6639 #:jar-name "eclipse-core-expressions.jar"))
6640 (inputs
6641 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6642 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6643 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6644 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6645 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6646 (home-page "https://www.eclipse.org/")
6647 (synopsis "Eclipse core expression language")
6648 (description "This package provides the Eclipse core expression language
6649 with the @code{org.eclipse.core.expressions} module.")
6650 (license license:epl1.0)))
6651
6652 (define-public java-eclipse-core-variables
6653 (package
6654 (name "java-eclipse-core-variables")
6655 (version "3.3.0")
6656 (source (origin
6657 (method url-fetch)
6658 (uri (string-append "https://repo1.maven.org/maven2/"
6659 "org/eclipse/platform/org.eclipse.core.variables/"
6660 version "/org.eclipse.core.variables-"
6661 version "-sources.jar"))
6662 (sha256
6663 (base32
6664 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6665 (build-system ant-build-system)
6666 (arguments
6667 `(#:tests? #f ; no tests included
6668 #:jar-name "eclipse-core-variables.jar"))
6669 (inputs
6670 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6671 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6672 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6673 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6674 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6675 (home-page "https://www.eclipse.org/platform")
6676 (synopsis "Eclipse core variables")
6677 (description "This package provides the Eclipse core variables module
6678 @code{org.eclipse.core.variables}.")
6679 (license license:epl1.0)))
6680
6681 (define-public java-eclipse-ant-core
6682 (package
6683 (name "java-eclipse-ant-core")
6684 (version "3.4.100")
6685 (source (origin
6686 (method url-fetch)
6687 (uri (string-append "https://repo1.maven.org/maven2/"
6688 "org/eclipse/platform/org.eclipse.ant.core/"
6689 version "/org.eclipse.ant.core-"
6690 version "-sources.jar"))
6691 (sha256
6692 (base32
6693 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6694 (build-system ant-build-system)
6695 (arguments
6696 `(#:tests? #f ; no tests included
6697 #:jar-name "eclipse-ant-core.jar"))
6698 (inputs
6699 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6700 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6701 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6702 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6703 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6704 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6705 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6706 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6707 (home-page "https://www.eclipse.org/platform")
6708 (synopsis "Ant build tool core libraries")
6709 (description "This package provides the ant build tool core libraries with
6710 the module @code{org.eclipse.ant.core}.")
6711 (license license:epl1.0)))
6712
6713 (define-public java-eclipse-core-resources
6714 (package
6715 (name "java-eclipse-core-resources")
6716 (version "3.13.200")
6717 (source (origin
6718 (method url-fetch)
6719 (uri (string-append "https://repo1.maven.org/maven2/"
6720 "org/eclipse/platform/org.eclipse.core.resources/"
6721 version "/org.eclipse.core.resources-"
6722 version "-sources.jar"))
6723 (sha256
6724 (base32
6725 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6726 (build-system ant-build-system)
6727 (arguments
6728 `(#:tests? #f ; no tests included
6729 #:jar-name "eclipse-core-resources.jar"))
6730 (inputs
6731 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6732 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6733 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6734 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6735 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6736 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6737 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6738 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6739 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6740 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6741 (home-page "https://www.eclipse.org/")
6742 (synopsis "Eclipse core resource management")
6743 (description "This package provides the Eclipse core resource management
6744 module @code{org.eclipse.core.resources}.")
6745 (license license:epl1.0)))
6746
6747 (define-public java-eclipse-compare-core
6748 (package
6749 (name "java-eclipse-compare-core")
6750 (version "3.6.0")
6751 (source (origin
6752 (method url-fetch)
6753 (uri (string-append "https://repo1.maven.org/maven2/"
6754 "org/eclipse/platform/org.eclipse.compare.core/"
6755 version "/org.eclipse.compare.core-"
6756 version "-sources.jar"))
6757 (sha256
6758 (base32
6759 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6760 (build-system ant-build-system)
6761 (arguments
6762 `(#:tests? #f ; no tests included
6763 #:jar-name "eclipse-compare-core.jar"))
6764 (inputs
6765 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6766 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6767 ("java-eclipse-osgi" ,java-eclipse-osgi)
6768 ("java-icu4j" ,java-icu4j)))
6769 (home-page "https://www.eclipse.org/")
6770 (synopsis "Eclipse core compare support")
6771 (description "This package provides the Eclipse core compare support
6772 module @code{org.eclipse.compare.core}.")
6773 (license license:epl1.0)))
6774
6775 (define-public java-eclipse-team-core
6776 (package
6777 (name "java-eclipse-team-core")
6778 (version "3.8.0")
6779 (source (origin
6780 (method url-fetch)
6781 (uri (string-append "https://repo1.maven.org/maven2/"
6782 "org/eclipse/platform/org.eclipse.team.core/"
6783 version "/org.eclipse.team.core-"
6784 version "-sources.jar"))
6785 (sha256
6786 (base32
6787 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6788 (build-system ant-build-system)
6789 (arguments
6790 `(#:tests? #f ; no tests included
6791 #:jar-name "eclipse-team-core.jar"))
6792 (inputs
6793 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6794 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6795 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6796 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6797 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6798 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6799 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6800 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6801 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6802 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6803 (home-page "https://www.eclipse.org/platform")
6804 (synopsis "Eclipse team support core")
6805 (description "This package provides the Eclipse team support core module
6806 @code{org.eclipse.team.core}.")
6807 (license license:epl1.0)))
6808
6809 (define-public java-eclipse-core-commands
6810 (package
6811 (name "java-eclipse-core-commands")
6812 (version "3.8.1")
6813 (source (origin
6814 (method url-fetch)
6815 (uri (string-append "https://repo1.maven.org/maven2/"
6816 "org/eclipse/platform/org.eclipse.core.commands/"
6817 version "/org.eclipse.core.commands-"
6818 version "-sources.jar"))
6819 (sha256
6820 (base32
6821 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6822 (build-system ant-build-system)
6823 (arguments
6824 `(#:tests? #f ; no tests included
6825 #:jar-name "eclipse-core-commands.jar"))
6826 (inputs
6827 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6828 (home-page "https://www.eclipse.org/platform")
6829 (synopsis "Eclipse core commands")
6830 (description "This package provides Eclipse core commands in the module
6831 @code{org.eclipse.core.commands}.")
6832 (license license:epl1.0)))
6833
6834 (define-public java-eclipse-text
6835 (package
6836 (name "java-eclipse-text")
6837 (version "3.6.0")
6838 (source (origin
6839 (method url-fetch)
6840 (uri (string-append "https://repo1.maven.org/maven2/"
6841 "org/eclipse/platform/org.eclipse.text/"
6842 version "/org.eclipse.text-"
6843 version "-sources.jar"))
6844 (sha256
6845 (base32
6846 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6847 (build-system ant-build-system)
6848 (arguments
6849 `(#:tests? #f ; no tests included
6850 #:jar-name "eclipse-text.jar"
6851 #:phases
6852 (modify-phases %standard-phases
6853 ;; When creating a new category we must make sure that the new list
6854 ;; matches List<Position>. By default it seems to be too generic
6855 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6856 ;; Without this we get this error:
6857 ;;
6858 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6859 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6860 ;; [javac] fPositions.put(category, new ArrayList<>());
6861 ;; [javac] ^
6862 ;; [javac] required: String,List<Position>
6863 ;; [javac] found: String,ArrayList<Object>
6864 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6865 ;; to List<Position> by method invocation conversion
6866 ;; [javac] where K,V are type-variables:
6867 ;; [javac] K extends Object declared in interface Map
6868 ;; [javac] V extends Object declared in interface Map
6869 ;;
6870 ;; I don't know if this is a good fix. I suspect it is not, but it
6871 ;; seems to work.
6872 (add-after 'unpack 'fix-compilation-error
6873 (lambda _
6874 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6875 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6876 "Positions.put(category, new ArrayList<Position>());"))
6877 #t)))))
6878 (inputs
6879 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6880 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6881 ("java-icu4j" ,java-icu4j)))
6882 (home-page "http://www.eclipse.org/platform")
6883 (synopsis "Eclipse text library")
6884 (description "Platform Text is part of the Platform UI project and
6885 provides the basic building blocks for text and text editors within Eclipse
6886 and contributes the Eclipse default text editor.")
6887 (license license:epl1.0)))
6888
6889 (define-public java-eclipse-jdt-core
6890 (package
6891 (name "java-eclipse-jdt-core")
6892 (version "3.16.0")
6893 (source (origin
6894 (method url-fetch)
6895 (uri (string-append "https://repo1.maven.org/maven2/"
6896 "org/eclipse/jdt/org.eclipse.jdt.core/"
6897 version "/org.eclipse.jdt.core-"
6898 version "-sources.jar"))
6899 (sha256
6900 (base32
6901 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6902 (build-system ant-build-system)
6903 (arguments
6904 `(#:tests? #f ; no tests included
6905 #:jar-name "eclipse-jdt-core.jar"
6906 #:phases
6907 (modify-phases %standard-phases
6908 (add-after 'unpack 'move-sources
6909 (lambda _
6910 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6911 (for-each (lambda (file)
6912 (install-file file (string-append "../" (dirname file))))
6913 (find-files "." ".*")))
6914 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6915 #t))
6916 (add-before 'build 'copy-resources
6917 (lambda _
6918 (with-directory-excursion "src"
6919 (for-each (lambda (file)
6920 (install-file file (string-append "../build/classes/" (dirname file))))
6921 (find-files "." ".*.(props|properties|rsc)")))
6922 #t)))))
6923 (inputs
6924 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6925 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6926 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6927 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6928 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6929 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6930 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6931 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6932 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6933 ("java-eclipse-osgi" ,java-eclipse-osgi)
6934 ("java-eclipse-text" ,java-eclipse-text)))
6935 (home-page "https://www.eclipse.org/jdt")
6936 (synopsis "Java development tools core libraries")
6937 (description "This package provides the core libraries of the Eclipse Java
6938 development tools.")
6939 (license license:epl1.0)))
6940
6941 (define-public java-eclipse-jdt-compiler-apt
6942 (package
6943 (name "java-eclipse-jdt-compiler-apt")
6944 (version "1.3.400")
6945 (source (origin
6946 (method url-fetch)
6947 (uri (string-append "https://repo1.maven.org/maven2/"
6948 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6949 version "/org.eclipse.jdt.compiler.apt-"
6950 version "-sources.jar"))
6951 (sha256
6952 (base32
6953 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6954 (build-system ant-build-system)
6955 (arguments
6956 `(#:tests? #f ; no tests included
6957 #:jar-name "eclipse-jdt-compiler-apt.jar"
6958 #:jdk ,openjdk11))
6959 (inputs
6960 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6961 (home-page "https://www.eclipse.org/jdt/apt/")
6962 (synopsis "Annotation processing tool")
6963 (description "APT stands for Annotation Processing Tool. APT provides a
6964 means for generating files and compiling new Java classes based on annotations
6965 found in your source code.")
6966 (license license:epl2.0)))
6967
6968 (define-public java-javax-mail
6969 (package
6970 (name "java-javax-mail")
6971 (version "1.5.6")
6972 (source (origin
6973 (method url-fetch)
6974 (uri (string-append "https://repo1.maven.org/maven2/"
6975 "com/sun/mail/javax.mail/"
6976 version "/javax.mail-"
6977 version "-sources.jar"))
6978 (sha256
6979 (base32
6980 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6981 (build-system ant-build-system)
6982 (arguments
6983 `(#:tests? #f ; no tests
6984 #:jar-name "javax-mail.jar"))
6985 (home-page "https://javamail.java.net")
6986 (synopsis "Reference implementation of the JavaMail API")
6987 (description
6988 "This package provides versions of the JavaMail API implementation, IMAP,
6989 SMTP, and POP3 service providers, some examples, and documentation for the
6990 JavaMail API.")
6991 ;; GPLv2 only with "classpath exception".
6992 (license license:gpl2)))
6993
6994 (define-public java-log4j-api
6995 (package
6996 (name "java-log4j-api")
6997 (version "2.4.1")
6998 (source (origin
6999 (method url-fetch)
7000 (uri (string-append "mirror://apache/logging/log4j/" version
7001 "/apache-log4j-" version "-src.tar.gz"))
7002 (sha256
7003 (base32
7004 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7005 (build-system ant-build-system)
7006 (arguments
7007 `(#:tests? #f ; tests require unpackaged software
7008 #:jar-name "log4j-api.jar"
7009 #:make-flags
7010 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7011 "/share/java"))
7012 #:phases
7013 (modify-phases %standard-phases
7014 (add-after 'unpack 'enter-dir
7015 (lambda _ (chdir "log4j-api") #t))
7016 ;; FIXME: The tests require additional software that has not been
7017 ;; packaged yet, such as
7018 ;; * org.apache.maven
7019 ;; * org.apache.felix
7020 (add-after 'enter-dir 'delete-tests
7021 (lambda _ (delete-file-recursively "src/test") #t)))))
7022 (inputs
7023 `(("java-osgi-core" ,java-osgi-core)
7024 ("java-hamcrest-core" ,java-hamcrest-core)
7025 ("java-junit" ,java-junit)))
7026 (home-page "https://logging.apache.org/log4j/2.x/")
7027 (synopsis "API module of the Log4j logging framework for Java")
7028 (description
7029 "This package provides the API module of the Log4j logging framework for
7030 Java.")
7031 (license license:asl2.0)))
7032
7033 (define-public java-log4j-core
7034 (package
7035 (inherit java-log4j-api)
7036 (name "java-log4j-core")
7037 (inputs
7038 `(("java-osgi-core" ,java-osgi-core)
7039 ("java-hamcrest-core" ,java-hamcrest-core)
7040 ("java-log4j-api" ,java-log4j-api)
7041 ("java-mail" ,java-mail)
7042 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7043 ("java-lmax-disruptor" ,java-lmax-disruptor)
7044 ("java-kafka" ,java-kafka-clients)
7045 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7046 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7047 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7048 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7049 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7050 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7051 ("java-commons-compress" ,java-commons-compress)
7052 ("java-commons-csv" ,java-commons-csv)
7053 ("java-jeromq" ,java-jeromq)
7054 ("java-junit" ,java-junit)))
7055 (native-inputs
7056 `(("hamcrest" ,java-hamcrest-all)
7057 ("java-commons-io" ,java-commons-io)
7058 ("java-commons-lang3" ,java-commons-lang3)
7059 ("slf4j" ,java-slf4j-api)))
7060 (arguments
7061 `(#:tests? #f ; tests require more dependencies
7062 #:test-dir "src/test"
7063 #:source-dir "src/main/java"
7064 #:jar-name "log4j-core.jar"
7065 #:jdk ,icedtea-8
7066 #:make-flags
7067 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7068 "/share/java"))
7069 #:phases
7070 (modify-phases %standard-phases
7071 (add-after 'unpack 'enter-dir
7072 (lambda _ (chdir "log4j-core") #t)))))
7073 (synopsis "Core component of the Log4j framework")
7074 (description "This package provides the core component of the Log4j
7075 logging framework for Java.")))
7076
7077 (define-public java-log4j-1.2-api
7078 (package
7079 (inherit java-log4j-api)
7080 (name "java-log4j-1.2-api")
7081 (arguments
7082 `(#:jar-name "java-log4j-1.2-api.jar"
7083 #:source-dir "log4j-1.2-api/src/main/java"
7084 #:jdk ,icedtea-8
7085 ;; Tests require maven-model (and other maven subprojects), which is a
7086 ;; cyclic dependency.
7087 #:tests? #f))
7088 (inputs
7089 `(("log4j-api" ,java-log4j-api)
7090 ("log4j-core" ,java-log4j-core)
7091 ("osgi-core" ,java-osgi-core)
7092 ("eclipse-osgi" ,java-eclipse-osgi)
7093 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7094
7095 (define-public java-commons-cli
7096 (package
7097 (name "java-commons-cli")
7098 (version "1.4")
7099 (source (origin
7100 (method url-fetch)
7101 (uri (string-append "mirror://apache/commons/cli/source/"
7102 "commons-cli-" version "-src.tar.gz"))
7103 (sha256
7104 (base32
7105 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7106 (build-system ant-build-system)
7107 ;; TODO: javadoc
7108 (arguments
7109 `(#:jar-name "commons-cli.jar"
7110 #:phases
7111 (modify-phases %standard-phases
7112 (replace 'install
7113 (install-from-pom "pom.xml")))))
7114 (native-inputs
7115 `(("java-junit" ,java-junit)
7116 ("java-hamcrest-core" ,java-hamcrest-core)))
7117 (home-page "https://commons.apache.org/cli/")
7118 (synopsis "Command line arguments and options parsing library")
7119 (description "The Apache Commons CLI library provides an API for parsing
7120 command line options passed to programs. It is also able to print help
7121 messages detailing the options available for a command line tool.
7122
7123 Commons CLI supports different types of options:
7124
7125 @itemize
7126 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7127 @item GNU like long options (ie. du --human-readable --max-depth=1)
7128 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7129 @item Short options with value attached (ie. gcc -O2 foo.c)
7130 @item long options with single hyphen (ie. ant -projecthelp)
7131 @end itemize
7132
7133 This is a part of the Apache Commons Project.")
7134 (license license:asl2.0)))
7135
7136 (define-public java-commons-codec
7137 (package
7138 (name "java-commons-codec")
7139 (version "1.14")
7140 (source (origin
7141 (method url-fetch)
7142 (uri (string-append "mirror://apache/commons/codec/source/"
7143 "commons-codec-" version "-src.tar.gz"))
7144 (sha256
7145 (base32
7146 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7147 (build-system ant-build-system)
7148 (arguments
7149 `(#:jar-name "java-commons-codec.jar"
7150 #:source-dir "src/main/java"
7151 #:test-dir "src/test"
7152 #:test-exclude (list "**/*AbstractTest.java")
7153 #:phases
7154 (modify-phases %standard-phases
7155 (add-before 'build 'copy-resources
7156 (lambda _
7157 (copy-recursively "src/main/resources"
7158 "build/classes")
7159 #t))
7160 (add-before 'check 'copy-test-resources
7161 (lambda _
7162 (copy-recursively "src/test/resources"
7163 "build/test-classes")
7164 #t))
7165 (replace 'install (install-from-pom "pom.xml")))))
7166 (native-inputs
7167 `(("java-commons-lang3" ,java-commons-lang3)
7168 ("java-junit" ,java-junit)))
7169 (propagated-inputs
7170 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7171 (home-page "https://commons.apache.org/codec/")
7172 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7173 (description "The codec package contains simple encoder and decoders for
7174 various formats such as Base64 and Hexadecimal. In addition to these widely
7175 used encoders and decoders, the codec package also maintains a collection of
7176 phonetic encoding utilities.
7177
7178 This is a part of the Apache Commons Project.")
7179 (license license:asl2.0)))
7180
7181 (define-public java-commons-daemon
7182 (package
7183 (name "java-commons-daemon")
7184 (version "1.1.0")
7185 (source (origin
7186 (method url-fetch)
7187 (uri (string-append "mirror://apache/commons/daemon/source/"
7188 "commons-daemon-" version "-src.tar.gz"))
7189 (sha256
7190 (base32
7191 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7192 (build-system ant-build-system)
7193 (arguments
7194 `(#:test-target "test"
7195 #:phases
7196 (modify-phases %standard-phases
7197 (add-after 'build 'build-javadoc ant-build-javadoc)
7198 (replace 'install (install-jars "dist"))
7199 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7200 (native-inputs
7201 `(("java-junit" ,java-junit)))
7202 (home-page "https://commons.apache.org/daemon/")
7203 (synopsis "Library to launch Java applications as daemons")
7204 (description "The Daemon package from Apache Commons can be used to
7205 implement Java applications which can be launched as daemons. For example the
7206 program will be notified about a shutdown so that it can perform cleanup tasks
7207 before its process of execution is destroyed by the operation system.
7208
7209 This package contains the Java library. You will also need the actual binary
7210 for your architecture which is provided by the jsvc package.
7211
7212 This is a part of the Apache Commons Project.")
7213 (license license:asl2.0)))
7214
7215 (define-public java-javaewah
7216 (package
7217 (name "java-javaewah")
7218 (version "1.1.6")
7219 (source (origin
7220 (method git-fetch)
7221 (uri (git-reference
7222 (url "https://github.com/lemire/javaewah/")
7223 (commit (string-append "JavaEWAH-" version))))
7224 (file-name (git-file-name name version))
7225 (sha256
7226 (base32
7227 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7228 (build-system ant-build-system)
7229 (arguments `(#:jar-name "javaewah.jar"))
7230 (inputs
7231 `(("java-junit" ,java-junit)
7232 ("java-hamcrest-core" ,java-hamcrest-core)))
7233 (home-page "https://github.com/lemire/javaewah")
7234 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7235 (description "This is a word-aligned compressed variant of the Java
7236 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7237 compression scheme. It can be used to implement bitmap indexes.
7238
7239 The goal of word-aligned compression is not to achieve the best compression,
7240 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7241 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7242 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7243 @code{BitSet} class by Sun).")
7244 ;; GPL2.0 derivates are explicitly allowed.
7245 (license license:asl2.0)))
7246
7247 (define-public java-slf4j-api
7248 (package
7249 (name "java-slf4j-api")
7250 (version "1.7.25")
7251 (source (origin
7252 (method url-fetch)
7253 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7254 version ".tar.gz"))
7255 (sha256
7256 (base32
7257 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7258 (modules '((guix build utils)))
7259 ;; Delete bundled jars.
7260 (snippet
7261 '(begin
7262 (for-each delete-file (find-files "." "\\.jar$"))
7263 #t))))
7264 (build-system ant-build-system)
7265 (arguments
7266 `(#:jar-name "slf4j-api.jar"
7267 #:source-dir "slf4j-api/src/main"
7268 #:test-dir "slf4j-api/src/test"
7269 #:phases
7270 (modify-phases %standard-phases
7271 (add-after 'build 'regenerate-jar
7272 (lambda _
7273 ;; pom.xml ignores these files in the jar creation process. If we don't,
7274 ;; we get the error "This code should have never made it into slf4j-api.jar"
7275 (delete-file-recursively "build/classes/org/slf4j/impl")
7276 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7277 "build/classes" ".")))
7278 (add-before 'check 'dont-test-abstract-classes
7279 (lambda _
7280 ;; abstract classes are not meant to be run with junit
7281 (substitute* "build.xml"
7282 (("<include name=\"\\*\\*/\\*Test.java\" />")
7283 (string-append "<include name=\"**/*Test.java\" />"
7284 "<exclude name=\"**/MultithreadedInitializationTest"
7285 ".java\" />")))
7286 #t))
7287 (replace 'install
7288 (install-from-pom "slf4j-api/pom.xml")))))
7289 (propagated-inputs
7290 `(("java-slf4j-parent" ,java-slf4j-parent)))
7291 (native-inputs
7292 `(("java-junit" ,java-junit)
7293 ("java-hamcrest-core" ,java-hamcrest-core)))
7294 (home-page "https://www.slf4j.org/")
7295 (synopsis "Simple logging facade for Java")
7296 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7297 simple facade or abstraction for various logging
7298 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7299 allowing the end user to plug in the desired logging framework at deployment
7300 time.")
7301 (license license:expat)))
7302
7303 (define java-slf4j-parent
7304 (package
7305 (inherit java-slf4j-api)
7306 (name "java-slf4j-parent")
7307 (native-inputs `())
7308 (propagated-inputs '())
7309 (arguments
7310 `(#:tests? #f
7311 #:phases
7312 (modify-phases %standard-phases
7313 (delete 'build)
7314 (delete 'configure)
7315 (replace 'install
7316 (install-pom-file "pom.xml")))))))
7317
7318 (define-public java-slf4j-simple
7319 (package
7320 (name "java-slf4j-simple")
7321 (version "1.7.25")
7322 (source (package-source java-slf4j-api))
7323 (build-system ant-build-system)
7324 (arguments
7325 `(#:jar-name "slf4j-simple.jar"
7326 #:source-dir "slf4j-simple/src/main"
7327 #:test-dir "slf4j-simple/src/test"
7328 #:phases
7329 (modify-phases %standard-phases
7330 ;; The tests need some test classes from slf4j-api
7331 (add-before 'check 'build-slf4j-api-test-helpers
7332 (lambda _
7333 ;; Add current dir to CLASSPATH ...
7334 (setenv "CLASSPATH"
7335 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7336 ;; ... and build test helper classes here:
7337 (apply invoke
7338 `("javac" "-d" "."
7339 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7340 (replace 'install
7341 (install-from-pom "slf4j-simple/pom.xml")))))
7342 (propagated-inputs
7343 `(("java-slf4j-api" ,java-slf4j-api)))
7344 (native-inputs
7345 `(("java-junit" ,java-junit)
7346 ("java-hamcrest-core" ,java-hamcrest-core)))
7347 (home-page "https://www.slf4j.org/")
7348 (synopsis "Simple implementation of simple logging facade for Java")
7349 (description "SLF4J binding for the Simple implementation, which outputs
7350 all events to System.err. Only messages of level INFO and higher are
7351 printed.")
7352 (license license:expat)))
7353
7354 (define-public antlr2
7355 (package
7356 (name "antlr2")
7357 (version "2.7.7")
7358 (source (origin
7359 (method url-fetch)
7360 (uri (string-append "https://www.antlr2.org/download/antlr-"
7361 version ".tar.gz"))
7362 (sha256
7363 (base32
7364 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7365 (modules '((guix build utils)))
7366 (snippet
7367 '(begin
7368 (delete-file "antlr.jar")
7369 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7370 (("#include <map>")
7371 (string-append
7372 "#include <map>\n"
7373 "#define EOF (-1)\n"
7374 "#include <strings.h>")))
7375 (substitute* "configure"
7376 (("/bin/sh") "sh"))
7377 #t))))
7378 (build-system gnu-build-system)
7379 (arguments
7380 `(#:tests? #f ; no test target
7381 #:imported-modules ((guix build ant-build-system)
7382 (guix build syscalls)
7383 ,@%gnu-build-system-modules)
7384 #:modules (((guix build ant-build-system) #:prefix ant:)
7385 (guix build gnu-build-system)
7386 (guix build utils))
7387 #:phases
7388 (modify-phases %standard-phases
7389 (add-after 'install 'strip-jar-timestamps
7390 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7391 (add-before 'configure 'fix-timestamp
7392 (lambda _
7393 (substitute* "configure"
7394 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7395 #t))
7396 (add-after 'configure 'fix-bin-ls
7397 (lambda _
7398 (substitute* (find-files "." "Makefile")
7399 (("/bin/ls") "ls"))
7400 #t)))))
7401 (native-inputs
7402 `(("which" ,which)
7403 ("zip" ,zip)
7404 ("java" ,icedtea "jdk")))
7405 (inputs
7406 `(("java" ,icedtea)))
7407 (home-page "https://www.antlr2.org")
7408 (synopsis "Framework for constructing recognizers, compilers, and translators")
7409 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7410 is a language tool that provides a framework for constructing recognizers,
7411 compilers, and translators from grammatical descriptions containing Java, C#,
7412 C++, or Python actions. ANTLR provides excellent support for tree construction,
7413 tree walking, and translation.")
7414 (license license:public-domain)))
7415
7416 (define-public java-stringtemplate-3
7417 (package
7418 (name "java-stringtemplate")
7419 (version "3.2.1")
7420 (source (origin
7421 (method url-fetch)
7422 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7423 "gh-pages/download/stringtemplate-"
7424 version ".tar.gz"))
7425 (sha256
7426 (base32
7427 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7428 (build-system ant-build-system)
7429 (arguments
7430 `(#:jar-name (string-append ,name "-" ,version ".jar")
7431 #:test-dir "test"
7432 #:modules ((guix build ant-build-system)
7433 (guix build utils)
7434 (srfi srfi-1))
7435 #:phases
7436 (modify-phases %standard-phases
7437 (add-before 'check 'fix-tests
7438 (lambda _
7439 (substitute* "build.xml"
7440 (("\\$\\{test.home\\}/java")
7441 "${test.home}/org"))
7442 #t))
7443 (add-before 'build 'generate-grammar
7444 (lambda _
7445 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7446 (for-each (lambda (file)
7447 (format #t "~a\n" file)
7448 (invoke "antlr" file))
7449 '("template.g" "angle.bracket.template.g" "action.g"
7450 "eval.g" "group.g" "interface.g")))
7451 #t)))))
7452 (native-inputs
7453 `(("antlr" ,antlr2)
7454 ("java-junit" ,java-junit)))
7455 (home-page "https://www.stringtemplate.org")
7456 (synopsis "Template engine to generate formatted text output")
7457 (description "StringTemplate is a java template engine (with ports for C#,
7458 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7459 or any other formatted text output. StringTemplate is particularly good at
7460 code generators, multiple site skins, and internationalization / localization.
7461 StringTemplate also powers ANTLR.")
7462 (license license:bsd-3)))
7463
7464 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7465 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7466 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7467 ;; of antlr3 at runtime.
7468 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7469 ;; This version of ST4 is sufficient for the latest antlr3.
7470 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7471 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7472 ;; against the latest ST4.
7473 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7474 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7475 ;; only grammar files with the antlr2 syntax.
7476 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7477
7478 (define-public java-stringtemplate
7479 (package (inherit java-stringtemplate-3)
7480 (name "java-stringtemplate")
7481 (version "4.0.8")
7482 (source (origin
7483 (method url-fetch)
7484 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7485 version ".tar.gz"))
7486 (file-name (string-append name "-" version ".tar.gz"))
7487 (sha256
7488 (base32
7489 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7490 (build-system ant-build-system)
7491 (arguments
7492 `(#:jar-name (string-append ,name "-" ,version ".jar")
7493 #:tests? #f ; FIXME: tests fail for unknown reasons
7494 #:test-dir "test"
7495 #:modules ((guix build ant-build-system)
7496 (guix build utils)
7497 (srfi srfi-1))
7498 #:phases
7499 (modify-phases %standard-phases
7500 (add-before 'check 'fix-test-target
7501 (lambda _
7502 (substitute* "build.xml"
7503 (("\\$\\{test.home\\}/java") "${test.home}/")
7504 (("\\*Test.java") "Test*.java"))
7505 #t))
7506 (add-before 'build 'generate-grammar
7507 (lambda _
7508 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7509 (for-each (lambda (file)
7510 (format #t "~a\n" file)
7511 (invoke "antlr3" file))
7512 '("STParser.g" "Group.g" "CodeGenerator.g")))
7513 #t)))))
7514 (inputs
7515 `(("antlr3" ,antlr3-bootstrap)
7516 ("antlr2" ,antlr2)
7517 ("java-stringtemplate" ,java-stringtemplate-3)
7518 ("java-junit" ,java-junit)))))
7519
7520 (define java-stringtemplate-4.0.6
7521 (package (inherit java-stringtemplate)
7522 (name "java-stringtemplate")
7523 (version "4.0.6")
7524 (source (origin
7525 (method url-fetch)
7526 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7527 version ".tar.gz"))
7528 (file-name (string-append name "-" version ".tar.gz"))
7529 (sha256
7530 (base32
7531 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7532 (inputs
7533 `(("antlr3" ,antlr3-3.3)
7534 ("antlr2" ,antlr2)
7535 ("java-stringtemplate" ,java-stringtemplate-3)))))
7536
7537 (define-public antlr3
7538 (package
7539 (name "antlr3")
7540 (version "3.5.2")
7541 (source (origin
7542 (method git-fetch)
7543 (uri (git-reference
7544 (url "https://github.com/antlr/antlr3")
7545 (commit version)))
7546 (file-name (git-file-name name version))
7547 (sha256
7548 (base32
7549 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7550 (build-system ant-build-system)
7551 (arguments
7552 `(#:jar-name (string-append ,name "-" ,version ".jar")
7553 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7554 #:tests? #f
7555 #:phases
7556 (modify-phases %standard-phases
7557 (add-after 'install 'bin-install
7558 (lambda* (#:key inputs outputs #:allow-other-keys)
7559 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7560 (bin (string-append (assoc-ref outputs "out") "/bin")))
7561 (mkdir-p bin)
7562 (with-output-to-file (string-append bin "/antlr3")
7563 (lambda _
7564 (display
7565 (string-append "#!" (which "sh") "\n"
7566 "java -cp " jar "/" ,name "-" ,version ".jar:"
7567 (string-concatenate
7568 (find-files (assoc-ref inputs "stringtemplate")
7569 ".*\\.jar"))
7570 ":"
7571 (string-concatenate
7572 (find-files (assoc-ref inputs "stringtemplate4")
7573 ".*\\.jar"))
7574 ":"
7575 (string-concatenate
7576 (find-files (string-append
7577 (assoc-ref inputs "antlr")
7578 "/lib")
7579 ".*\\.jar"))
7580 " org.antlr.Tool $*"))))
7581 (chmod (string-append bin "/antlr3") #o755))
7582 #t))
7583 (add-before 'build 'generate-grammar
7584 (lambda _
7585 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7586 (for-each (lambda (file)
7587 (display file)
7588 (newline)
7589 (invoke "antlr3" file))
7590 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7591 "AssignTokenTypesWalker.g"
7592 "ActionTranslator.g" "TreeToNFAConverter.g"
7593 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7594 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7595 (substitute* "ANTLRParser.java"
7596 (("public Object getTree") "public GrammarAST getTree"))
7597 (substitute* "ANTLRv3Parser.java"
7598 (("public Object getTree") "public CommonTree getTree"))
7599 (chdir "../../../../../java")
7600 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7601 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7602 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7603 (substitute* "org/antlr/tool/ErrorManager.java"
7604 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7605 (chdir "../../../..")
7606 #t))
7607 (add-before 'build 'fix-build-xml
7608 (lambda _
7609 (substitute* "build.xml"
7610 (("target name=\"compile\">")
7611 "target name=\"compile\">
7612 <copy todir=\"${classes.dir}\">
7613 <fileset dir=\"tool/src/main/resources\">
7614 <include name=\"**/*.stg\"/>
7615 <include name=\"**/*.st\"/>
7616 <include name=\"**/*.sti\"/>
7617 <include name=\"**/STLexer.tokens\"/>
7618 </fileset>
7619 </copy>"))
7620 #t)))))
7621 (native-inputs
7622 `(("antlr" ,antlr2)
7623 ("antlr3" ,antlr3-bootstrap)))
7624 (inputs
7625 `(("junit" ,java-junit)
7626 ("stringtemplate" ,java-stringtemplate-3)
7627 ("stringtemplate4" ,java-stringtemplate)))
7628 (propagated-inputs
7629 `(("stringtemplate" ,java-stringtemplate-3)
7630 ("antlr" ,antlr2)
7631 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7632 (home-page "https://www.antlr3.org")
7633 (synopsis "Framework for constructing recognizers, compilers, and translators")
7634 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7635 is a language tool that provides a framework for constructing recognizers,
7636 compilers, and translators from grammatical descriptions containing Java, C#,
7637 C++, or Python actions. ANTLR provides excellent support for tree construction,
7638 tree walking, and translation.")
7639 (license license:bsd-3)))
7640
7641 (define antlr3-bootstrap
7642 (package
7643 (inherit antlr3)
7644 (name "antlr3-bootstrap")
7645 (native-inputs
7646 `(("antlr" ,antlr2)
7647 ("antlr3" ,antlr3-3.3)))
7648 (inputs
7649 `(("junit" ,java-junit)))))
7650
7651 (define-public antlr3-3.3
7652 (package
7653 (inherit antlr3)
7654 (name "antlr3")
7655 (version "3.3")
7656 (source (origin
7657 (method url-fetch)
7658 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7659 "gh-pages/download/antlr-"
7660 version ".tar.gz"))
7661 (sha256
7662 (base32
7663 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7664 (patches
7665 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7666 (arguments
7667 `(#:jar-name (string-append ,name "-" ,version ".jar")
7668 #:source-dir (string-join '("tool/src/main/java"
7669 "runtime/Java/src/main/java"
7670 "tool/src/main/antlr2"
7671 "tool/src/main/antlr3")
7672 ":")
7673 #:tests? #f ; FIXME: tests seem to require maven plugin
7674 #:modules ((guix build ant-build-system)
7675 (guix build utils)
7676 (srfi srfi-1))
7677 #:phases
7678 (modify-phases %standard-phases
7679 (add-after 'install 'bin-install
7680 (lambda* (#:key inputs outputs #:allow-other-keys)
7681 (let* ((out (assoc-ref outputs "out"))
7682 (jar (string-append out "/share/java"))
7683 (bin (string-append out "/bin")))
7684 (mkdir-p bin)
7685 (with-output-to-file (string-append bin "/antlr3")
7686 (lambda _
7687 (display
7688 (string-append
7689 "#!" (which "sh") "\n"
7690 "java -cp " jar "/antlr3-3.3.jar:"
7691 (string-join
7692 (append (find-files (assoc-ref inputs "java-stringtemplate")
7693 ".*\\.jar$")
7694 (find-files (string-append (assoc-ref inputs "antlr")
7695 "/lib")
7696 ".*\\.jar$"))
7697 ":")
7698 " org.antlr.Tool $*"))))
7699 (chmod (string-append bin "/antlr3") #o755)
7700 #t)))
7701 (add-before 'build 'generate-grammar
7702 (lambda _
7703 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7704 (("import org.antlr.grammar.v2.\\*;")
7705 "import org.antlr.grammar.v2.*;\n
7706 import org.antlr.grammar.v2.TreeToNFAConverter;\n
7707 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
7708 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
7709 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7710 (for-each (lambda (file)
7711 (format #t "~a\n" file)
7712 (invoke "antlr" file))
7713 '("antlr.g" "antlr.print.g" "assign.types.g"
7714 "buildnfa.g" "codegen.g" "define.g")))
7715 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7716 (for-each (lambda (file)
7717 (format #t "~a\n" file)
7718 (invoke "antlr3" file))
7719 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7720 "ANTLRv3Tree.g")))
7721 #t))
7722 (add-before 'build 'fix-build-xml
7723 (lambda _
7724 (substitute* "build.xml"
7725 (("target name=\"compile\">")
7726 "target name=\"compile\">
7727 <copy todir=\"${classes.dir}\">
7728 <fileset dir=\"tool/src/main/resources\">
7729 <include name=\"**/*.stg\"/>
7730 <include name=\"**/*.st\"/>
7731 <include name=\"**/*.sti\"/>
7732 <include name=\"**/STLexer.tokens\"/>
7733 </fileset>
7734 </copy>"))
7735 #t)))))
7736 (native-inputs
7737 `(("antlr" ,antlr2)
7738 ("antlr3" ,antlr3-3.1)))
7739 (inputs
7740 `(("junit" ,java-junit)))
7741 (propagated-inputs
7742 `(("java-stringtemplate" ,java-stringtemplate-3)
7743 ("antlr" ,antlr2)))))
7744
7745 (define-public antlr3-3.1
7746 (package
7747 (inherit antlr3)
7748 (version "3.1")
7749 (source (origin
7750 (method url-fetch)
7751 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7752 "gh-pages/download/antlr-"
7753 version ".tar.gz"))
7754 (sha256
7755 (base32
7756 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7757 (patches
7758 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7759 (arguments
7760 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7761 #:source-dir "src:runtime/Java/src"
7762 #:tests? #f
7763 #:phases
7764 (modify-phases %standard-phases
7765 (add-after 'install 'bin-install
7766 (lambda* (#:key inputs outputs #:allow-other-keys)
7767 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7768 (bin (string-append (assoc-ref outputs "out") "/bin")))
7769 (mkdir-p bin)
7770 (with-output-to-file (string-append bin "/antlr3")
7771 (lambda _
7772 (display
7773 (string-append "#!" (which "sh") "\n"
7774 "java -cp " jar "/antlr3-3.1.jar:"
7775 (string-concatenate
7776 (find-files (assoc-ref inputs "stringtemplate")
7777 ".*\\.jar"))
7778 ":"
7779 (string-concatenate
7780 (find-files (string-append
7781 (assoc-ref inputs "antlr")
7782 "/lib")
7783 ".*\\.jar"))
7784 " org.antlr.Tool $*"))))
7785 (chmod (string-append bin "/antlr3") #o755))
7786 #t))
7787 (add-before 'build 'generate-grammar
7788 (lambda _
7789 (let ((dir "src/org/antlr/tool/"))
7790 (for-each (lambda (file)
7791 (display file)
7792 (newline)
7793 (invoke "antlr" "-o" dir (string-append dir file)))
7794 '("antlr.g" "antlr.print.g" "assign.types.g"
7795 "buildnfa.g" "define.g")))
7796 (format #t "codegen.g\n")
7797 (invoke "antlr" "-o" "src/org/antlr/codegen"
7798 "src/org/antlr/codegen/codegen.g")
7799 #t))
7800 (add-before 'build 'fix-build-xml
7801 (lambda _
7802 (substitute* "build.xml"
7803 (("target name=\"compile\">")
7804 "target name=\"compile\">
7805 <copy todir=\"${classes.dir}\">
7806 <fileset dir=\"src\">
7807 <include name=\"**/*.stg\"/>
7808 <include name=\"**/*.st\"/>
7809 <include name=\"**/*.sti\"/>
7810 <include name=\"**/STLexer.tokens\"/>
7811 </fileset>
7812 </copy>"))
7813 #t)))))
7814 (native-inputs
7815 `(("antlr" ,antlr2)))
7816 (inputs
7817 `(("junit" ,java-junit)))
7818 (propagated-inputs
7819 `(("stringtemplate" ,java-stringtemplate-3)))))
7820
7821 (define-public java-commons-cli-1.2
7822 ;; This is a bootstrap dependency for Maven2.
7823 (package
7824 (inherit java-commons-cli)
7825 (version "1.2")
7826 (source (origin
7827 (method url-fetch)
7828 (uri (string-append "mirror://apache/commons/cli/source/"
7829 "commons-cli-" version "-src.tar.gz"))
7830 (sha256
7831 (base32
7832 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7833 (arguments
7834 `(#:jar-name "commons-cli.jar"
7835 #:phases
7836 (modify-phases %standard-phases
7837 (add-before 'check 'fix-build-xml
7838 (lambda* (#:key inputs #:allow-other-keys)
7839 (substitute* "build.xml"
7840 (("dir=\"\\$\\{test.home\\}/java\"")
7841 "dir=\"${test.home}\""))
7842 #t)))))
7843 (native-inputs
7844 `(("java-junit" ,java-junit)))))
7845
7846 (define-public java-microemulator-cldc
7847 (package
7848 (name "java-microemulator-cldc")
7849 (version "2.0.4")
7850 (source (origin
7851 (method url-fetch)
7852 (uri (string-append "https://github.com/barteo/microemu/archive/"
7853 "microemulator_"
7854 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7855 version)
7856 ".tar.gz"))
7857 (file-name (string-append name "-" version ".tar.gz"))
7858 (sha256
7859 (base32
7860 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7861 (build-system ant-build-system)
7862 (arguments
7863 `(#:jar-name "microemulator-cldc.jar"
7864 #:source-dir "microemu-cldc/src/main/java"
7865 #:tests? #f)); Requires even older software
7866 (home-page "https://github.com/barteo/microemu")
7867 (synopsis "J2ME CLDC emulator")
7868 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7869 Emulator. It demonstrates MIDlet based applications in web browser
7870 applet and can be run as a standalone java application.")
7871 (license (list license:asl2.0
7872 ;; or altenatively:
7873 license:lgpl2.1+))))
7874
7875 (define-public java-datanucleus-javax-persistence
7876 (package
7877 (name "java-datanucleus-javax-persistence")
7878 (version "2.2.0")
7879 (source (origin
7880 (method url-fetch)
7881 (uri (string-append "https://github.com/datanucleus/"
7882 "javax.persistence/archive/javax.persistence-"
7883 version "-release.tar.gz"))
7884 (sha256
7885 (base32
7886 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7887 (build-system ant-build-system)
7888 (arguments
7889 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7890 #:jdk ,icedtea-8
7891 #:source-dir "src/main/java"
7892 #:tests? #f)); no tests
7893 (home-page "https://github.com/datanucleus/javax.persistence")
7894 (synopsis "JPA API")
7895 (description "This package contains a clean definition of JPA API intended
7896 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7897 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7898 used to generate this API.")
7899 (license (list license:edl1.0 license:epl1.0))))
7900
7901 (define-public java-osgi-cmpn
7902 (package
7903 (name "java-osgi-cmpn")
7904 (version "6.0.0")
7905 (source (origin
7906 (method url-fetch)
7907 (uri (string-append "https://repo1.maven.org/maven2/"
7908 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7909 version "-sources.jar"))
7910 (sha256
7911 (base32
7912 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7913 (build-system ant-build-system)
7914 (arguments
7915 `(#:jar-name "osgi-cmpn.jar"
7916 #:tests? #f)); no tests
7917 (inputs
7918 `(("annotation" ,java-osgi-annotation)
7919 ("core" ,java-osgi-core)
7920 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7921 ("microemulator" ,java-microemulator-cldc)
7922 ("servlet" ,java-classpathx-servletapi)))
7923 (home-page "https://www.osgi.org")
7924 (synopsis "Compendium specification module of OSGi framework")
7925 (description
7926 "OSGi, for Open Services Gateway initiative framework, is a module system
7927 and service platform for the Java programming language. This package contains
7928 the compendium specification module, providing interfaces and classes for use
7929 in compiling bundles.")
7930 (license license:asl2.0)))
7931
7932 (define-public java-osgi-service-component-annotations
7933 (package
7934 (name "java-osgi-service-component-annotations")
7935 (version "1.3.0")
7936 (source (origin
7937 (method url-fetch)
7938 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7939 "org.osgi.service.component.annotations/"
7940 version "/org.osgi.service.component.annotations-"
7941 version "-sources.jar"))
7942 (sha256
7943 (base32
7944 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7945 (build-system ant-build-system)
7946 (arguments
7947 `(#:jar-name "osgi-service-component-annotations.jar"
7948 #:tests? #f)); no tests
7949 (inputs
7950 `(("annotation" ,java-osgi-annotation)))
7951 (home-page "https://www.osgi.org")
7952 (synopsis "Support annotations for osgi-service-component")
7953 (description
7954 "OSGi, for Open Services Gateway initiative framework, is a module system
7955 and service platform for the Java programming language. This package contains
7956 the support annotations for osgi-service-component.")
7957 (license license:asl2.0)))
7958
7959 (define-public java-osgi-dto
7960 (package
7961 (name "java-osgi-dto")
7962 (version "1.0.0")
7963 (source (origin
7964 (method url-fetch)
7965 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7966 "org.osgi.dto/" version "/org.osgi.dto-"
7967 version "-sources.jar"))
7968 (sha256
7969 (base32
7970 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7971 (build-system ant-build-system)
7972 (arguments
7973 `(#:jar-name "osgi-dto.jar"
7974 #:tests? #f)); no tests
7975 (inputs
7976 `(("annotation" ,java-osgi-annotation)))
7977 (home-page "https://www.osgi.org")
7978 (synopsis "Data Transfer Objects")
7979 (description
7980 "OSGi, for Open Services Gateway initiative framework, is a module system
7981 and service platform for the Java programming language. This package contains
7982 the Data Transfer Objects. It is easily serializable having only public fields
7983 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7984 Map and array aggregates may also be used. The aggregates must only hold
7985 objects of the listed types or aggregates.")
7986 (license license:asl2.0)))
7987
7988 (define-public java-osgi-resource
7989 (package
7990 (name "java-osgi-resource")
7991 (version "1.0.0")
7992 (source (origin
7993 (method url-fetch)
7994 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7995 "org.osgi.resource/"
7996 version "/org.osgi.resource-"
7997 version "-sources.jar"))
7998 (sha256
7999 (base32
8000 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8001 (build-system ant-build-system)
8002 (arguments
8003 `(#:jar-name "osgi-resource.jar"
8004 #:tests? #f)); no tests
8005 (inputs
8006 `(("annotation" ,java-osgi-annotation)
8007 ("dto" ,java-osgi-dto)))
8008 (home-page "https://www.osgi.org")
8009 (synopsis "OSGI Resource")
8010 (description
8011 "OSGi, for Open Services Gateway initiative framework, is a module system
8012 and service platform for the Java programming language. This package contains
8013 the definition of common types in osgi packages.")
8014 (license license:asl2.0)))
8015
8016 (define-public java-osgi-namespace-contract
8017 (package
8018 (name "java-osgi-namespace-contract")
8019 (version "1.0.0")
8020 (source (origin
8021 (method url-fetch)
8022 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8023 "org.osgi.namespace.contract/"
8024 version "/org.osgi.namespace.contract-"
8025 version "-sources.jar"))
8026 (sha256
8027 (base32
8028 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8029 (build-system ant-build-system)
8030 (inputs
8031 `(("resource" ,java-osgi-resource)
8032 ("annotation" ,java-osgi-annotation)))
8033 (arguments
8034 `(#:jar-name "osgi-namespace-contract.jar"
8035 #:tests? #f)); no tests
8036 (home-page "https://www.osgi.org")
8037 (synopsis "Contract Capability and Requirement Namespace")
8038 (description
8039 "OSGi, for Open Services Gateway initiative framework, is a module system
8040 and service platform for the Java programming language. This package contains
8041 the names for the attributes and directives for a namespace with contracts.")
8042 (license license:asl2.0)))
8043
8044 (define-public java-osgi-namespace-extender
8045 (package
8046 (name "java-osgi-namespace-extender")
8047 (version "1.0.1")
8048 (source (origin
8049 (method url-fetch)
8050 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8051 "org.osgi.namespace.extender/"
8052 version "/org.osgi.namespace.extender-"
8053 version "-sources.jar"))
8054 (sha256
8055 (base32
8056 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8057 (build-system ant-build-system)
8058 (inputs
8059 `(("resource" ,java-osgi-resource)
8060 ("annotation" ,java-osgi-annotation)))
8061 (arguments
8062 `(#:jar-name "osgi-namespace-extendent.jar"
8063 #:tests? #f)); no tests
8064 (home-page "https://www.osgi.org")
8065 (synopsis "Extender Capability and Requirement Namespace")
8066 (description
8067 "OSGi, for Open Services Gateway initiative framework, is a module system
8068 and service platform for the Java programming language. This package contains
8069 the names for the attributes and directives for an extender namespace.")
8070 (license license:asl2.0)))
8071
8072 (define-public java-osgi-namespace-service
8073 (package
8074 (name "java-osgi-namespace-service")
8075 (version "1.0.0")
8076 (source (origin
8077 (method url-fetch)
8078 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8079 "org.osgi.namespace.service/"
8080 version "/org.osgi.namespace.service-"
8081 version "-sources.jar"))
8082 (sha256
8083 (base32
8084 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8085 (build-system ant-build-system)
8086 (inputs
8087 `(("resource" ,java-osgi-resource)
8088 ("annotation" ,java-osgi-annotation)))
8089 (arguments
8090 `(#:jar-name "osgi-namespace-service.jar"
8091 #:tests? #f)); no tests
8092 (home-page "https://www.osgi.org")
8093 (synopsis "Service Capability and Requirement Namespace")
8094 (description
8095 "OSGi, for Open Services Gateway initiative framework, is a module system
8096 and service platform for the Java programming language. This package contains
8097 the names for the attributes and directives for a service namespace.")
8098 (license license:asl2.0)))
8099
8100 (define-public java-osgi-util-function
8101 (package
8102 (name "java-osgi-util-function")
8103 (version "1.0.0")
8104 (source (origin
8105 (method url-fetch)
8106 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8107 "org.osgi.util.function/"
8108 version "/org.osgi.util.function-"
8109 version "-sources.jar"))
8110 (sha256
8111 (base32
8112 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8113 (build-system ant-build-system)
8114 (arguments
8115 `(#:jar-name "osgi-util-function.jar"
8116 #:tests? #f)); no tests
8117 (inputs
8118 `(("annotation" ,java-osgi-annotation)))
8119 (home-page "https://www.osgi.org")
8120 (synopsis "OSGI Util Function")
8121 (description
8122 "OSGi, for Open Services Gateway initiative framework, is a module system
8123 and service platform for the Java programming language. This package contains
8124 an interface for a function that accepts a single argument and produces a result.")
8125 (license license:asl2.0)))
8126
8127 (define-public java-osgi-util-promise
8128 (package
8129 (name "java-osgi-util-promise")
8130 (version "1.0.0")
8131 (source (origin
8132 (method url-fetch)
8133 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8134 "org.osgi.util.promise/"
8135 version "/org.osgi.util.promise-"
8136 version "-sources.jar"))
8137 (sha256
8138 (base32
8139 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8140 (build-system ant-build-system)
8141 (arguments
8142 `(#:jar-name "osgi-util-promise.jar"
8143 #:tests? #f)); no tests
8144 (inputs
8145 `(("annotation" ,java-osgi-annotation)
8146 ("function" ,java-osgi-util-function)))
8147 (home-page "https://www.osgi.org")
8148 (synopsis "Promise of a value")
8149 (description
8150 "OSGi, for Open Services Gateway initiative framework, is a module system
8151 and service platform for the Java programming language. This package contains
8152 an interface and utilitary classes for promises. A Promise represents a future
8153 value. It handles the interactions for asynchronous processing.")
8154 (license license:asl2.0)))
8155
8156 (define-public java-osgi-service-metatype-annotations
8157 (package
8158 (name "java-osgi-service-metatype-annotations")
8159 (version "1.3.0")
8160 (source (origin
8161 (method url-fetch)
8162 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8163 "org.osgi.service.metatype.annotations/"
8164 version "/org.osgi.service.metatype.annotations-"
8165 version "-sources.jar"))
8166 (sha256
8167 (base32
8168 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8169 (build-system ant-build-system)
8170 (arguments
8171 `(#:jar-name "osgi-service-metatype-annotations.jar"
8172 #:tests? #f)); no tests
8173 (inputs
8174 `(("annotation" ,java-osgi-annotation)))
8175 (home-page "https://www.osgi.org")
8176 (synopsis "Support annotations for metatype")
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 the support annotations for metatype.")
8181 (license license:asl2.0)))
8182
8183 (define-public java-osgi-service-repository
8184 (package
8185 (name "java-osgi-service-repository")
8186 (version "1.1.0")
8187 (source (origin
8188 (method url-fetch)
8189 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8190 "org.osgi.service.repository/"
8191 version "/org.osgi.service.repository-"
8192 version "-sources.jar"))
8193 (sha256
8194 (base32
8195 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
8196 (build-system ant-build-system)
8197 (arguments
8198 `(#:jar-name "osgi-service-repository.jar"
8199 #:tests? #f)); no tests
8200 (inputs
8201 `(("annotation" ,java-osgi-annotation)
8202 ("promise" ,java-osgi-util-promise)
8203 ("resource" ,java-osgi-resource)))
8204 (home-page "https://www.osgi.org")
8205 (synopsis "OSGI service repository")
8206 (description
8207 "OSGi, for Open Services Gateway initiative framework, is a module system
8208 and service platform for the Java programming language. This package contains
8209 a repository service that contains resources.")
8210 (license license:asl2.0)))
8211
8212 (define-public java-osgi-framework
8213 (package
8214 (name "java-osgi-framework")
8215 (version "1.8.0")
8216 (source (origin
8217 (method url-fetch)
8218 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8219 "org.osgi.framework/" version "/org.osgi.framework-"
8220 version "-sources.jar"))
8221 (sha256
8222 (base32
8223 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
8224 (build-system ant-build-system)
8225 (arguments
8226 `(#:jar-name "osgi-framework.jar"
8227 #:tests? #f)); no tests
8228 (inputs
8229 `(("annotation" ,java-osgi-annotation)
8230 ("resource" ,java-osgi-resource)
8231 ("dto" ,java-osgi-dto)))
8232 (home-page "https://www.osgi.org")
8233 (synopsis "OSGi framework")
8234 (description
8235 "OSGi, for Open Services Gateway initiative framework, is a module system
8236 and service platform for the Java programming language.")
8237 (license license:asl2.0)))
8238
8239 (define-public java-osgi-service-log
8240 (package
8241 (name "java-osgi-service-log")
8242 (version "1.3.0")
8243 (source (origin
8244 (method url-fetch)
8245 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8246 "org.osgi.service.log/"
8247 version "/org.osgi.service.log-"
8248 version "-sources.jar"))
8249 (sha256
8250 (base32
8251 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
8252 (build-system ant-build-system)
8253 (arguments
8254 `(#:jar-name "osgi-service-log.jar"
8255 #:tests? #f)); no tests
8256 (inputs
8257 `(("java-osgi-framework" ,java-osgi-framework)))
8258 (home-page "https://www.osgi.org")
8259 (synopsis "Provides methods for bundles to write messages to the log")
8260 (description
8261 "OSGi, for Open Services Gateway initiative framework, is a module system
8262 and service platform for the Java programming language. This package contains
8263 the log service.")
8264 (license license:asl2.0)))
8265
8266 (define-public java-osgi-service-jdbc
8267 (package
8268 (name "java-osgi-service-jdbc")
8269 (version "1.0.0")
8270 (source (origin
8271 (method url-fetch)
8272 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8273 "org.osgi.service.jdbc/"
8274 version "/org.osgi.service.jdbc-"
8275 version "-sources.jar"))
8276 (sha256
8277 (base32
8278 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
8279 (build-system ant-build-system)
8280 (arguments
8281 `(#:jar-name "osgi-service-jdbc.jar"
8282 #:tests? #f)); no tests
8283 (home-page "https://www.osgi.org")
8284 (synopsis "Factory for JDBC connection factories")
8285 (description
8286 "OSGi, for Open Services Gateway initiative framework, is a module system
8287 and service platform for the Java programming language. This package contains
8288 a factory for JDBC connection factories. There are 3 preferred connection
8289 factories for getting JDBC connections:
8290
8291 @itemize
8292 @item @code{javax.sql.DataSource};
8293 @item @code{javax.sql.ConnectionPoolDataSource};
8294 @item @code{javax.sql.XADataSource}.
8295 @end itemize")
8296 (license license:asl2.0)))
8297
8298 (define-public java-osgi-service-resolver
8299 (package
8300 (name "java-osgi-service-resolver")
8301 (version "1.0.1")
8302 (source (origin
8303 (method url-fetch)
8304 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8305 "org.osgi.service.resolver/"
8306 version "/org.osgi.service.resolver-"
8307 version "-sources.jar"))
8308 (sha256
8309 (base32
8310 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
8311 (build-system ant-build-system)
8312 (arguments
8313 `(#:jar-name "osgi-service-resolver.jar"
8314 #:tests? #f)); no tests
8315 (inputs
8316 `(("annotation" ,java-osgi-annotation)
8317 ("resource" ,java-osgi-resource)))
8318 (home-page "https://www.osgi.org")
8319 (synopsis "OSGI Resolver service")
8320 (description
8321 "OSGi, for Open Services Gateway initiative framework, is a module system
8322 and service platform for the Java programming language. This package contains
8323 a resolver service that resolves the specified resources in the context supplied
8324 by the caller.")
8325 (license license:asl2.0)))
8326
8327 (define-public java-osgi-util-tracker
8328 (package
8329 (name "java-osgi-util-tracker")
8330 (version "1.5.1")
8331 (source (origin
8332 (method url-fetch)
8333 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8334 "org.osgi.util.tracker/"
8335 version "/org.osgi.util.tracker-"
8336 version "-sources.jar"))
8337 (sha256
8338 (base32
8339 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
8340 (build-system ant-build-system)
8341 (arguments
8342 `(#:jar-name "osgi-util-tracker.jar"
8343 #:tests? #f)); no tests
8344 (inputs
8345 `(("framework" ,java-osgi-framework)
8346 ("annotation" ,java-osgi-annotation)))
8347 (home-page "https://www.osgi.org")
8348 (synopsis "Bundle tracking")
8349 (description
8350 "OSGi, for Open Services Gateway initiative framework, is a module system
8351 and service platform for the Java programming language. This package contains
8352 bundle tracking utility classes.")
8353 (license license:asl2.0)))
8354
8355 (define-public java-osgi-service-cm
8356 (package
8357 (name "java-osgi-service-cm")
8358 (version "1.5.0")
8359 (source (origin
8360 (method url-fetch)
8361 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8362 "org.osgi.service.cm/"
8363 version "/org.osgi.service.cm-"
8364 version "-sources.jar"))
8365 (sha256
8366 (base32
8367 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
8368 (build-system ant-build-system)
8369 (arguments
8370 `(#:jar-name "osgi-service-cm.jar"
8371 #:tests? #f)); no tests
8372 (inputs
8373 `(("framework" ,java-osgi-framework)
8374 ("annotation" ,java-osgi-annotation)))
8375 (home-page "https://www.osgi.org")
8376 (synopsis "OSGI Configuration Management")
8377 (description
8378 "OSGi, for Open Services Gateway initiative framework, is a module system
8379 and service platform for the Java programming language. This package contains
8380 utility classes for the configuration of services.")
8381 (license license:asl2.0)))
8382
8383 (define-public java-osgi-service-packageadmin
8384 (package
8385 (name "java-osgi-service-packageadmin")
8386 (version "1.2.0")
8387 (source (origin
8388 (method url-fetch)
8389 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8390 "org.osgi.service.packageadmin/"
8391 version "/org.osgi.service.packageadmin-"
8392 version "-sources.jar"))
8393 (sha256
8394 (base32
8395 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
8396 (build-system ant-build-system)
8397 (arguments
8398 `(#:jar-name "osgi-service-packageadmin.jar"
8399 #:tests? #f)); no tests
8400 (inputs
8401 `(("framework" ,java-osgi-framework)))
8402 (home-page "https://www.osgi.org")
8403 (synopsis "OSGI Package Administration")
8404 (description
8405 "OSGi, for Open Services Gateway initiative framework, is a module system
8406 and service platform for the Java programming language. This package contains
8407 the packageadmin service.")
8408 (license license:asl2.0)))
8409
8410 (define-public java-ops4j-base-lang
8411 (package
8412 (name "java-ops4j-base-lang")
8413 (version "1.5.0")
8414 (source (origin
8415 (method url-fetch)
8416 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
8417 "archive/base-" version ".tar.gz"))
8418 (sha256
8419 (base32
8420 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
8421 (build-system ant-build-system)
8422 (arguments
8423 `(#:jar-name "java-ops4j-base-lang.jar"
8424 #:source-dir "ops4j-base-lang/src/main/java"
8425 #:tests? #f; no tests
8426 #:phases
8427 (modify-phases %standard-phases
8428 (add-before 'build 'add-test-file
8429 (lambda _
8430 ;; That file is required by a test in ops4j-pax-exam-core-spi
8431 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
8432 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
8433 (lambda _
8434 (display
8435 (string-append
8436 "version=" ,version "\n"
8437 "groupId=org.ops4j.base"
8438 "artifactId=ops4j-base-lang\n"))))
8439 #t)))))
8440 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
8441 (synopsis "Utility classes and extensions to be used in OPS4J projects")
8442 (description "OPS4J stands for Open Participation Software for Java. This
8443 package contains utilities and extensions related to @code{java.lang}.")
8444 (license license:asl2.0)))
8445
8446 (define-public java-ops4j-base-monitors
8447 (package
8448 (inherit java-ops4j-base-lang)
8449 (name "java-ops4j-base-monitors")
8450 (arguments
8451 `(#:jar-name "java-ops4j-base-monitors.jar"
8452 #:source-dir "ops4j-base-monitors/src/main/java"
8453 #:tests? #f)); no tests
8454 (inputs
8455 `(("lang" ,java-ops4j-base-lang)))
8456 (description "OPS4J stands for Open Participation Software for Java. This
8457 package contains utilities and extensions related to monitoring.")))
8458
8459 (define-public java-ops4j-base-io
8460 (package
8461 (inherit java-ops4j-base-lang)
8462 (name "java-ops4j-base-io")
8463 (arguments
8464 `(#:jar-name "java-ops4j-base-io.jar"
8465 #:source-dir "ops4j-base-io/src/main/java"
8466 #:test-dir "ops4j-base-io/src/test"
8467 #:test-exclude
8468 (list "**/ListerTest.java")))
8469 (inputs
8470 `(("lang" ,java-ops4j-base-monitors)
8471 ("lang" ,java-ops4j-base-lang)))
8472 (native-inputs
8473 `(("junit" ,java-junit)
8474 ("hamcrest" ,java-hamcrest-core)))
8475 (description "OPS4J stands for Open Participation Software for Java. This
8476 package contains utilities and extensions related to handling streams and files.")))
8477
8478 (define-public java-ops4j-base-util
8479 (package
8480 (inherit java-ops4j-base-lang)
8481 (name "java-ops4j-base-util")
8482 (arguments
8483 `(#:jar-name "java-ops4j-base-util.jar"
8484 #:source-dir "ops4j-base-util/src/main/java"
8485 #:test-dir "ops4j-base-util/src/test"))
8486 (inputs
8487 `(("lang" ,java-ops4j-base-lang)))
8488 (native-inputs
8489 `(("junit" ,java-junit)))
8490 (description "OPS4J stands for Open Participation Software for Java. This
8491 package contains utilities and extensions related to environment, i18n and
8492 mime types.")))
8493
8494 (define-public java-ops4j-base-util-property
8495 (package
8496 (inherit java-ops4j-base-lang)
8497 (name "java-ops4j-base-util-property")
8498 (arguments
8499 `(#:jar-name "java-ops4j-base-util-property.jar"
8500 #:source-dir "ops4j-base-util-property/src/main/java"
8501 #:tests? #f)); no tests
8502 (inputs
8503 `(("lang" ,java-ops4j-base-lang)
8504 ("util" ,java-ops4j-base-util)))
8505 (description "OPS4J stands for Open Participation Software for Java. This
8506 package contains utilities and extensions related to resolving properties from
8507 different sources.")))
8508
8509 (define-public java-ops4j-base-store
8510 (package
8511 (inherit java-ops4j-base-lang)
8512 (name "java-ops4j-base-store")
8513 (arguments
8514 `(#:jar-name "java-ops4j-base-store.jar"
8515 #:source-dir "ops4j-base-store/src/main/java"
8516 #:tests? #f)); no tests
8517 (inputs
8518 `(("lang" ,java-ops4j-base-lang)
8519 ("slf4j" ,java-slf4j-api)
8520 ("io" ,java-ops4j-base-io)))
8521 (description "OPS4J stands for Open Participation Software for Java. This
8522 package contains utilities for storing and retrieving data from an
8523 @code{InputStream}.")))
8524
8525 (define-public java-ops4j-base-spi
8526 (package
8527 (inherit java-ops4j-base-lang)
8528 (name "java-ops4j-base-spi")
8529 (arguments
8530 `(#:jar-name "java-ops4j-base-spi.jar"
8531 #:source-dir "ops4j-base-spi/src/main/java"
8532 #:test-dir "ops4j-base-spi/src/test"))
8533 (native-inputs
8534 `(("junit" ,java-junit)
8535 ("hamcrest" ,java-hamcrest-core)))
8536 (description "OPS4J stands for Open Participation Software for Java. This
8537 package contains utilities for obtaining services via the Java SE 6
8538 @code{ServiceLoader}.")))
8539
8540 (define-public java-aqute-bnd-annotation
8541 (package
8542 (name "java-aqute-bnd-annotation")
8543 (version "3.5.0")
8544 (source (origin
8545 (method url-fetch)
8546 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8547 version ".REL.tar.gz"))
8548 (file-name (string-append name "-" version ".tar.gz"))
8549 (sha256
8550 (base32
8551 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8552 (build-system ant-build-system)
8553 (arguments
8554 `(#:jar-name "java-aqute-bnd-annotation.jar"
8555 #:source-dir "biz.aQute.bnd.annotation/src"
8556 #:tests? #f)); empty test dir
8557 (home-page "https://bnd.bndtools.org/")
8558 (synopsis "Tools for OSGi")
8559 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8560 headers based on analyzing the class code, it verifies the project settings,
8561 it manages project dependencies, gives diffs jars, and much more.")
8562 (license license:asl2.0)))
8563
8564 (define-public java-aqute-libg
8565 (package
8566 (inherit java-aqute-bnd-annotation)
8567 (name "java-aqute-libg")
8568 (arguments
8569 `(#:jar-name "java-aqute-libg.jar"
8570 ;; The build fails when source/target more recent than 1.7. This
8571 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8572 ;;
8573 ;; It is closed as won't fix. There is no way to change the source
8574 ;; so that it works on 1.8, and still works on 1.6, the upstream
8575 ;; target. It work fine on 1.7, so we use 1.7.
8576 #:make-flags (list "-Dant.build.javac.source=1.7"
8577 "-Dant.build.javac.target=1.7")
8578 #:phases
8579 (modify-phases %standard-phases
8580 (add-before 'configure 'chdir
8581 ;; Change to aQute.libg directory, so that the relative
8582 ;; paths in the tests aren't broken.
8583 (lambda _
8584 (chdir "aQute.libg")
8585 #t))
8586 (add-before 'check 'create-test-directory
8587 ;; Copy the test directory to test/java, since that's where
8588 ;; ant-build-system's default project in build.xml expects to find
8589 ;; the test classes. Leave a copy in the original place to not
8590 ;; break paths in tests.
8591 (lambda _
8592 (mkdir "src/test")
8593 (copy-recursively "test" "src/test/java")
8594 #t)))))
8595 (inputs
8596 `(("slf4j" ,java-slf4j-api)
8597 ("osgi-annot" ,java-osgi-annotation)
8598 ("java-osgi-cmpn" ,java-osgi-cmpn)
8599 ("osgi" ,java-osgi-core)))
8600 (native-inputs
8601 `(("hamcrest" ,java-hamcrest-core)
8602 ("java-junit" ,java-junit)))))
8603
8604 (define-public java-aqute-bndlib
8605 (package
8606 (inherit java-aqute-bnd-annotation)
8607 (name "java-aqute-bndlib")
8608 (arguments
8609 `(#:jar-name "java-bndlib.jar"
8610 #:source-dir "biz.aQute.bndlib/src"
8611 #:tests? #f)); no tests
8612 (inputs
8613 `(("slf4j" ,java-slf4j-api)
8614 ("osgi-annot" ,java-osgi-annotation)
8615 ("java-aqute-libg" ,java-aqute-libg)
8616 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8617 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8618 ("java-osgi-service-repository" ,java-osgi-service-repository)
8619 ("java-osgi-service-log" ,java-osgi-service-log)
8620 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8621 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8622 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8623 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8624 ("promise" ,java-osgi-util-promise)
8625 ("osgi" ,java-osgi-core)))))
8626
8627 (define-public java-ops4j-pax-tinybundles
8628 (package
8629 (name "java-ops4j-pax-tinybundles")
8630 (version "2.1.1")
8631 (source (origin
8632 (method url-fetch)
8633 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8634 "archive/tinybundles-" version ".tar.gz"))
8635 (sha256
8636 (base32
8637 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8638 (arguments
8639 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8640 #:source-dir "src/main/java"
8641 #:test-exclude
8642 ;; Abstract base classes for other tests
8643 (list "**/BndTest.java" "**/CoreTest.java")
8644 #:phases
8645 (modify-phases %standard-phases
8646 (add-before 'check 'fix-version
8647 (lambda _
8648 ;; This test has a reference to an old version of bndlib we are not
8649 ;; packaging. It uses the version referenced in pom.xml. We replace
8650 ;; it with our own version.
8651 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8652 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8653 ,(package-version java-aqute-bndlib)))
8654 #t)))))
8655 (inputs
8656 `(("lang" ,java-ops4j-base-lang)
8657 ("io" ,java-ops4j-base-io)
8658 ("store" ,java-ops4j-base-store)
8659 ("slf4j" ,java-slf4j-api)
8660 ("libg" ,java-aqute-libg)
8661 ("bndlib" ,java-aqute-bndlib)))
8662 (native-inputs
8663 `(("junit" ,java-junit)
8664 ("hamcrest" ,java-hamcrest-core)
8665 ("log4j" ,java-log4j-api)
8666 ("bndannotation" ,java-aqute-bnd-annotation)
8667 ("framework" ,java-osgi-framework)))
8668 (build-system ant-build-system)
8669 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8670 (synopsis "Java APIs to create OSGi related artifacts")
8671 (description "Tinybundles is all about creating OSGi related artifacts like
8672 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8673 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8674 other hand, this library can be a foundation of real end user tools that need
8675 to create those artifacts.")
8676 (license license:asl2.0)))
8677
8678 (define-public java-ops4j-pax-exam-core
8679 (package
8680 (name "java-ops4j-pax-exam-core")
8681 (version "4.11.0")
8682 (source (origin
8683 (method url-fetch)
8684 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8685 "archive/exam-reactor-" version ".tar.gz"))
8686 (sha256
8687 (base32
8688 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8689 (arguments
8690 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8691 #:source-dir "core/pax-exam/src/main/java"
8692 #:test-dir "core/pax-exam/src/test"))
8693 (inputs
8694 `(("slf4j" ,java-slf4j-api)
8695 ("lang" ,java-ops4j-base-lang)
8696 ("io" ,java-ops4j-base-io)
8697 ("util-property" ,java-ops4j-base-util-property)
8698 ("util-store" ,java-ops4j-base-store)
8699 ("java-osgi-core" ,java-osgi-core)))
8700 (native-inputs
8701 `(("junit" ,java-junit)
8702 ("hamcrest" ,java-hamcrest-core)))
8703 (build-system ant-build-system)
8704 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8705 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8706 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8707 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8708 the system under test at the same time.")
8709 (license license:asl2.0)))
8710
8711 (define-public java-ops4j-pax-exam-core-spi
8712 (package
8713 (inherit java-ops4j-pax-exam-core)
8714 (name "java-ops4j-pax-exam-core-spi")
8715 (arguments
8716 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8717 #:source-dir "src/main/java"
8718 #:test-exclude
8719 (list
8720 ;; Abstract base class, not a test
8721 "**/BaseStagedReactorTest.java"
8722 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8723 "**/WarBuilderTest.java")
8724 #:phases
8725 (modify-phases %standard-phases
8726 (add-before 'configure 'chdir
8727 (lambda _
8728 ;; Tests assume we are in this directory
8729 (chdir "core/pax-exam-spi")
8730 #t))
8731 (add-before 'check 'fix-tests
8732 (lambda _
8733 ;; One test checks that this file is present.
8734 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8735 (with-output-to-file
8736 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8737 (lambda _
8738 (display
8739 (string-append "artifactId = pax-exam-spi\n"
8740 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8741 ;; Maven puts compilation results in the target directory, while we
8742 ;; put them in the build directory.
8743 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8744 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8745 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8746 (("target") "build"))
8747 ;; One test is expected to fail, but it doesn't throw the expected exception
8748 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8749 (("AssertionError") "IllegalArgumentException"))
8750 #t)))))
8751 (inputs
8752 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8753 ("lang" ,java-ops4j-base-lang)
8754 ("monitors" ,java-ops4j-base-monitors)
8755 ("store" ,java-ops4j-base-store)
8756 ("io" ,java-ops4j-base-io)
8757 ("spi" ,java-ops4j-base-spi)
8758 ("osgi" ,java-osgi-core)
8759 ("slf4j" ,java-slf4j-api)
8760 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8761 (native-inputs
8762 `(("mockito" ,java-mockito-1)
8763 ("junit" ,java-junit)
8764 ("hamcrest" ,java-hamcrest-core)
8765 ("cglib" ,java-cglib)
8766 ("objenesis" ,java-objenesis)
8767 ("asm" ,java-asm)))))
8768
8769 (define-public java-ops4j-pax-exam-core-junit
8770 (package
8771 (inherit java-ops4j-pax-exam-core)
8772 (name "java-ops4j-pax-exam-core-junit")
8773 (arguments
8774 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8775 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8776 #:tests? #f)); no tests
8777 (inputs
8778 `(("junit" ,java-junit)
8779 ("slf4j" ,java-slf4j-api)
8780 ("core" ,java-ops4j-pax-exam-core)
8781 ("spi" ,java-ops4j-pax-exam-core-spi)))
8782 (native-inputs '())))
8783
8784 (define-public java-fasterxml-jackson-annotations
8785 (package
8786 (name "java-fasterxml-jackson-annotations")
8787 (version "2.9.4")
8788 (source (origin
8789 (method url-fetch)
8790 (uri (string-append "https://github.com/FasterXML/"
8791 "jackson-annotations/archive/"
8792 "jackson-annotations-" version ".tar.gz"))
8793 (sha256
8794 (base32
8795 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8796 (build-system ant-build-system)
8797 (arguments
8798 `(#:jar-name "jackson-annotations.jar"
8799 #:source-dir "src/main/java"
8800 #:test-dir "src/test"))
8801 (native-inputs
8802 `(("junit" ,java-junit)))
8803 (home-page "https://github.com/FasterXML/jackson-annotations")
8804 (synopsis "General purpose annotations for the Jackson Data Processor")
8805 (description "This package contains general purpose annotations for the
8806 Jackson Data Processor, used on value and handler types. The only annotations
8807 not included are ones that require dependency to the Databind package.")
8808 (license license:asl2.0)))
8809
8810 (define-public java-fasterxml-jackson-core
8811 (package
8812 (name "java-fasterxml-jackson-core")
8813 (version "2.9.4")
8814 (source (origin
8815 (method url-fetch)
8816 (uri (string-append "https://github.com/FasterXML/"
8817 "jackson-core/archive/"
8818 "jackson-core-" version ".tar.gz"))
8819 (sha256
8820 (base32
8821 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8822 (build-system ant-build-system)
8823 (arguments
8824 `(#:jar-name "jackson-core.jar"
8825 #:source-dir "src/main/java"
8826 #:test-dir "src/test"
8827 #:test-exclude
8828 (list
8829 ;; Expected failure. pom.xml excludes these
8830 "**/failing/**"
8831 ;; Base classes that have no constructor for junit
8832 "**/BaseTest.java"
8833 "**/ConcurrencyReadTest.java"
8834 "**/ManualCharAccessTest.java"
8835 "**/ManualCharAccessTest.java"
8836 "**/TrailingCommasTest.java"
8837 "**/AsyncMissingValuesInObjectTest.java"
8838 "**/AsyncMissingValuesInArrayTest.java")
8839 #:phases
8840 (modify-phases %standard-phases
8841 (add-before 'configure 'generate-PackageVersion.java
8842 (lambda _
8843 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8844 (in (string-append out ".in")))
8845 (copy-file in out)
8846 (substitute* out
8847 (("@package@") "com.fasterxml.jackson.core.json")
8848 (("@projectversion@") ,version)
8849 (("@projectgroupid@") "com.fasterxml.jackson.core")
8850 (("@projectartifactid@") "jackson-core")))
8851 #t))
8852 (add-before 'build 'copy-resources
8853 (lambda _
8854 (copy-recursively "src/main/resources"
8855 "build/classes")
8856 #t))
8857 (add-before 'check 'copy-test-resources
8858 (lambda _
8859 (copy-recursively "src/test/resources"
8860 "build/test-classes")
8861 #t)))))
8862 (native-inputs
8863 `(("junit" ,java-junit)
8864 ("hamcrest" ,java-hamcrest-core)))
8865 (home-page "https://github.com/FasterXML/jackson-core")
8866 (synopsis "")
8867 (description "")
8868 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8869
8870 (define-public java-fasterxml-jackson-databind
8871 (package
8872 (name "java-fasterxml-jackson-databind")
8873 (version "2.9.4")
8874 (source (origin
8875 (method url-fetch)
8876 (uri (string-append "https://github.com/FasterXML/"
8877 "jackson-databind/archive/"
8878 "jackson-databind-" version ".tar.gz"))
8879 (sha256
8880 (base32
8881 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8882 (build-system ant-build-system)
8883 (arguments
8884 `(#:jar-name "jackson-databind.jar"
8885 #:source-dir "src/main/java"
8886 #:tests? #f; requires javax.measures for which I can't find a free implementation
8887 #:phases
8888 (modify-phases %standard-phases
8889 (add-before 'configure 'generate-PackageVersion.java
8890 (lambda _
8891 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8892 (in (string-append out ".in")))
8893 (copy-file in out)
8894 (substitute* out
8895 (("@package@") "com.fasterxml.jackson.databind.cfg")
8896 (("@projectversion@") ,version)
8897 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8898 (("@projectartifactid@") "jackson-databind")))
8899 #t))
8900 (add-before 'build 'copy-resources
8901 (lambda _
8902 (copy-recursively "src/main/resources" "build/classes")
8903 #t)))))
8904 (inputs
8905 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8906 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8907 (home-page "https://github.com/FasterXML/jackson-databind")
8908 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8909 (description "This package contains the general-purpose data-binding
8910 functionality and tree-model for Jackson Data Processor. It builds on core
8911 streaming parser/generator package, and uses Jackson Annotations for
8912 configuration.")
8913 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8914
8915 (define-public java-fasterxml-jackson-modules-base-jaxb
8916 (package
8917 (name "java-fasterxml-jackson-modules-base-jaxb")
8918 (version "2.9.4")
8919 (source (origin
8920 (method url-fetch)
8921 (uri (string-append "https://github.com/FasterXML/"
8922 "jackson-modules-base/archive/"
8923 "jackson-modules-base-" version ".tar.gz"))
8924 (sha256
8925 (base32
8926 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8927 (build-system ant-build-system)
8928 (arguments
8929 `(#:jar-name "jackson-modules-base-jaxb.jar"
8930 #:source-dir "jaxb/src/main/java"
8931 #:test-dir "jaxb/src/test"
8932 #:test-exclude
8933 ;; Base class for tests
8934 (list "**/BaseJaxbTest.java")
8935 #:phases
8936 (modify-phases %standard-phases
8937 (add-before 'configure 'generate-PackageVersion.java
8938 (lambda _
8939 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8940 "jackson/module/jaxb/PackageVersion.java"))
8941 (in (string-append out ".in")))
8942 (copy-file in out)
8943 (substitute* out
8944 (("@package@") "com.fasterxml.jackson.module.jaxb")
8945 (("@projectversion@") ,version)
8946 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8947 (("@projectartifactid@") "jackson-module-jaxb")))
8948 #t))
8949 (add-before 'build 'copy-resources
8950 (lambda _
8951 (copy-recursively "jaxb/src/main/resources" "build/classes")
8952 #t)))))
8953 (inputs
8954 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8955 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8956 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8957 (native-inputs
8958 `(("java-junit" ,java-junit)))
8959 (home-page "https://github.com/FasterXML/jackson-modules-base")
8960 (synopsis "Jaxb annotations jackson module")
8961 (description "This package is the jaxb annotations module for jackson.")
8962 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8963
8964 (define-public java-fasterxml-jackson-modules-base-mrbean
8965 (package
8966 (name "java-fasterxml-jackson-modules-base-mrbean")
8967 (version "2.9.4")
8968 (source (origin
8969 (method url-fetch)
8970 (uri (string-append "https://github.com/FasterXML/"
8971 "jackson-modules-base/archive/"
8972 "jackson-modules-base-" version ".tar.gz"))
8973 (sha256
8974 (base32
8975 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8976 (build-system ant-build-system)
8977 (arguments
8978 `(#:jar-name "jackson-modules-base-mrbean.jar"
8979 #:source-dir "mrbean/src/main/java"
8980 #:test-dir "mrbean/src/test"
8981 #:test-exclude
8982 ;; Base class for tests
8983 (list "**/BaseTest.java")
8984 #:phases
8985 (modify-phases %standard-phases
8986 (add-before 'configure 'generate-PackageVersion.java
8987 (lambda _
8988 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8989 "jackson/module/mrbean/PackageVersion.java"))
8990 (in (string-append out ".in")))
8991 (copy-file in out)
8992 (substitute* out
8993 (("@package@") "com.fasterxml.jackson.module.mrbean")
8994 (("@projectversion@") ,version)
8995 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8996 (("@projectartifactid@") "jackson-module-mrbean")))
8997 #t)))))
8998 (inputs
8999 `(("java-asm" ,java-asm)
9000 ("java-fasterxml-jackson-annotations"
9001 ,java-fasterxml-jackson-annotations)
9002 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9003 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9004 (native-inputs
9005 `(("java-junit" ,java-junit)))
9006 (home-page "https://github.com/FasterXML/jackson-modules-base")
9007 (synopsis "POJO type materialization for Java")
9008 (description "This package implements POJO type materialization.
9009 Databinders can construct implementation classes for Java interfaces as part
9010 of deserialization.")
9011 (license license:asl2.0)))
9012
9013 (define-public java-snakeyaml
9014 (package
9015 (name "java-snakeyaml")
9016 (version "1.18")
9017 (source (origin
9018 (method url-fetch)
9019 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9020 version ".tar.gz"))
9021 (file-name (string-append name "-" version ".tar.gz"))
9022 (sha256
9023 (base32
9024 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9025 (build-system ant-build-system)
9026 (arguments
9027 `(#:jar-name "java-snakeyaml.jar"
9028 #:source-dir "src/main/java"
9029 ;; Tests require velocity, a cyclic dependency, and
9030 ;; java-spring-framework-context which is not packaged.
9031 #:tests? #f))
9032 (home-page "https://bitbucket.org/asomov/snakeyaml")
9033 (synopsis "YAML processor")
9034 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9035 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9036
9037 (define-public java-fasterxml-jackson-dataformat-yaml
9038 (package
9039 (name "java-fasterxml-jackson-dataformat-yaml")
9040 (version "2.9.4")
9041 (source (origin
9042 (method url-fetch)
9043 (uri (string-append "https://github.com/FasterXML/"
9044 "jackson-dataformats-text/archive/"
9045 "jackson-dataformats-text-" version ".tar.gz"))
9046 (sha256
9047 (base32
9048 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9049 (build-system ant-build-system)
9050 (arguments
9051 `(#:jar-name "jackson-dataformat-yaml.jar"
9052 #:source-dir "yaml/src/main/java"
9053 #:test-dir "yaml/src/test"
9054 #:test-exclude (list "**/failing/**.java")
9055 #:phases
9056 (modify-phases %standard-phases
9057 (add-before 'configure 'generate-PackageVersion.java
9058 (lambda _
9059 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9060 (in (string-append out ".in")))
9061 (copy-file in out)
9062 (substitute* out
9063 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9064 (("@projectversion@") ,version)
9065 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9066 (("@projectartifactid@") "jackson-dataformat-yaml")))
9067 #t)))))
9068 (inputs
9069 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9070 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9071 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9072 ("java-snakeyaml" ,java-snakeyaml)))
9073 (native-inputs
9074 `(("junit" ,java-junit)
9075 ("hamcrest" ,java-hamcrest-core)
9076 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9077 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9078 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9079 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9080 (synopsis "Yaml backend for Jackson")
9081 (description "Dataformat backends are used to support format alternatives
9082 to JSON, supported by default. This is done by sub-classing Jackson core
9083 abstractions.")
9084 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9085
9086 (define-public java-stax2-api
9087 (package
9088 (name "java-stax2-api")
9089 (version "4.0.0")
9090 (source (origin
9091 (method url-fetch)
9092 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9093 "stax2-api-" version ".tar.gz"))
9094 (sha256
9095 (base32
9096 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9097 (build-system ant-build-system)
9098 (arguments
9099 `(#:jar-name "java-stax2-api.jar"
9100 #:source-dir "src/main/java"
9101 #:tests? #f)); no tests
9102 (home-page "https://github.com/FasterXML/stax2-api")
9103 (synopsis "Stax2 API")
9104 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9105 significant new functionalities, such as full-featured bi-direction validation
9106 interface and high-performance Typed Access API.")
9107 (license license:bsd-2)))
9108
9109 (define-public java-woodstox-core
9110 (package
9111 (name "java-woodstox-core")
9112 (version "5.0.3")
9113 (source (origin
9114 (method url-fetch)
9115 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9116 "woodstox-core-" version ".tar.gz"))
9117 (sha256
9118 (base32
9119 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9120 (build-system ant-build-system)
9121 (arguments
9122 `(#:jar-name "woodstox.jar"
9123 #:test-exclude
9124 (list "**/Base*.java" "failing/**")
9125 #:phases
9126 (modify-phases %standard-phases
9127 (add-before 'build 'remove-msv-dep
9128 (lambda _
9129 ;; we don't need osgi, and it depends on msv
9130 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9131 ;; msv's latest release is from 2011 and we don't need it
9132 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9133 (delete-file-recursively "src/test/java/wstxtest/osgi")
9134 (delete-file-recursively "src/test/java/wstxtest/msv")
9135 #t))
9136 (add-before 'build 'copy-resources
9137 (lambda _
9138 (copy-recursively "src/main/resources" "build/classes")
9139 #t)))))
9140 (inputs
9141 `(("stax2" ,java-stax2-api)))
9142 (native-inputs
9143 `(("junit" ,java-junit)))
9144 (home-page "https://github.com/FasterXML/woodstox")
9145 (synopsis "Stax XML API implementation")
9146 (description "Woodstox is a stax XML API implementation.")
9147 (license license:asl2.0)))
9148
9149 (define-public java-fasterxml-jackson-dataformat-xml
9150 (package
9151 (name "java-fasterxml-jackson-dataformat-xml")
9152 (version "2.9.4")
9153 (source (origin
9154 (method url-fetch)
9155 (uri (string-append "https://github.com/FasterXML/"
9156 "jackson-dataformat-xml/archive/"
9157 "jackson-dataformat-xml-" version ".tar.gz"))
9158 (sha256
9159 (base32
9160 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
9161 (build-system ant-build-system)
9162 (arguments
9163 `(#:jar-name "jackson-dataformat-xml.jar"
9164 #:source-dir "src/main/java"
9165 #:test-exclude
9166 (list "**/failing/**")
9167 #:phases
9168 (modify-phases %standard-phases
9169 (add-before 'configure 'generate-PackageVersion.java
9170 (lambda _
9171 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9172 (in (string-append out ".in")))
9173 (copy-file in out)
9174 (newline)
9175 (substitute* out
9176 (("@package@") "com.fasterxml.jackson.dataformat.xml")
9177 (("@projectversion@") ,version)
9178 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
9179 (("@projectartifactid@") "jackson-dataformat-xml")))
9180 #t))
9181 (add-before 'build 'copy-resources
9182 (lambda _
9183 (copy-recursively "src/main/resources" "build/classes")
9184 #t)))))
9185 (inputs
9186 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
9187 ("jackson-core" ,java-fasterxml-jackson-core)
9188 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
9189 ("jackson-databind" ,java-fasterxml-jackson-databind)
9190 ("stax2-api" ,java-stax2-api)
9191 ("woodstox" ,java-woodstox-core)))
9192 (native-inputs
9193 `(("junit" ,java-junit)
9194 ("hamcrest" ,java-hamcrest-core)))
9195 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
9196 (synopsis "Read and write XML")
9197 (description "This package contains Jackson extension component for reading
9198 and writing XML encoded data.
9199
9200 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
9201 approach (that is, no support is added for \"Schema-first\" approach). Support
9202 for JAXB annotations is provided by JAXB annotation module; this module
9203 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
9204 @code{JsonFactory}) as well as small number of higher level overrides needed to
9205 make data-binding work.")
9206 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9207
9208 (define-public java-hdrhistogram
9209 (package
9210 (name "java-hdrhistogram")
9211 (version "2.1.9")
9212 (source (origin
9213 (method url-fetch)
9214 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
9215 "archive/HdrHistogram-" version ".tar.gz"))
9216 (sha256
9217 (base32
9218 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
9219 (build-system ant-build-system)
9220 (arguments
9221 `(#:jar-name "java-hdrhistogram.jar"
9222 #:source-dir "src/main/java"
9223 #:phases
9224 (modify-phases %standard-phases
9225 (add-before 'configure 'set-version
9226 (lambda _
9227 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
9228 (template (string-append version-java ".template")))
9229 (copy-file template version-java)
9230 (substitute* version-java
9231 (("\\$VERSION\\$") ,version)
9232 (("\\$BUILD_TIME\\$") "0"))
9233 #t))))))
9234 (native-inputs
9235 `(("junit" ,java-junit)
9236 ("hamcrest" ,java-hamcrest-core)))
9237 (home-page "https://hdrhistogram.github.io/HdrHistogram")
9238 (synopsis "High dynamic range histogram")
9239 (description "Hdrhistogram creates histograms that support
9240 recording and analyzing sampled data value counts across a configurable integer
9241 value range with configurable value precision within the range. Value precision
9242 is expressed as the number of significant digits in the value recording, and
9243 provides control over value quantization behavior across the value range and
9244 the subsequent value resolution at any given level.")
9245 (license license:public-domain)))
9246
9247 (define-public java-cofoja
9248 (package
9249 (name "java-cofoja")
9250 (version "1.3")
9251 (source (origin
9252 (method git-fetch)
9253 (uri (git-reference
9254 (url "https://github.com/nhatminhle/cofoja")
9255 (commit (string-append "v" version))))
9256 (file-name (string-append "java-cofoja-" version "-checkout"))
9257 (sha256
9258 (base32
9259 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
9260 (build-system ant-build-system)
9261 (arguments
9262 `(#:build-target "dist"
9263 #:test-target "test"
9264 #:jdk ,icedtea-8
9265 #:make-flags
9266 (list "-Ddist.dir=dist")
9267 #:modules ((guix build ant-build-system)
9268 (guix build java-utils)
9269 (guix build utils)
9270 (srfi srfi-1)
9271 (ice-9 match))
9272 #:phases
9273 (modify-phases %standard-phases
9274 ;; The bulid system ignores the class path the ant-build-system sets
9275 ;; up and instead expects to find all dependencies in the "lib"
9276 ;; directory.
9277 (add-after 'unpack 'create-libdir
9278 (lambda* (#:key inputs #:allow-other-keys)
9279 (mkdir-p "lib")
9280 (for-each
9281 (lambda (file)
9282 (let ((target (string-append "lib/" (basename file))))
9283 (unless (file-exists? target)
9284 (symlink file target))))
9285 (append-map (match-lambda
9286 ((label . dir)
9287 (find-files dir "\\.jar$")))
9288 inputs))
9289 #t))
9290 (replace 'install (install-jars "dist")))))
9291 (inputs
9292 `(("java-asm" ,java-asm)))
9293 (native-inputs
9294 `(("java-junit" ,java-junit)))
9295 (home-page "https://github.com/nhatminhle/cofoja")
9296 (synopsis "Contracts for Java")
9297 (description "Contracts for Java, or Cofoja for short, is a contract
9298 programming framework and test tool for Java, which uses annotation processing
9299 and bytecode instrumentation to provide run-time checking. (In particular,
9300 this is not a static analysis tool.)")
9301 (license license:lgpl3+)))
9302
9303 (define-public java-aopalliance
9304 (package
9305 (name "java-aopalliance")
9306 (version "1.0")
9307 (source (origin
9308 (method git-fetch)
9309 ;; Note: this git repository is not official, but contains the
9310 ;; source code that is in the CVS repository. Downloading the
9311 ;; tarball from sourceforge is undeterministic, and the cvs download
9312 ;; fails.
9313 (uri (git-reference
9314 (url "https://github.com/hoverruan/aopalliance")
9315 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
9316 (file-name (string-append name "-" version))
9317 (sha256
9318 (base32
9319 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
9320 (build-system ant-build-system)
9321 (arguments
9322 `(#:jar-name "java-aopalliance.jar"
9323 #:jdk ,icedtea-8
9324 #:tests? #f; no tests
9325 #:source-dir "aopalliance/src/main"
9326 #:modules ((guix build ant-build-system)
9327 (guix build utils)
9328 (guix build maven pom)
9329 (guix build java-utils)
9330 (sxml simple))
9331 #:phases
9332 (modify-phases %standard-phases
9333 (add-before 'install 'create-pom
9334 (lambda _
9335 (with-output-to-file "pom.xml"
9336 (lambda _
9337 (sxml->xml
9338 `((project
9339 (modelVersion "4.0.0")
9340 (name "aopalliance")
9341 (groupId "aopalliance")
9342 (artifactId "aopalliance")
9343 (version "1.0"))))))
9344 #t))
9345 (replace 'install
9346 (install-from-pom "pom.xml")))))
9347 (home-page "http://aopalliance.sourceforge.net")
9348 (synopsis "Aspect-Oriented Programming")
9349 (description "The AOP Alliance project is a joint project between several
9350 software engineering people who are interested in Aspect-Oriented Programming
9351 (AOP) and Java.")
9352 (license license:public-domain)))
9353
9354 (define-public java-javax-inject
9355 (package
9356 (name "java-javax-inject")
9357 (version "1")
9358 (source (origin
9359 (method git-fetch)
9360 (uri (git-reference
9361 (url "https://github.com/javax-inject/javax-inject")
9362 (commit version)))
9363 (file-name (git-file-name name version))
9364 (sha256
9365 (base32
9366 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
9367 (build-system ant-build-system)
9368 (arguments
9369 `(#:jar-name "java-javax-inject.jar"
9370 #:tests? #f; no tests
9371 #:phases
9372 (modify-phases %standard-phases
9373 (replace 'install
9374 (install-from-pom "pom.xml")))))
9375 (home-page "https://github.com/javax-inject/javax-inject")
9376 (synopsis "JSR-330: Dependency Injection for Java")
9377 (description "This package specifies a means for obtaining objects in such
9378 a way as to maximize reusability, testability and maintainability compared to
9379 traditional approaches such as constructors, factories, and service locators
9380 (e.g., JNDI). This process, known as dependency injection, is beneficial to
9381 most nontrivial applications.
9382
9383 Many types depend on other types. For example, a @var{Stopwatch} might depend
9384 on a @var{TimeSource}. The types on which a type depends are known as its
9385 dependencies. The process of finding an instance of a dependency to use at run
9386 time is known as resolving the dependency. If no such instance can be found,
9387 the dependency is said to be unsatisfied, and the application is broken.")
9388 (license license:asl2.0)))
9389
9390 (define-public java-guice
9391 (package
9392 (name "java-guice")
9393 (version "4.1")
9394 (source (origin
9395 (method git-fetch)
9396 (uri (git-reference
9397 (url "https://github.com/google/guice")
9398 (commit version)))
9399 (file-name (git-file-name name version))
9400 (modules '((guix build utils)))
9401 (snippet
9402 `(begin
9403 (for-each delete-file (find-files "." ".*.jar")) #t))
9404 (sha256
9405 (base32
9406 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
9407 (build-system ant-build-system)
9408 (arguments
9409 `(#:jar-name "java-guice.jar"
9410 #:jdk ,icedtea-8
9411 #:tests? #f; FIXME: tests are not in a java sub directory
9412 #:source-dir "core/src"
9413 #:phases
9414 (modify-phases %standard-phases
9415 (add-after 'unpack 'make-files-writable
9416 (lambda _
9417 (for-each make-file-writable (find-files "."))
9418 #t))
9419 (replace 'install
9420 (install-from-pom "core/pom.xml")))))
9421 (propagated-inputs
9422 `(("java-aopalliance" ,java-aopalliance)
9423 ("java-asm" ,java-asm)
9424 ("java-cglib" ,java-cglib)
9425 ("java-guava" ,java-guava)
9426 ("java-javax-inject" ,java-javax-inject)
9427 ("java-guice-parent-pom" ,java-guice-parent-pom)))
9428 (home-page "https://github.com/google/guice")
9429 (synopsis "Lightweight dependency injection framework")
9430 (description "Guice is a lightweight dependency injection framework for
9431 Java 6 and above.")
9432 (license license:asl2.0)))
9433
9434 (define-public java-guice-servlet
9435 (package
9436 (inherit java-guice)
9437 (name "java-guice-servlet")
9438 (arguments
9439 `(#:jar-name "guice-servlet.jar"
9440 #:source-dir "extensions/servlet/src/"
9441 #:jdk ,icedtea-8
9442 #:tests? #f ; FIXME: not in a java subdir
9443 #:phases
9444 (modify-phases %standard-phases
9445 (add-after 'unpack 'make-files-writable
9446 (lambda _
9447 (for-each make-file-writable (find-files "."))
9448 #t)))))
9449 (inputs
9450 `(("guice" ,java-guice)
9451 ("servlet" ,java-classpathx-servletapi)
9452 ,@(package-inputs java-guice)))))
9453
9454 (define java-guice-parent-pom
9455 (package
9456 (inherit java-guice)
9457 (name "java-guice-parent-pom")
9458 (arguments
9459 `(#:tests? #f
9460 #:phases
9461 (modify-phases %standard-phases
9462 (delete 'configure)
9463 (delete 'build)
9464 (add-after 'install 'install-extensions
9465 (install-pom-file "extensions/pom.xml"))
9466 (replace 'install
9467 (install-pom-file "pom.xml")))))
9468 (propagated-inputs
9469 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
9470
9471 (define java-google-parent-pom-5
9472 (package
9473 (name "java-google-parent-pom")
9474 (version "5")
9475 (source (origin
9476 (method git-fetch)
9477 (uri (git-reference
9478 (url "https://github.com/google/google-maven-parents")
9479 (commit (string-append "google-" version))))
9480 (file-name (git-file-name name version))
9481 (sha256
9482 (base32
9483 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
9484 (build-system ant-build-system)
9485 (arguments
9486 `(#:tests? #f
9487 #:phases
9488 (modify-phases %standard-phases
9489 (delete 'configure)
9490 (delete 'build)
9491 (replace 'install
9492 (install-pom-file "pom.xml")))))
9493 (home-page "https://github.com/google/google-maven-parents")
9494 (synopsis "Google parent pom")
9495 (description "This package contains the Maven parent POM for other Google
9496 Java projects.")
9497 (license license:asl2.0)))
9498
9499 (define-public java-assertj
9500 (package
9501 (name "java-assertj")
9502 (version "3.8.0")
9503 (source (origin
9504 (method git-fetch)
9505 (uri (git-reference
9506 (url "https://github.com/joel-costigliola/assertj-core")
9507 (commit (string-append "assertj-core-" version))))
9508 (file-name (git-file-name name version))
9509 (sha256
9510 (base32
9511 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
9512 (build-system ant-build-system)
9513 (arguments
9514 `(#:jar-name "java-assertj.jar"
9515 #:jdk ,icedtea-8
9516 #:source-dir "src/main/java"
9517 #:tests? #f)); depends on tng-junit which depends on assertj
9518 (inputs
9519 `(("cglib" ,java-cglib)
9520 ("junit" ,java-junit)
9521 ("hamcrest" ,java-hamcrest-core)))
9522 (native-inputs
9523 `(("mockito" ,java-mockito-1)))
9524 (home-page "https://joel-costigliola.github.io/assertj/index.html")
9525 (synopsis "Fluent assertions for java")
9526 (description "AssertJ core is a Java library that provides a fluent
9527 interface for writing assertions. Its main goal is to improve test code
9528 readability and make maintenance of tests easier.")
9529 (license license:asl2.0)))
9530
9531 (define-public java-jboss-javassist
9532 (package
9533 (name "java-jboss-javassist")
9534 (version "3.21.0")
9535 (source (origin
9536 (method git-fetch)
9537 (uri (git-reference
9538 (url "https://github.com/jboss-javassist/javassist")
9539 (commit
9540 (string-append "rel_"
9541 (string-map
9542 (lambda (x) (if (eq? x #\.) #\_ x)) version)
9543 "_ga"))))
9544 (file-name (git-file-name name version))
9545 (sha256
9546 (base32
9547 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
9548 (modules '((guix build utils)))
9549 (snippet
9550 '(begin
9551 (delete-file "javassist.jar")))))
9552 (build-system ant-build-system)
9553 (arguments
9554 `(#:jar-name "java-jboss-javassist.jar"
9555 #:jdk ,icedtea-8
9556 #:source-dir "src/main"
9557 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
9558 #:phases
9559 (modify-phases %standard-phases
9560 (add-after 'unpack 'make-files-writable
9561 (lambda _
9562 (for-each make-file-writable (find-files "."))
9563 #t)))))
9564 (native-inputs
9565 `(("junit" ,java-junit)))
9566 (home-page "https://github.com/jboss-javassist/javassist")
9567 (synopsis "Java bytecode engineering toolkit")
9568 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9569 manipulation simple. It is a class library for editing bytecodes in Java; it
9570 enables Java programs to define a new class at runtime and to modify a class
9571 file when the JVM loads it.")
9572 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
9573
9574 (define-public java-jcommander
9575 (package
9576 (name "java-jcommander")
9577 (version "1.71")
9578 (source (origin
9579 (method git-fetch)
9580 (uri (git-reference
9581 (url "https://github.com/cbeust/jcommander")
9582 (commit version)))
9583 (file-name (git-file-name name version))
9584 (sha256
9585 (base32
9586 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
9587 (build-system ant-build-system)
9588 (arguments
9589 `(#:jar-name "java-jcommander.jar"
9590 #:jdk ,icedtea-8
9591 #:tests? #f; requires testng which depends on jcommander
9592 #:source-dir "src/main/java"))
9593 (home-page "https://jcommander.org")
9594 (synopsis "Command line parameters parser")
9595 (description "JCommander is a very small Java framework that makes it
9596 trivial to parse command line parameters. Parameters are declared with
9597 annotations.")
9598 (license license:asl2.0)))
9599
9600 (define-public java-bsh
9601 (package
9602 (name "java-bsh")
9603 (version "2.0b6")
9604 (source (origin
9605 (method git-fetch)
9606 (uri (git-reference
9607 (url "https://github.com/beanshell/beanshell")
9608 (commit version)))
9609 (file-name (git-file-name name version))
9610 (sha256
9611 (base32
9612 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
9613 (modules '((guix build utils)))
9614 (snippet
9615 '(begin
9616 ;; Delete bundled third-party jar archives.
9617 (for-each delete-file (find-files "." ".*.jar$"))
9618 (for-each (lambda (file) (chmod file #o644))
9619 (find-files "." "."))
9620 #t))))
9621 (build-system ant-build-system)
9622 (arguments
9623 `(#:build-target "jarall"
9624 #:test-target "junit-tests-all"
9625 #:phases
9626 (modify-phases %standard-phases
9627 (add-before 'install 'fix-pom
9628 (lambda _
9629 (substitute* "pom.xml"
9630 (("org.apache-extras.beanshell") "org.beanshell"))
9631 #t))
9632 (replace 'install
9633 (install-from-pom "pom.xml")))))
9634 (inputs
9635 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
9636 ("java-commons-bsf" ,java-commons-bsf)))
9637 (native-inputs
9638 `(("java-junit" ,java-junit)
9639 ("javacc" ,javacc-3)))
9640 (home-page "http://beanshell.org/")
9641 (synopsis "Lightweight Scripting for Java")
9642 (description "BeanShell is a small, free, embeddable Java source
9643 interpreter with object scripting language features, written in Java.
9644 BeanShell dynamically executes standard Java syntax and extends it with common
9645 scripting conveniences such as loose types, commands, and method closures like
9646 those in Perl and JavaScript.")
9647 (license license:asl2.0)))
9648
9649 (define-public java-fest-util
9650 (package
9651 (name "java-fest-util")
9652 (version "1.2.5")
9653 (source (origin
9654 (method git-fetch)
9655 (uri (git-reference
9656 (url "https://github.com/alexruiz/fest-util/")
9657 (commit (string-append "fest-util-" version))))
9658 (file-name (git-file-name name version))
9659 (sha256
9660 (base32
9661 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
9662 (build-system ant-build-system)
9663 (arguments
9664 `(#:jar-name "java-fest-util.jar"
9665 #:source-dir "src/main/java"))
9666 (native-inputs
9667 `(("junit" ,java-junit)
9668 ("hamcrest" ,java-hamcrest-core)))
9669 (home-page "https://github.com/alexruiz/fest-util")
9670 (synopsis "FEST common utilities")
9671 (description "Common utilities used in all FEST module.")
9672 (license license:asl2.0)))
9673
9674 (define-public java-fest-test
9675 (package
9676 (name "java-fest-test")
9677 (version "2.1.0")
9678 (source (origin
9679 (method git-fetch)
9680 (uri (git-reference
9681 (url "https://github.com/alexruiz/fest-test/")
9682 (commit (string-append "fest-test-" version))))
9683 (file-name (git-file-name name version))
9684 (sha256
9685 (base32
9686 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
9687 (build-system ant-build-system)
9688 (arguments
9689 `(#:jar-name "java-fest-test.jar"
9690 #:source-dir "src/main/java"
9691 #:tests? #f)); no tests
9692 (inputs
9693 `(("junit" ,java-junit)))
9694 (home-page "https://github.com/alexruiz/fest-test")
9695 (synopsis "Common FEST testing infrastructure")
9696 (description "Fest-test contains the common FEST testing infrastructure.")
9697 (license license:asl2.0)))
9698
9699 (define-public java-fest-assert
9700 (package
9701 (name "java-fest-assert")
9702 (version "2.0M10")
9703 (source (origin
9704 (method git-fetch)
9705 (uri (git-reference
9706 (url "https://github.com/alexruiz/fest-assert-2.x/")
9707 (commit (string-append "fest-assert-core-" version))))
9708 (file-name (git-file-name name version))
9709 (sha256
9710 (base32
9711 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
9712 (build-system ant-build-system)
9713 (arguments
9714 `(#:jar-name "java-fest-assert.jar"
9715 #:source-dir "src/main/java"
9716 #:test-exclude
9717 (list
9718 "**/Abstract*.java"
9719 "**/*BaseTest.java"
9720 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9721 "**/MessageFormatter_format_Test.java"
9722 "**/internal/*/*_assert*_Test.java")))
9723 (inputs
9724 `(("java-fest-util" ,java-fest-util)))
9725 (native-inputs
9726 `(("java-junit" ,java-junit)
9727 ("java-fest-test" ,java-fest-test)
9728 ("java-hamcrest-core" ,java-hamcrest-core)
9729 ("java-mockito" ,java-mockito-1)
9730 ("java-cglib" ,java-cglib)
9731 ("java-objenesis" ,java-objenesis)
9732 ("java-asm" ,java-asm)))
9733 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9734 (synopsis "FEST fluent assertions")
9735 (description "FEST-Assert provides a fluent interface for assertions.")
9736 (license license:asl2.0)))
9737
9738 (define-public java-testng
9739 (package
9740 (name "java-testng")
9741 (version "6.14.3")
9742 (source (origin
9743 (method git-fetch)
9744 (uri (git-reference
9745 (url "https://github.com/cbeust/testng")
9746 (commit version)))
9747 (file-name (string-append name "-" version "-checkout"))
9748 (sha256
9749 (base32
9750 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
9751 (build-system ant-build-system)
9752 (arguments
9753 `(#:jdk ,icedtea-8; java.util.function
9754 #:jar-name "java-testng.jar"
9755 #:source-dir "src/main/java"
9756 #:phases
9757 (modify-phases %standard-phases
9758 ;; FIXME: I don't know why these tests fail
9759 (add-after 'unpack 'delete-failing-tests
9760 (lambda _
9761 (substitute* "src/test/resources/testng.xml"
9762 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9763 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9764 #t))
9765 ;; We don't have groovy
9766 (add-after 'unpack 'delete-groovy-tests
9767 (lambda _
9768 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9769 (substitute* "src/test/resources/testng.xml"
9770 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9771 #t))
9772 (add-before 'build 'copy-resources
9773 (lambda _
9774 (copy-recursively "src/main/resources" "build/classes")
9775 #t))
9776 (add-before 'check 'copy-test-resources
9777 (lambda _
9778 (copy-recursively "src/test/resources" "build/test-classes")
9779 #t))
9780 (replace 'check
9781 (lambda _
9782 (invoke "ant" "compile-tests")
9783 ;; we don't have groovy
9784 (substitute* "src/test/resources/testng.xml"
9785 (("<class name=\"test.groovy.GroovyTest\" />") ""))
9786 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9787 ":build/classes"
9788 ":build/test-classes")
9789 "-Dtest.resources.dir=src/test/resources"
9790 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
9791 (propagated-inputs
9792 `(("junit" ,java-junit)
9793 ("java-jsr305" ,java-jsr305)
9794 ("java-bsh" ,java-bsh)
9795 ("java-jcommander" ,java-jcommander)
9796 ("java-guice" ,java-guice)
9797 ("snakeyaml" ,java-snakeyaml)))
9798 (native-inputs
9799 `(("guava" ,java-guava)
9800 ("java-javax-inject" ,java-javax-inject)
9801 ("java-hamcrest" ,java-hamcrest-all)
9802 ("java-assertj" ,java-assertj)
9803 ("java-mockito" ,java-mockito-1)
9804 ("cglib" ,java-cglib)
9805 ("asm" ,java-asm)
9806 ("aopalliance" ,java-aopalliance)))
9807 (home-page "https://testng.org")
9808 (synopsis "Testing framework")
9809 (description "TestNG is a testing framework inspired from JUnit and NUnit
9810 but introducing some new functionalities that make it more powerful and easier
9811 to use.")
9812 (license license:asl2.0)))
9813
9814 (define-public java-jnacl
9815 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9816 (revision "2"))
9817 (package
9818 (name "java-jnacl")
9819 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9820 (source (origin
9821 (method git-fetch)
9822 (uri (git-reference
9823 (url "https://github.com/neilalexander/jnacl")
9824 (commit commit)))
9825 (file-name (git-file-name name version))
9826 (sha256
9827 (base32
9828 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9829 (build-system ant-build-system)
9830 (arguments
9831 `(#:jar-name "jnacl.jar"
9832 #:source-dir "src/main/java"
9833 #:jdk ,icedtea-8
9834 #:phases
9835 (modify-phases %standard-phases
9836 (add-before 'build 'fix-tests
9837 (lambda _
9838 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9839 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9840 (("assertions.Assertions") "assertions.api.Assertions"))
9841 #t))
9842 (replace 'check
9843 (lambda _
9844 (invoke "ant" "compile-tests")
9845 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9846 ":build/classes"
9847 ":build/test-classes")
9848 "org.testng.TestNG" "-testclass"
9849 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9850 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9851 ":build/classes"
9852 ":build/test-classes")
9853 "org.testng.TestNG" "-testclass"
9854 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9855 (native-inputs
9856 `(("java-testng" ,java-testng)
9857 ("java-fest-util" ,java-fest-util)
9858 ("java-fest-assert" ,java-fest-assert)))
9859 (home-page "https://github.com/neilalexander/jnacl")
9860 (synopsis "Java implementation of NaCl")
9861 (description "Pure Java implementation of the NaCl: Networking and
9862 Cryptography library.")
9863 (license license:bsd-2))))
9864
9865 (define-public java-mvel2
9866 (package
9867 (name "java-mvel2")
9868 (version "2.3.1")
9869 (source (origin
9870 (method url-fetch)
9871 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9872 version ".Final.tar.gz"))
9873 (sha256
9874 (base32
9875 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9876 (build-system ant-build-system)
9877 (arguments
9878 `(#:jar-name "mvel2.jar"
9879 #:source-dir "src/main/java"
9880 #:test-exclude
9881 (list "**/Abstract*.java"
9882 ;; Base class with no tests
9883 "**/MVELThreadTest.java")
9884 #:phases
9885 (modify-phases %standard-phases
9886 (add-after 'install 'install-bin
9887 (lambda* (#:key outputs #:allow-other-keys)
9888 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9889 (mkdir-p bin)
9890 (with-output-to-file (string-append bin "/mvel2")
9891 (lambda _
9892 (display
9893 (string-append
9894 "#!" (which "bash") "\n"
9895 "if [ \"$#\" -ne \"2\" ]; then\n"
9896 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9897 "exit\n"
9898 "fi\n"
9899 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9900 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9901 " org.mvel2.sh.Main $1"))))
9902 (chmod (string-append bin "/mvel2") #o755))
9903 #t)))))
9904 (native-inputs
9905 `(("junit" ,java-junit)
9906 ("hamcrest" ,java-hamcrest-core)))
9907 (home-page "https://github.com/mvel/mvel")
9908 (synopsis "MVFLEX Expression Language")
9909 (description "MVEL has largely been inspired by Java syntax, but has some
9910 fundamental differences aimed at making it more efficient as an expression
9911 language, such as operators that directly support collection, array and string
9912 matching, as well as regular expressions. MVEL is used to evaluate expressions
9913 written using Java syntax.
9914
9915 In addition to the expression language, MVEL serves as a templating language for
9916 configuration and string construction.")
9917 (license license:asl2.0)))
9918
9919 (define-public java-commons-jexl-2
9920 (package
9921 (name "java-commons-jexl")
9922 (version "2.1.1")
9923 (source (origin
9924 (method url-fetch)
9925 (uri (string-append "mirror://apache/commons/jexl/source/"
9926 "commons-jexl-" version "-src.tar.gz"))
9927 (sha256
9928 (base32
9929 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9930 (build-system ant-build-system)
9931 (arguments
9932 `(#:jar-name "commons-jexl-2.jar"
9933 #:jdk ,icedtea-8
9934 #:source-dir "src/main/java"
9935 #:phases
9936 (modify-phases %standard-phases
9937 (add-before 'check 'disable-broken-tests
9938 (lambda* (#:key inputs #:allow-other-keys)
9939 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9940 (substitute* "ArithmeticTest.java"
9941 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9942 (("asserter.assertExpression\\(\"imanull") "//"))
9943 ;; This test fails with "ambiguous method invocation"
9944 (delete-file "CacheTest.java")
9945 ;; This test doesn't have access to the temp directory
9946 (substitute* "ClassCreatorTest.java"
9947 (("java.io.tmpdir") "user.dir"))
9948 ;; This test fails in trying to detect whether it can run.
9949 (substitute* "ClassCreator.java"
9950 (("boolean canRun =.*") "boolean canRun = false;\n"))
9951 ;; ...and these tests depend on it.
9952 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9953 (delete-file "scripting/JexlScriptEngineTest.java"))
9954 #t))
9955 (add-before 'build 'run-javacc
9956 (lambda _
9957 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9958 (invoke "java" "jjtree" "Parser.jjt")
9959 (invoke "java" "javacc" "Parser.jj"))
9960 #t)))))
9961 (inputs
9962 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9963 (native-inputs
9964 `(("java-junit" ,java-junit)
9965 ("java-hamcrest-core" ,java-hamcrest-core)
9966 ("javacc" ,javacc-4)))
9967 (home-page "https://commons.apache.org/proper/commons-jexl/")
9968 (synopsis "Java Expression Language ")
9969 (description "JEXL is a library intended to facilitate the implementation
9970 of dynamic and scripting features in applications and frameworks written in
9971 Java. JEXL implements an Expression Language based on some extensions to the
9972 JSTL Expression Language supporting most of the constructs seen in
9973 shell-script or ECMAScript. Its goal is to expose scripting features usable
9974 by technical operatives or consultants working with enterprise platforms.")
9975 (license license:asl2.0)))
9976
9977 (define-public java-lz4
9978 (package
9979 (name "java-lz4")
9980 (version "1.4.0")
9981 (source (origin
9982 (method git-fetch)
9983 (uri (git-reference
9984 (url "https://github.com/lz4/lz4-java")
9985 (commit version)))
9986 (file-name (git-file-name name version))
9987 (sha256
9988 (base32
9989 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
9990 (build-system ant-build-system)
9991 (arguments
9992 `(#:jar-name "lz4.jar"
9993 #:jdk ,icedtea-8
9994 #:source-dir "src/java:src/java-unsafe"
9995 #:tests? #f; FIXME: requires more dependencies
9996 #:phases
9997 (modify-phases %standard-phases
9998 (add-after 'unpack 'make-files-writable
9999 (lambda _
10000 (for-each make-file-writable (find-files "."))
10001 #t))
10002 (add-before 'configure 'generate-source
10003 (lambda _
10004 (with-directory-excursion "src/build/source_templates"
10005 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10006 #t)))))
10007 (native-inputs
10008 `(("mvel" ,java-mvel2)))
10009 (home-page "https://jpountz.github.io/lz4-java")
10010 (synopsis "Compression algorithm")
10011 (description "LZ4 - Java is a Java port of the popular lz4 compression
10012 algorithms and xxHash hashing algorithm.")
10013 (license license:asl2.0)))
10014
10015 (define-public java-bouncycastle
10016 (package
10017 (name "java-bouncycastle")
10018 (version "1.60")
10019 (source (origin
10020 (method git-fetch)
10021 (uri (git-reference
10022 (url "http://git.bouncycastle.org/repositories/bc-java")
10023 ;(url "https://github.com/bcgit/bc-java")
10024 (commit (string-append "r1rv" (substring version 2 4)))))
10025 (file-name (git-file-name name version))
10026 (sha256
10027 (base32
10028 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
10029 (modules '((guix build utils)))
10030 (snippet
10031 '(begin
10032 (for-each delete-file
10033 (find-files "." "\\.jar$"))
10034 #t))))
10035 (build-system ant-build-system)
10036 (arguments
10037 `(#:jdk ,icedtea-8
10038 #:tests? #f
10039 #:phases
10040 (modify-phases %standard-phases
10041 (replace 'build
10042 (lambda _
10043 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10044 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10045 ;; FIXME: the tests freeze.
10046 ;; (replace 'check
10047 ;; (lambda _
10048 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10049 (replace 'install
10050 (install-jars "build/artifacts/jdk1.5/jars")))))
10051 (inputs
10052 `(("java-javax-mail" ,java-javax-mail)))
10053 (native-inputs
10054 `(("unzip" ,unzip)
10055 ("junit" ,java-junit)
10056 ("java-native-access" ,java-native-access)
10057 ("java-native-access-platform" ,java-native-access-platform)))
10058 (home-page "https://www.bouncycastle.org")
10059 (synopsis "Cryptographic library")
10060 (description "Bouncy Castle is a cryptographic library for the Java
10061 programming language.")
10062 (license license:expat)))
10063
10064 (define-public java-lmax-disruptor
10065 (package
10066 (name "java-lmax-disruptor")
10067 (version "3.3.7")
10068 (source (origin
10069 (method url-fetch)
10070 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10071 "archive/" version ".tar.gz"))
10072 (file-name (string-append name "-" version ".tar.gz"))
10073 (sha256
10074 (base32
10075 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10076 (build-system ant-build-system)
10077 (arguments
10078 `(#:jar-name "java-lmax-disruptor.jar"
10079 #:jdk ,icedtea-8
10080 #:tests? #f)); tests hang
10081 (inputs
10082 `(("junit" ,java-junit)
10083 ("java-hdrhistogram" ,java-hdrhistogram)
10084 ("java-jmock" ,java-jmock)
10085 ("java-jmock-legacy" ,java-jmock-legacy)
10086 ("java-jmock-junit4" ,java-jmock-junit4)
10087 ("java-hamcrest-all" ,java-hamcrest-all)))
10088 (native-inputs
10089 `(("cglib" ,java-cglib)
10090 ("objenesis" ,java-objenesis)
10091 ("asm" ,java-asm)))
10092 (home-page "https://www.lmax.com/disruptor")
10093 (synopsis "High performance inter-thread communication")
10094 (description "LMAX Disruptor is a software pattern and software component
10095 for high performance inter-thread communication that avoids the need for
10096 message queues or resource locking.")
10097 (license license:asl2.0)))
10098
10099 (define-public java-commons-bcel
10100 (package
10101 (name "java-commons-bcel")
10102 (version "6.1")
10103 (source (origin
10104 (method url-fetch)
10105 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10106 version "-src.tar.gz"))
10107 (sha256
10108 (base32
10109 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10110 (build-system ant-build-system)
10111 (arguments
10112 `(#:jar-name "bcel.jar"
10113 #:jdk ,icedtea-8
10114 #:source-dir "src/main/java"
10115 #:test-dir "src/test/java"
10116 ;; FIXME: Tests require the unpackaged jna.
10117 #:tests? #f))
10118 (home-page "https://commons.apache.org/proper/commons-bcel/")
10119 (synopsis "Byte code engineering library")
10120 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10121 intended to give users a convenient way to analyze, create, and
10122 manipulate (binary) Java class files. Classes are represented by objects
10123 which contain all the symbolic information of the given class: methods, fields
10124 and byte code instructions, in particular.
10125
10126 Such objects can be read from an existing file, be transformed by a
10127 program (e.g. a class loader at run-time) and written to a file again. An
10128 even more interesting application is the creation of classes from scratch at
10129 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10130 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10131 of Java @code{.class} files.")
10132 (license license:asl2.0)))
10133
10134 (define-public java-xerial-core
10135 (package
10136 (name "java-xerial-core")
10137 (version "2.1")
10138 (source (origin
10139 (method url-fetch)
10140 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10141 version ".tar.gz"))
10142 (file-name (string-append name "-" version ".tar.gz"))
10143 (sha256
10144 (base32
10145 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10146 (build-system ant-build-system)
10147 (arguments
10148 `(#:jar-name "xerial-core.jar"
10149 #:source-dir "xerial-core/src/main/java"
10150 #:test-dir "xerial-core/src/test"
10151 #:phases
10152 (modify-phases %standard-phases
10153 (add-before 'build 'copy-resources
10154 (lambda _
10155 (copy-recursively "xerial-core/src/main/resources"
10156 "build/classes")
10157 #t)))))
10158 (native-inputs
10159 `(("junit" ,java-junit)
10160 ("hamcrest" ,java-hamcrest-core)))
10161 (home-page "https://github.com/xerial/xerial-java")
10162 (synopsis "Data management libraries for Java")
10163 (description "Xerial is a set of data management libraries for the Java
10164 programming language. The ultimate goal of the Xerial project is to manage
10165 everything as database, including class objects, text format data, data
10166 streams, etc.")
10167 (license license:asl2.0)))
10168
10169 (define-public java-powermock-reflect
10170 (package
10171 (name "java-powermock-reflect")
10172 (version "1.7.3")
10173 (source (origin
10174 (method url-fetch)
10175 (uri (string-append "https://github.com/powermock/powermock/"
10176 "archive/powermock-" version ".tar.gz"))
10177 (file-name (string-append name "-" version ".tar.gz"))
10178 (sha256
10179 (base32
10180 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
10181 (patches
10182 (search-patches "java-powermock-fix-java-files.patch"))))
10183 (build-system ant-build-system)
10184 (arguments
10185 `(#:jar-name "java-powermock-reflect.jar"
10186 #:jdk ,icedtea-8
10187 #:source-dir "powermock-reflect/src/main/java"
10188 #:test-dir "powermock-reflect/src/test"))
10189 (inputs
10190 `(("java-objenesis" ,java-objenesis)))
10191 (native-inputs
10192 `(("junit" ,java-junit)
10193 ("cglib" ,java-cglib)
10194 ("asm" ,java-asm)
10195 ("hamcrest" ,java-hamcrest-core)
10196 ("assertj" ,java-assertj)))
10197 (home-page "https://github.com/powermock/powermock")
10198 (synopsis "Mock library extension framework")
10199 (description "PowerMock is a framework that extends other mock libraries
10200 such as EasyMock with more powerful capabilities. PowerMock uses a custom
10201 classloader and bytecode manipulation to enable mocking of static methods,
10202 constructors, final classes and methods, private methods, removal of static
10203 initializers and more. By using a custom classloader no changes need to be
10204 done to the IDE or continuous integration servers which simplifies adoption.")
10205 (license license:asl2.0)))
10206
10207 (define-public java-powermock-core
10208 (package
10209 (inherit java-powermock-reflect)
10210 (name "java-powermock-core")
10211 (arguments
10212 `(#:jar-name "java-powermock-core.jar"
10213 #:source-dir "powermock-core/src/main/java"
10214 #:test-dir "powermock-core/src/test"
10215 #:tests? #f; requires powermock-api
10216 #:jdk ,icedtea-8
10217 #:phases
10218 (modify-phases %standard-phases
10219 (add-before 'build 'copy-resources
10220 (lambda _
10221 (copy-recursively "powermock-core/src/main/resources"
10222 "build/classes")
10223 #t)))))
10224 (inputs
10225 `(("reflect" ,java-powermock-reflect)
10226 ("javassist" ,java-jboss-javassist)))
10227 (native-inputs
10228 `(("junit" ,java-junit)
10229 ("assertj" ,java-assertj)
10230 ("mockito" ,java-mockito-1)))))
10231
10232 (define-public java-powermock-api-support
10233 (package
10234 (inherit java-powermock-reflect)
10235 (name "java-powermock-api-support")
10236 (build-system ant-build-system)
10237 (arguments
10238 `(#:jar-name "java-powermock-api-support.jar"
10239 #:jdk ,icedtea-8
10240 #:source-dir "powermock-api/powermock-api-support/src/main/java"
10241 #:tests? #f)); no tests
10242 (inputs
10243 `(("core" ,java-powermock-core)
10244 ("reflect" ,java-powermock-reflect)))))
10245
10246 (define-public java-powermock-modules-junit4-common
10247 (package
10248 (inherit java-powermock-reflect)
10249 (name "java-powermock-modules-junit4-common")
10250 (build-system ant-build-system)
10251 (arguments
10252 `(#:jar-name "java-powermock-modules-junit4-common.jar"
10253 #:jdk ,icedtea-8
10254 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
10255 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
10256 (inputs
10257 `(("core" ,java-powermock-core)
10258 ("easymock" ,java-easymock)
10259 ("reflect" ,java-powermock-reflect)
10260 ("hamcrest" ,java-hamcrest-core)
10261 ("cglib" ,java-cglib)))))
10262
10263 (define-public java-powermock-modules-junit4
10264 (package
10265 (inherit java-powermock-reflect)
10266 (name "java-powermock-modules-junit4")
10267 (build-system ant-build-system)
10268 (arguments
10269 `(#:jar-name "java-powermock-modules-junit4.jar"
10270 #:jdk ,icedtea-8
10271 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
10272 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
10273 #:phases
10274 (modify-phases %standard-phases
10275 (add-before 'build 'fix-junit-detection
10276 (lambda _
10277 ;; Our junit version is 4.12-SNAPSHOT
10278 (substitute* (find-files "powermock-modules/powermock-module-junit4"
10279 "PowerMockJUnit4MethodValidator.java")
10280 (("4.12") "4.12-SNAPSHOT"))
10281 #t)))))
10282 (inputs
10283 `(("core" ,java-powermock-core)
10284 ("reflect" ,java-powermock-reflect)
10285 ("common" ,java-powermock-modules-junit4-common)
10286 ("cglib" ,java-cglib)))
10287 (native-inputs
10288 `(("easymock" ,java-easymock)
10289 ("hamcrest" ,java-hamcrest-core)
10290 ("objenesis" ,java-objenesis)
10291 ("asm" ,java-asm)
10292 ("junit" ,java-junit)))))
10293
10294 (define-public java-powermock-api-easymock
10295 (package
10296 (inherit java-powermock-reflect)
10297 (name "java-powermock-api-easymock")
10298 (build-system ant-build-system)
10299 (arguments
10300 `(#:jar-name "java-powermock-api-easymock.jar"
10301 #:jdk ,icedtea-8
10302 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
10303 #:tests? #f; no tests
10304 #:phases
10305 (modify-phases %standard-phases
10306 (add-before 'build 'fix-file
10307 (lambda _
10308 ;; FIXME: This looks wrong, but it fixes a build error.
10309 (with-directory-excursion "powermock-api/powermock-api-easymock"
10310 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
10311 (("classLoader instanceof MockClassLoader") "false")
10312 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
10313 #t)))))
10314 (inputs
10315 `(("core" ,java-powermock-core)
10316 ("easymock" ,java-easymock)
10317 ("reflect" ,java-powermock-reflect)
10318 ("support" ,java-powermock-api-support)
10319 ("cglib" ,java-cglib)))))
10320
10321 (define-public java-jboss-jms-api-spec
10322 (package
10323 (name "java-jboss-jms-api-spec")
10324 (version "2.0")
10325 (source (origin
10326 (method url-fetch)
10327 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
10328 "archive/jboss-jms-api_" version
10329 "_spec-1.0.1.Final.tar.gz"))
10330 (sha256
10331 (base32
10332 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
10333 (build-system ant-build-system)
10334 (arguments
10335 `(#:jar-name "java-jboss-jms-api_spec.jar"
10336 #:jdk ,icedtea-8
10337 #:source-dir "."
10338 #:tests? #f)); no tests
10339 (home-page "https://github.com/jboss/jboss-jms-api_spec")
10340 (synopsis "Java Message Service API specification")
10341 (description "Java Message Service (JMS) API is used to send messages
10342 messages between two or more clients. It is a messaging standard that allows
10343 application components to create, send, receive, and read messages.")
10344 ; either gpl2 only with GPL Classpath Exception, or cddl.
10345 (license (list license:gpl2 license:cddl1.0))))
10346
10347 (define-public java-mail
10348 (package
10349 (name "java-mail")
10350 (version "1.6.0")
10351 (source (origin
10352 (method url-fetch)
10353 (uri (string-append "https://github.com/javaee/javamail/archive/"
10354 "JAVAMAIL-1_6_0.tar.gz"))
10355 (sha256
10356 (base32
10357 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
10358 (build-system ant-build-system)
10359 (arguments
10360 `(#:jar-name "java-mail.jar"
10361 #:jdk ,icedtea-8
10362 #:source-dir "mail/src/main/java"
10363 #:test-dir "mail/src/test"
10364 #:test-exclude
10365 (list "**/CollectorFormatterTest.java"
10366 "**/CompactFormatterTest.java"
10367 "**/DurationFilterTest.java"
10368 "**/MailHandlerTest.java"
10369 "**/GetLocalAddressTest.java"
10370 ;; FIXME: both end with:
10371 ;; java.lang.ClassNotFoundException:
10372 ;; javax.mail.internet.MimeMultipartParseTest
10373 "**/MimeMultipartParseTest.java"
10374 "**/SearchTermSerializationTest.java")
10375 #:phases
10376 (modify-phases %standard-phases
10377 (add-before 'configure 'move-version.java
10378 (lambda _
10379 (copy-file "mail/src/main/resources/javax/mail/Version.java"
10380 "mail/src/main/java/javax/mail/Version.java")
10381 #t))
10382 (add-before 'build 'copy-resources
10383 (lambda _
10384 (copy-recursively "mail/src/main/resources/META-INF"
10385 "build/classes/META-INF")
10386 #t)))))
10387 (native-inputs
10388 `(("junit" ,java-junit)
10389 ("hamcrest" ,java-hamcrest-core)))
10390 (home-page "https://javaee.github.io/javamail/")
10391 (synopsis "Mail-related functionnalities in Java")
10392 (description "The JavaMail API provides a platform-independent and
10393 protocol-independent framework to build mail and messaging applications.")
10394 ;; General Public License Version 2 only ("GPL") or the Common Development
10395 ;; and Distribution License("CDDL")
10396 (license (list license:cddl1.1
10397 license:gpl2)))); with classpath exception
10398
10399 (define-public java-jeromq
10400 (package
10401 (name "java-jeromq")
10402 (version "0.4.3")
10403 (source (origin
10404 (method git-fetch)
10405 (uri (git-reference
10406 (url "https://github.com/zeromq/jeromq")
10407 (commit (string-append "v" version))))
10408 (file-name (string-append name "-" version "-checkout"))
10409 (sha256
10410 (base32
10411 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
10412 (patches (search-patches "java-jeromq-fix-tests.patch"))))
10413 (build-system ant-build-system)
10414 (arguments
10415 `(#:jar-name "java-jeromq.jar"
10416 #:source-dir "src/main/java"
10417 #:jdk ,icedtea-8
10418 #:test-exclude
10419 (list
10420 "**/Abstract*.java"
10421 ;; Requires network
10422 "**/ZBeaconTest.java"
10423 ;; Failures
10424 "**/DealerSpecTest.java"
10425 "**/CustomDecoderTest.java"
10426 "**/CustomEncoderTest.java"
10427 "**/ConnectRidTest.java"
10428 "**/ReqSpecTest.java"
10429 "**/PushPullSpecTest.java"
10430 "**/PubSubHwmTest.java"
10431 "**/RouterSpecTest.java"
10432 "**/ProxyTest.java")))
10433 (inputs
10434 `(("java-jnacl" ,java-jnacl)))
10435 (native-inputs
10436 `(("java-hamcrest-core" ,java-hamcrest-core)
10437 ("junit" ,java-junit)))
10438 (home-page "http://zeromq.org/bindings:java")
10439 (synopsis "Java binding for 0MQ")
10440 (description "Jeromq provides the java bindings for 0MQ.")
10441 (license license:mpl2.0)))
10442
10443 (define-public java-kafka-clients
10444 (package
10445 (name "java-kafka-clients")
10446 (version "1.0.0")
10447 (source (origin
10448 (method url-fetch)
10449 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
10450 version "-src.tgz"))
10451 (sha256
10452 (base32
10453 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
10454 (build-system ant-build-system)
10455 (arguments
10456 `(#:jar-name "java-kafka-clients.jar"
10457 #:jdk ,icedtea-8
10458 #:source-dir "clients/src/main/java"
10459 #:test-dir "clients/src/test"
10460 #:test-exclude
10461 (list
10462 ;; This file does not contain a class
10463 "**/IntegrationTest.java"
10464 ;; Requires network
10465 "**/ClientUtilsTest.java"
10466 ;; End with errors that seem related to our powermock
10467 "**/KafkaProducerTest.java"
10468 "**/BufferPoolTest.java")))
10469 (inputs
10470 `(("java-slf4j-api" ,java-slf4j-api)
10471 ("java-lz4" ,java-lz4)))
10472 (native-inputs
10473 `(("junit" ,java-junit)
10474 ("hamcrest" ,java-hamcrest-all)
10475 ("objenesis" ,java-objenesis)
10476 ("asm" ,java-asm)
10477 ("cglib" ,java-cglib)
10478 ("javassist" ,java-jboss-javassist)
10479 ("snappy" ,java-snappy)
10480 ("easymock" ,java-easymock)
10481 ("powermock" ,java-powermock-core)
10482 ("powermock-easymock" ,java-powermock-api-easymock)
10483 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
10484 ("powermock-junit4" ,java-powermock-modules-junit4)
10485 ("powermock-support" ,java-powermock-api-support)
10486 ("java-bouncycastle" ,java-bouncycastle)))
10487 (home-page "https://kafka.apache.org")
10488 (synopsis "Distributed streaming platform")
10489 (description "Kafka is a distributed streaming platform, which means:
10490 @itemize
10491 @item it can publish and subscribe to streams of records;
10492 @item it can store streams of records in a fault-tolerant way;
10493 @item it can process streams of records as they occur.
10494 @end itemize")
10495 ;; Either cddl or gpl2 only.
10496 (license (list license:cddl1.1; actually cddl1.1
10497 license:gpl2)))); with classpath exception
10498
10499 (define-public java-jdom
10500 (package
10501 (name "java-jdom")
10502 (version "1.1.3")
10503 (source (origin
10504 (method url-fetch)
10505 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
10506 version ".tar.gz"))
10507 (sha256
10508 (base32
10509 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
10510 (build-system ant-build-system)
10511 (arguments
10512 `(#:build-target "package"
10513 #:tests? #f; tests are run as part of the build process
10514 #:phases
10515 (modify-phases %standard-phases
10516 (replace 'install
10517 (install-jars "build")))))
10518 (home-page "http://jdom.org/")
10519 (synopsis "Access, manipulate, and output XML data")
10520 (description "Java-based solution for accessing, manipulating, and
10521 outputting XML data from Java code.")
10522 (license license:bsd-4)))
10523
10524 (define-public java-geronimo-xbean-reflect
10525 (package
10526 (name "java-geronimo-xbean-reflect")
10527 (version "4.5")
10528 (source (origin
10529 (method svn-fetch)
10530 (uri (svn-reference
10531 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
10532 (revision 1807396)))
10533 (file-name (string-append name "-" version))
10534 (sha256
10535 (base32
10536 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
10537 (build-system ant-build-system)
10538 (arguments
10539 `(#:jar-name "geronimo-xbean-reflect.jar"
10540 #:source-dir "xbean-reflect/src/main/java"
10541 #:test-dir "xbean-reflect/src/test"
10542 #:jdk ,icedtea-8
10543 #:test-exclude
10544 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
10545 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
10546 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
10547 #:phases
10548 (modify-phases %standard-phases
10549 (add-before 'build 'fix-source
10550 (lambda _
10551 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
10552 ;; org.apache.xbean.asm6 is actually repackaged java-asm
10553 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
10554 (("org.apache.xbean.asm5") "org.objectweb.asm"))
10555 #t)))
10556 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
10557 (inputs
10558 `(("asm" ,java-asm)
10559 ("log4j" ,java-log4j-api)
10560 ("log4j-1.2" ,java-log4j-1.2-api)
10561 ("log4j-core" ,java-log4j-core)
10562 ("logging" ,java-commons-logging-minimal)))
10563 (propagated-inputs
10564 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
10565 (native-inputs
10566 `(("junit" ,java-junit)))
10567 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
10568 (synopsis "Dependency injection helper")
10569 (description "Xbean-reflect provides very flexible ways to create objects
10570 and graphs of objects for dependency injection frameworks")
10571 (license license:asl2.0)))
10572
10573 (define java-geronimo-genesis-2.1
10574 (package
10575 (name "java-geronimo-genesis")
10576 (version "2.1")
10577 (source (origin
10578 (method svn-fetch)
10579 (uri (svn-reference
10580 (url (string-append "https://svn.apache.org/repos/asf/"
10581 "geronimo/genesis/tags/genesis-"
10582 version))
10583 (revision 1807396)))
10584 (file-name (string-append name "-" version "-source"))
10585 (sha256
10586 (base32
10587 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
10588 (build-system ant-build-system)
10589 (arguments
10590 `(#:tests? #f
10591 #:phases
10592 (modify-phases %standard-phases
10593 (delete 'configure)
10594 (delete 'build)
10595 (replace 'install
10596 (install-pom-file "pom.xml"))
10597 (add-after 'install 'install-enforcer-rules
10598 (install-pom-file "genesis-enforcer-rules/pom.xml"))
10599 (add-after 'install 'install-flava
10600 (install-pom-file "genesis-default-flava/pom.xml"))
10601 (add-after 'install 'install-packaging
10602 (install-pom-file "genesis-packaging/pom.xml"))
10603 (add-after 'install-flava 'install-flava-java4
10604 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
10605 (add-after 'install-flava 'install-flava-java5
10606 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
10607 (add-after 'install-flava 'install-flava-java6
10608 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
10609 (propagated-inputs
10610 `(("apache-parent-pom" ,apache-parent-pom-13)))
10611 (home-page "https://geronimo.apache.org")
10612 (synopsis "Collection of maven POM files for the Geronimo project")
10613 (description "Apache Geronimo is a server runtime. This package contains
10614 only pom files used by other components in the Geronimo project.")
10615 (license license:asl2.0)))
10616
10617 (define java-geronimo-parent-pom
10618 (package
10619 (inherit java-geronimo-xbean-reflect)
10620 (name "java-geronimo-parent-pom")
10621 (arguments
10622 `(#:tests? #f
10623 #:phases
10624 (modify-phases %standard-phases
10625 (delete 'configure)
10626 (delete 'build)
10627 (replace 'install
10628 (install-pom-file "pom.xml")))))
10629 (propagated-inputs
10630 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
10631
10632 (define-public java-geronimo-xbean-bundleutils
10633 (package
10634 (inherit java-geronimo-xbean-reflect)
10635 (name "java-geronimo-xbean-bundleutils")
10636 (arguments
10637 `(#:jar-name "geronimo-xbean-bundleutils.jar"
10638 #:source-dir "xbean-bundleutils/src/main/java"
10639 #:test-dir "xbean-bundleutils/src/test"
10640 #:phases
10641 (modify-phases %standard-phases
10642 (add-before 'build 'fix-java
10643 (lambda _
10644 ;; We use a more recent version of osgi, so this file requires
10645 ;; more interface method implementations.
10646 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
10647 (("import org.osgi.framework.ServiceRegistration;")
10648 "import org.osgi.framework.ServiceRegistration;
10649 import org.osgi.framework.ServiceFactory;
10650 import java.util.Collection;
10651 import org.osgi.framework.ServiceObjects;")
10652 (("public Bundle getBundle\\(\\)")
10653 "@Override
10654 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
10655 throw new UnsupportedOperationException();
10656 }
10657 @Override
10658 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10659 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10660 throw new UnsupportedOperationException();
10661 }
10662 public Bundle getBundle()"))
10663 #t)))))
10664 (inputs
10665 `(("java-slf4j" ,java-slf4j-api)
10666 ("java-asm" ,java-asm)
10667 ("java-osgi-framework" ,java-osgi-framework)
10668 ("java-eclipse-osgi" ,java-eclipse-osgi)
10669 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
10670
10671 (define-public java-geronimo-xbean-asm-util
10672 (package
10673 (inherit java-geronimo-xbean-reflect)
10674 (name "java-geronimo-xbean-asm-util")
10675 (arguments
10676 `(#:jar-name "geronimo-xbean-asm-util.jar"
10677 #:source-dir "xbean-asm-util/src/main/java"
10678 #:tests? #f)); no tests
10679 (inputs
10680 `(("java-asm" ,java-asm)))
10681 (native-inputs '())))
10682
10683 (define-public java-geronimo-xbean-finder
10684 (package
10685 (inherit java-geronimo-xbean-reflect)
10686 (name "java-geronimo-xbean-finder")
10687 (arguments
10688 `(#:jar-name "geronimo-xbean-finder.jar"
10689 #:source-dir "xbean-finder/src/main/java"
10690 #:test-dir "xbean-finder/src/test"))
10691 (inputs
10692 `(("java-slf4j-api" ,java-slf4j-api)
10693 ("java-asm" ,java-asm)
10694 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10695 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10696 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10697 ("java-osgi-framework" ,java-osgi-framework)))
10698 (native-inputs
10699 `(("java-junit" ,java-junit)
10700 ("java-hamcrest-core" ,java-hamcrest-core)))))
10701
10702 (define-public java-gson
10703 (package
10704 (name "java-gson")
10705 (version "2.8.2")
10706 (source (origin
10707 (method url-fetch)
10708 (uri (string-append "https://github.com/google/gson/archive/"
10709 "gson-parent-" version ".tar.gz"))
10710 (sha256
10711 (base32
10712 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10713 (build-system ant-build-system)
10714 (arguments
10715 `(#:jar-name "gson.jar"
10716 #:source-dir "gson/src/main/java"
10717 #:test-dir "gson/src/test"))
10718 (native-inputs
10719 `(("java-junit" ,java-junit)
10720 ("java-hamcrest-core" ,java-hamcrest-core)))
10721 (home-page "https://github.com/google/gson")
10722 (synopsis "Java serialization/deserialization library from/to JSON")
10723 (description "Gson is a Java library that can be used to convert Java
10724 Objects into their JSON representation. It can also be used to convert a JSON
10725 string to an equivalent Java object. Gson can work with arbitrary Java objects
10726 including pre-existing objects that you do not have source-code of.")
10727 (license license:asl2.0)))
10728
10729 (define-public java-hawtjni
10730 (package
10731 (name "java-hawtjni")
10732 (version "1.15")
10733 (source (origin
10734 (method url-fetch)
10735 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10736 "hawtjni-project-" version ".tar.gz"))
10737 (sha256
10738 (base32
10739 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10740 (build-system ant-build-system)
10741 (arguments
10742 `(#:jar-name "hawtjni.jar"
10743 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10744 #:tests? #f; no tests
10745 #:phases
10746 (modify-phases %standard-phases
10747 (add-before 'build 'build-native
10748 (lambda* (#:key inputs #:allow-other-keys)
10749 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10750 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10751 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10752 "-fPIC" "-O2" include)
10753 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10754 "-fPIC" "-O2" include)
10755 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10756 "hawtjni.o" "hawtjni-callback.o")))
10757 #t))
10758 (add-after 'install 'install-native
10759 (lambda* (#:key outputs #:allow-other-keys)
10760 (let* ((out (assoc-ref outputs "out"))
10761 (lib (string-append out "/lib"))
10762 (inc (string-append out "/include")))
10763 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10764 (install-file "libhawtjni.so" lib)
10765 (install-file "hawtjni.h" inc)))
10766 #t)))))
10767 (inputs
10768 `(("java-commons-cli" ,java-commons-cli)
10769 ("java-asm" ,java-asm)
10770 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10771 (home-page "https://fusesource.github.io/hawtjni/")
10772 (synopsis "JNI code generator")
10773 (description "HawtJNI is a code generator that produces the JNI code needed
10774 to implement Java native methods. It is based on the jnigen code generator
10775 that is part of the SWT Tools project.")
10776 (license license:asl2.0)))
10777
10778 (define-public java-jansi-native
10779 (package
10780 (name "java-jansi-native")
10781 (version "1.7")
10782 (source (origin
10783 (method url-fetch)
10784 (uri (string-append "https://github.com/fusesource/jansi-native/"
10785 "archive/jansi-native-" version ".tar.gz"))
10786 (sha256
10787 (base32
10788 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10789 (build-system ant-build-system)
10790 (arguments
10791 `(#:jar-name "jansi-native.jar"
10792 #:source-dir "src/main/java"
10793 #:tests? #f; no tests
10794 #:phases
10795 (modify-phases %standard-phases
10796 (add-before 'build 'build-native
10797 (lambda* (#:key inputs #:allow-other-keys)
10798 ;; there are more required files for windows in windows/
10799 (with-directory-excursion "src/main/native-package/src"
10800 (substitute* "jansi_ttyname.c"
10801 (("#include \"jansi_.*") ""))
10802 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10803 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10804 "/include")
10805 (string-append "-I" (assoc-ref inputs "jdk")
10806 "/include/linux")
10807 "-fPIC" "-O2")
10808 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
10809 (add-before 'build 'install-native
10810 (lambda _
10811 (let ((dir (string-append "build/classes/META-INF/native/"
10812 ,(match (%current-system)
10813 ((or "i686-linux" "armhf-linux")
10814 "linux32")
10815 ((or "x86_64-linux" "aarch64-linux"
10816 "mips64el-linux")
10817 "linux64")
10818 (_ "unknown-kernel")))))
10819 (install-file "src/main/native-package/src/libjansi.so" dir))
10820 #t))
10821 (add-after 'install 'install-native
10822 (lambda* (#:key outputs #:allow-other-keys)
10823 (install-file "src/main/native-package/src/jansi.h"
10824 (string-append (assoc-ref outputs "out") "/include"))
10825 #t)))))
10826 (inputs
10827 `(("java-hawtjni" ,java-hawtjni)))
10828 (home-page "https://fusesource.github.io/jansi/")
10829 (synopsis "Native library for jansi")
10830 (description "This package provides the native library for jansi, a small
10831 Java library that allows you to use ANSI escape sequences to format your
10832 console output.")
10833 (license license:asl2.0)))
10834
10835 (define-public java-jansi
10836 (package
10837 (name "java-jansi")
10838 (version "1.16")
10839 (source (origin
10840 (method url-fetch)
10841 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10842 "jansi-project-" version ".tar.gz"))
10843 (sha256
10844 (base32
10845 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10846 (build-system ant-build-system)
10847 (arguments
10848 `(#:jar-name "jansi.jar"
10849 #:source-dir "jansi/src/main/java"
10850 #:test-dir "jansi/src/test"
10851 #:phases
10852 (modify-phases %standard-phases
10853 (add-after 'check 'clear-term
10854 (lambda _
10855 (invoke "echo" "-e" "\\e[0m"))))))
10856 (inputs
10857 `(("java-jansi-native" ,java-jansi-native)))
10858 (native-inputs
10859 `(("java-junit" ,java-junit)
10860 ("java-hamcrest-core" ,java-hamcrest-core)))
10861 (home-page "https://fusesource.github.io/jansi/")
10862 (synopsis "Portable ANSI escape sequences")
10863 (description "Jansi is a Java library that allows you to use ANSI escape
10864 sequences to format your console output which works on every platform.")
10865 (license license:asl2.0)))
10866
10867 (define-public java-jboss-el-api-spec
10868 (package
10869 (name "java-jboss-el-api-spec")
10870 (version "3.0")
10871 (source (origin
10872 (method url-fetch)
10873 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10874 "archive/jboss-el-api_" version
10875 "_spec-1.0.7.Final.tar.gz"))
10876 (sha256
10877 (base32
10878 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10879 (build-system ant-build-system)
10880 (arguments
10881 `(#:jar-name "java-jboss-el-api_spec.jar"
10882 #:modules ((guix build ant-build-system)
10883 (guix build utils)
10884 (guix build maven pom)
10885 (guix build java-utils)
10886 (sxml simple))
10887 #:phases
10888 (modify-phases %standard-phases
10889 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
10890 ;; instead, which implements the same thing. We override the pom file
10891 ;; to "rename" the package so it can be found by maven.
10892 (add-before 'install 'override-pom
10893 (lambda _
10894 (delete-file "pom.xml")
10895 (with-output-to-file "pom.xml"
10896 (lambda _
10897 (sxml->xml
10898 `(project
10899 (modelVersion "4.0.0")
10900 (name "el-api")
10901 (groupId "javax.el")
10902 (artifactId "javax.el-api")
10903 (version "3.0")))))
10904 #t))
10905 (replace 'install
10906 (install-from-pom "pom.xml")))))
10907 (inputs
10908 `(("java-junit" ,java-junit)))
10909 (home-page "https://github.com/jboss/jboss-el-api_spec")
10910 (synopsis "JSR-341 expression language 3.0 API")
10911 (description "This package contains an implementation of the JSR-341
10912 specification for the expression language 3.0. It implements an expression
10913 language inspired by ECMAScript and XPath. This language is used with
10914 JavaServer Pages (JSP).")
10915 ;; Either GPL2 only or CDDL.
10916 (license (list license:gpl2 license:cddl1.1))))
10917
10918 (define-public java-jboss-interceptors-api-spec
10919 (package
10920 (name "java-jboss-interceptors-api-spec")
10921 (version "1.2")
10922 (source (origin
10923 (method url-fetch)
10924 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10925 "archive/jboss-interceptors-api_" version
10926 "_spec-1.0.0.Final.tar.gz"))
10927 (sha256
10928 (base32
10929 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10930 (build-system ant-build-system)
10931 (arguments
10932 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10933 #:jdk ,icedtea-8
10934 #:source-dir "."
10935 #:tests? #f; no tests
10936 #:modules ((guix build ant-build-system)
10937 (guix build utils)
10938 (guix build maven pom)
10939 (guix build java-utils)
10940 (sxml simple))
10941 #:phases
10942 (modify-phases %standard-phases
10943 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
10944 ;; so we use this package instead, which implements the same thing.
10945 ;; We override the pom file to "rename" the package so it can be found
10946 ;; by maven.
10947 (add-before 'install 'override-pom
10948 (lambda _
10949 (delete-file "pom.xml")
10950 (with-output-to-file "pom.xml"
10951 (lambda _
10952 (sxml->xml
10953 `(project
10954 (modelVersion "4.0.0")
10955 (name "interceptor-api")
10956 (groupId "javax.interceptor")
10957 (artifactId "javax.interceptor-api")
10958 (version "3.0")))))
10959 #t))
10960 (replace 'install
10961 (install-from-pom "pom.xml")))))
10962 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10963 (synopsis "Interceptors 1.2 API classes from JSR 318")
10964 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10965 API. Interceptors are used to interpose on business method invocations and
10966 specific events.")
10967 ;; Either GPL2 only or CDDL.
10968 (license (list license:gpl2 license:cddl1.1))))
10969
10970 (define-public java-cdi-api
10971 (package
10972 (name "java-cdi-api")
10973 (version "2.0")
10974 (source (origin
10975 (method url-fetch)
10976 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10977 version ".tar.gz"))
10978 (file-name (string-append name "-" version ".tar.gz"))
10979 (sha256
10980 (base32
10981 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10982 (build-system ant-build-system)
10983 (arguments
10984 `(#:source-dir "api/src/main/java"
10985 #:jar-name "java-cdi-api.jar"
10986 #:test-dir "api/src/test"
10987 #:jdk ,icedtea-8
10988 #:tests? #f; Tests fail because we don't have a CDI provider yet
10989 #:phases
10990 (modify-phases %standard-phases
10991 (replace 'install
10992 (install-from-pom "api/pom.xml")))))
10993 (propagated-inputs
10994 `(("java-javax-inject" ,java-javax-inject)
10995 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10996 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
10997 ("java-weld-parent-pom" ,java-weld-parent-pom)))
10998 (native-inputs
10999 `(("java-testng" ,java-testng)
11000 ("java-hamcrest-core" ,java-hamcrest-core)))
11001 (home-page "http://cdi-spec.org/")
11002 (synopsis "Contexts and Dependency Injection APIs")
11003 (description "Java-cdi-api contains the required APIs for Contexts and
11004 Dependency Injection (CDI).")
11005 (license license:asl2.0)))
11006
11007 (define-public java-joda-convert
11008 (package
11009 (name "java-joda-convert")
11010 (version "1.9.2")
11011 (source (origin
11012 (method url-fetch)
11013 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11014 version ".tar.gz"))
11015 (file-name (string-append name "-" version ".tar.gz"))
11016 (sha256
11017 (base32
11018 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11019 (build-system ant-build-system)
11020 (arguments
11021 `(#:jar-name (string-append ,name "-" ,version ".jar")
11022 #:source-dir "src/main/java"
11023 #:test-include (list "**/Test*.java")
11024 ;; Contains only interfaces and base classes (no test)
11025 #:test-exclude (list "**/test*/**.java")))
11026 (inputs
11027 `(("java-guava" ,java-guava)))
11028 (native-inputs
11029 `(("java-junit" ,java-junit)
11030 ("java-hamcrest-core" ,java-hamcrest-core)))
11031 (home-page "https://www.joda.org/joda-convert/")
11032 (synopsis "Conversion between Objects and Strings")
11033 (description "Joda-Convert provides a small set of classes to aid
11034 conversion between Objects and Strings. It is not intended to tackle the
11035 wider problem of Object to Object transformation.")
11036 (license license:asl2.0)))
11037
11038 (define-public java-joda-time
11039 (package
11040 (name "java-joda-time")
11041 (version "2.9.9")
11042 (source (origin
11043 (method url-fetch)
11044 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11045 version ".tar.gz"))
11046 (file-name (string-append name "-" version ".tar.gz"))
11047 (sha256
11048 (base32
11049 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11050 (build-system ant-build-system)
11051 (arguments
11052 `(#:jar-name "java-joda-time.jar"
11053 #:source-dir "src/main/java"
11054 #:test-include (list "**/Test*.java")
11055 ;; There is no runnable test in these files
11056 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11057 #:phases
11058 (modify-phases %standard-phases
11059 (add-after 'build 'build-resources
11060 (lambda _
11061 (mkdir-p "build/classes/org/joda/time/tz/data")
11062 (mkdir-p "build/classes/org/joda/time/format")
11063 ;; This will produce the following exception:
11064 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11065 ;; which is normal, because it doesn't exist yet. It still generates
11066 ;; the same file as in the binary one can find on maven.
11067 (invoke "java" "-cp"
11068 (string-append "build/classes:" (getenv "CLASSPATH"))
11069 "org.joda.time.tz.ZoneInfoCompiler"
11070 "-src" "src/main/java/org/joda/time/tz/src"
11071 "-dst" "build/classes/org/joda/time/tz/data"
11072 "africa" "antarctica" "asia" "australasia"
11073 "europe" "northamerica" "southamerica"
11074 "pacificnew" "etcetera" "backward" "systemv")
11075 (for-each (lambda (f)
11076 (copy-file f (string-append
11077 "build/classes/org/joda/time/format/"
11078 (basename f))))
11079 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11080 #t))
11081 (add-before 'install 'regenerate-jar
11082 (lambda _
11083 ;; We need to regenerate the jar file to add generated data.
11084 (delete-file "build/jar/java-joda-time.jar")
11085 (invoke "ant" "jar")))
11086 (add-before 'check 'copy-test-resources
11087 (lambda _
11088 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11089 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11090 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11091 (copy-recursively "src/test/resources" "build/test-classes")
11092 #t)))))
11093 (inputs
11094 `(("java-joda-convert" ,java-joda-convert)))
11095 (native-inputs
11096 `(("java-junit" ,java-junit)
11097 ("java-hamcrest-core" ,java-hamcrest-core)
11098 ("tzdata" ,tzdata)))
11099 (home-page "https://www.joda.org/joda-time/")
11100 (synopsis "Replacement for the Java date and time classes")
11101 (description "Joda-Time is a replacement for the Java date and time
11102 classes prior to Java SE 8.")
11103 (license license:asl2.0)))
11104
11105 (define-public java-xerces
11106 (package
11107 (name "java-xerces")
11108 (version "2.12.1")
11109 (source
11110 (origin
11111 (method url-fetch)
11112 (uri (string-append "mirror://apache/xerces/j/source/"
11113 "Xerces-J-src." version ".tar.gz"))
11114 (sha256
11115 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
11116 (patches (search-patches
11117 "java-xerces-xjavac_taskdef.patch"
11118 "java-xerces-build_dont_unzip.patch"
11119 "java-xerces-bootclasspath.patch"))))
11120 (build-system ant-build-system)
11121 (arguments
11122 `(#:tests? #f;; Test files are not present
11123 #:test-target "test"
11124 #:jdk ,icedtea-8
11125 #:phases
11126 (modify-phases %standard-phases
11127 (add-after 'unpack 'create-build.properties
11128 (lambda* (#:key inputs #:allow-other-keys)
11129 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11130 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11131 (with-output-to-file "build.properties"
11132 (lambda _
11133 (format #t
11134 "jar.jaxp = ~a/share/java/jaxp.jar~@
11135 jar.apis-ext = ~a/share/java/jaxp.jar~@
11136 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11137 jaxp jaxp resolver)))
11138 ;; Make xerces use our version of jaxp in tests
11139 (substitute* "build.xml"
11140 (("xml-apis.jar")
11141 (string-append jaxp "/share/java/jaxp.jar"))
11142 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
11143 "${jar.apis}")))
11144 #t))
11145 (replace 'install (install-jars "build")))))
11146 (inputs
11147 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
11148 ("java-jaxp" ,java-jaxp)))
11149 (home-page "https://xerces.apache.org/xerces2-j/")
11150 (synopsis "Validating XML parser for Java with DOM level 3 support")
11151 (description "The Xerces2 Java parser is the reference implementation of
11152 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
11153 processor.
11154
11155 Xerces2-J supports the following standards and APIs:
11156
11157 @itemize
11158 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
11159 @item Namespaces in XML Recommendation
11160 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
11161 Range Recommendations
11162 @item Simple API for XML (SAX) 2.0.1 Core and Extension
11163 @item Java APIs for XML Processing (JAXP) 1.2.01
11164 @item XML Schema 1.0 Structures and Datatypes Recommendations
11165 @item Experimental implementation of the Document Object Model (DOM) Level 3
11166 Core and Load/Save Working Drafts
11167 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
11168 Candidate Recommendation
11169 @end itemize
11170
11171 Xerces is now able to parse documents written according to the XML 1.1
11172 Candidate Recommendation, except that it does not yet provide an option to
11173 enable normalization checking as described in section 2.13 of this
11174 specification. It also handles namespaces according to the XML Namespaces 1.1
11175 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
11176 the DOM level 3 load/save API's are in use.")
11177 (license license:asl2.0)))
11178
11179 (define-public java-jakarta-regexp
11180 (package
11181 (name "java-jakarta-regexp")
11182 (version "1.5")
11183 (source
11184 (origin
11185 (method url-fetch)
11186 (uri (string-append
11187 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
11188 version ".tar.gz"))
11189 (sha256
11190 (base32
11191 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
11192 (build-system ant-build-system)
11193 (arguments
11194 `(#:test-target "test"
11195 #:phases
11196 (modify-phases %standard-phases
11197 (replace 'install
11198 (lambda* (#:key outputs #:allow-other-keys)
11199 (let* ((out (assoc-ref outputs "out"))
11200 (out-share (string-append out "/share/java")))
11201 (mkdir-p out-share)
11202 (for-each (lambda (name)
11203 (install-file name out-share))
11204 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
11205 #t))))))
11206 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
11207 (synopsis "Regular expression parser generator for Java.")
11208 (description "@code{jakarta-regexp} is an old regular expression parser
11209 generator for Java.")
11210 (license license:asl2.0)))
11211
11212 (define-public java-jline
11213 (package
11214 (name "java-jline")
11215 (version "1.0")
11216 (source (origin
11217 (method url-fetch)
11218 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
11219 version ".tar.gz"))
11220 (sha256
11221 (base32
11222 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
11223 (build-system ant-build-system)
11224 (arguments
11225 `(#:jar-name "jline.jar"
11226 #:source-dir "src/main/java"
11227 #:test-dir "src/test"
11228 #:phases
11229 (modify-phases %standard-phases
11230 (add-before 'build 'copy-resources
11231 (lambda _
11232 (copy-recursively "src/main/resources" "build/classes")
11233 #t)))))
11234 (native-inputs
11235 `(("java-junit" ,java-junit)))
11236 (home-page "https://jline.github.io")
11237 (synopsis "Console input handling library")
11238 (description "JLine is a Java library for handling console input. It is
11239 similar in functionality to BSD editline and GNU readline but with additional
11240 features that bring it on par with the Z shell line editor.")
11241 (license license:bsd-3)))
11242
11243 (define-public java-jline-2
11244 (package
11245 (inherit java-jline)
11246 (version "2.14.5")
11247 (source (origin
11248 (method url-fetch)
11249 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
11250 version ".tar.gz"))
11251 (sha256
11252 (base32
11253 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
11254 (arguments
11255 `(#:jdk ,icedtea-8
11256 ,@(package-arguments java-jline)))
11257 (inputs
11258 `(("java-jansi" ,java-jansi)
11259 ("java-jansi-native" ,java-jansi-native)))
11260 (native-inputs
11261 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
11262 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
11263 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
11264 ("java-powermock-api-support" ,java-powermock-api-support)
11265 ("java-powermock-core" ,java-powermock-core)
11266 ("java-powermock-reflect" ,java-powermock-reflect)
11267 ("java-easymock" ,java-easymock)
11268 ("java-jboss-javassist" ,java-jboss-javassist)
11269 ("java-objenesis" ,java-objenesis)
11270 ("java-asm" ,java-asm)
11271 ("java-hamcrest-core" ,java-hamcrest-core)
11272 ("java-cglib" ,java-cglib)
11273 ("java-junit" ,java-junit)
11274 ("java-hawtjni" ,java-hawtjni)))))
11275
11276 (define-public java-xmlunit
11277 (package
11278 (name "java-xmlunit")
11279 (version "2.5.1")
11280 (source (origin
11281 (method url-fetch)
11282 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
11283 version ".tar.gz"))
11284 (file-name (string-append name "-" version ".tar.gz"))
11285 (sha256
11286 (base32
11287 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
11288 (build-system ant-build-system)
11289 (arguments
11290 `(#:jar-name "java-xmlunit.jar"
11291 #:source-dir "xmlunit-core/src/main/java"
11292 #:test-dir "xmlunit-core/src/test"
11293 #:phases
11294 (modify-phases %standard-phases
11295 (add-before 'check 'copy-test-resources
11296 (lambda* (#:key inputs #:allow-other-keys)
11297 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
11298 #t)))))
11299 (native-inputs
11300 `(("java-junit" ,java-junit)
11301 ("java-mockito-1" ,java-mockito-1)
11302 ("java-hamcrest-all" ,java-hamcrest-all)
11303 ("java-objenesis" ,java-objenesis)
11304 ("java-asm" ,java-asm)
11305 ("java-cglib" ,java-cglib)
11306 ("resources"
11307 ,(origin
11308 (method git-fetch)
11309 (uri (git-reference
11310 (url "https://github.com/xmlunit/test-resources")
11311 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
11312 (file-name "java-xmlunit-test-resources")
11313 (sha256
11314 (base32
11315 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
11316 (home-page "https://www.xmlunit.org/")
11317 (synopsis "XML output testing")
11318 (description "XMLUnit provides you with the tools to verify the XML you
11319 emit is the one you want to create. It provides helpers to validate against
11320 an XML Schema, assert the values of XPath queries or compare XML documents
11321 against expected outcomes.")
11322 (license license:asl2.0)))
11323
11324 (define-public java-xmlunit-legacy
11325 (package
11326 (inherit java-xmlunit)
11327 (name "java-xmlunit-legacy")
11328 (arguments
11329 `(#:jar-name "java-xmlunit-legacy.jar"
11330 #:source-dir "xmlunit-legacy/src/main/java"
11331 #:test-dir "xmlunit-legacy/src/test"))
11332 (inputs
11333 `(("java-xmlunit" ,java-xmlunit)
11334 ("java-junit" ,java-junit)))
11335 (native-inputs
11336 `(("java-mockito-1" ,java-mockito-1)))))
11337
11338 (define-public java-xmlunit-matchers
11339 (package
11340 (inherit java-xmlunit)
11341 (name "java-xmlunit-matchers")
11342 (arguments
11343 `(#:jar-name "java-xmlunit-matchers.jar"
11344 #:source-dir "xmlunit-matchers/src/main/java"
11345 #:test-dir "xmlunit-matchers/src/test"
11346 #:test-exclude
11347 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
11348 (list "**/ValidationMatcherTest.java")
11349 #:phases
11350 (modify-phases %standard-phases
11351 (add-before 'build 'copy-test-class
11352 (lambda _
11353 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
11354 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
11355 #t))
11356 (add-before 'build 'fix-test-resources-path
11357 (lambda _
11358 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
11359 (("../test-resources") "test-resources"))
11360 #t))
11361 (add-before 'check 'copy-test-resources
11362 (lambda* (#:key inputs #:allow-other-keys)
11363 (copy-recursively (assoc-ref inputs "resources") "test-resources")
11364 #t)))))
11365 (inputs
11366 `(("java-xmlunit" ,java-xmlunit)
11367 ("java-junit" ,java-junit)))))
11368
11369 (define-public java-openchart2
11370 (package
11371 (name "java-openchart2")
11372 (version "1.4.3")
11373 (source (origin
11374 (method url-fetch)
11375 (uri (string-append "http://download.approximatrix.com/openchart2/"
11376 "openchart2-" version ".source.zip"))
11377 (sha256
11378 (base32
11379 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
11380 (build-system ant-build-system)
11381 (arguments
11382 `(#:test-target "test"
11383 #:phases
11384 (modify-phases %standard-phases
11385 (add-after 'unpack 'fix-junit-errors
11386 (lambda _
11387 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
11388 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
11389 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
11390 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
11391 "model/DefaultChartDataModelConstraintsTest.java"
11392 "model/MultiScatterDataModelConstraintsTest.java"
11393 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
11394 (("(assertEquals[^;]+);" before _)
11395 (string-append (string-drop-right before 2) ", 1E-6);"))))
11396 #t))
11397 (replace 'install (install-jars ".")))))
11398 (native-inputs
11399 `(("unzip" ,unzip)
11400 ("java-junit" ,java-junit)
11401 ("java-hamcrest-core" ,java-hamcrest-core)))
11402 (home-page "https://approximatrix.com/products/openchart2/")
11403 (synopsis "Simple plotting for Java")
11404 (description "Openchart2 provides a simple, yet powerful, interface for
11405 Java programmers to create two-dimensional charts and plots. The library
11406 features an assortment of graph styles, including advanced scatter plots, bar
11407 graphs, and pie charts.")
11408 (license license:lgpl2.1+)))
11409
11410 (define-public java-commons-httpclient
11411 (package
11412 (name "java-commons-httpclient")
11413 (version "3.1")
11414 (source (origin
11415 (method url-fetch)
11416 (uri (string-append "mirror://apache/httpcomponents/"
11417 "commons-httpclient/source/commons-httpclient-"
11418 version "-src.tar.gz"))
11419 (sha256
11420 (base32
11421 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
11422 (build-system ant-build-system)
11423 (arguments
11424 `(#:build-target "compile"
11425 #:test-target "test"
11426 #:tests? #f; requires junit-textui (junit 3)
11427 #:phases
11428 (modify-phases %standard-phases
11429 (add-before 'build 'fix-accent
11430 (lambda _
11431 (for-each (lambda (file)
11432 (with-fluids ((%default-port-encoding "ISO-8859-1"))
11433 (substitute* file
11434 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
11435 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
11436 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
11437 "src/test/org/apache/commons/httpclient/TestHttps.java"
11438 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
11439 #t))
11440 (replace 'install
11441 (lambda* (#:key outputs #:allow-other-keys)
11442 (invoke "ant" "dist"
11443 (string-append "-Ddist.home=" (assoc-ref outputs "out")
11444 "/share/java"))
11445 #t)))))
11446 (propagated-inputs
11447 `(("java-commons-logging" ,java-commons-logging-minimal)
11448 ("java-commons-codec" ,java-commons-codec)))
11449 (home-page "https://hc.apache.org")
11450 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
11451 (description "This package contains an HTTP/1.1 compliant HTTP agent
11452 implementation. It also provides reusable components for client-side
11453 authentication, HTTP state management, and HTTP connection management.")
11454 (license license:asl2.0)))
11455
11456 (define-public java-commons-vfs
11457 (package
11458 (name "java-commons-vfs")
11459 (version "2.2")
11460 (source (origin
11461 (method url-fetch)
11462 (uri (string-append "mirror://apache/commons/vfs/source/"
11463 "commons-vfs2-distribution-" version "-src.tar.gz"))
11464 (file-name (string-append name "-" version ".tar.gz"))
11465 (sha256
11466 (base32
11467 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
11468 (modules '((guix build utils)))
11469 (snippet
11470 '(begin
11471 (for-each delete-file
11472 (find-files "." "\\.jar$"))
11473 #t))))
11474 (build-system ant-build-system)
11475 (arguments
11476 `(#:jar-name "commons-vfs.jar"
11477 #:source-dir "commons-vfs2/src/main/java"
11478 #:test-dir "commons-vfs2/src/test"
11479 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
11480 #:tests? #f
11481 #:phases
11482 (modify-phases %standard-phases
11483 (add-before 'build 'remove-hadoop-and-webdav
11484 ; Remove these files as they are not required and depend on difficult
11485 ; packages.
11486 (lambda _
11487 (for-each delete-file-recursively
11488 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
11489 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
11490 #t)))))
11491 (inputs
11492 `(("java-commons-collections4" ,java-commons-collections4)
11493 ("java-commons-compress" ,java-commons-compress)
11494 ("java-commons-httpclient" ,java-commons-httpclient)
11495 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
11496 ("java-commons-net" ,java-commons-net)
11497 ("java-jsch" ,java-jsch)))
11498 (home-page "https://commons.apache.org/proper/commons-vfs/")
11499 (synopsis "Java file system library")
11500 (description "Commons VFS provides a single API for accessing various
11501 different file systems. It presents a uniform view of the files from various
11502 different sources, such as the files on local disk, on an HTTP server, or
11503 inside a Zip archive.")
11504 (license license:asl2.0)))
11505
11506 (define-public java-jakarta-oro
11507 (package
11508 (name "java-jakarta-oro")
11509 (version "2.0.8")
11510 (source (origin
11511 (method url-fetch)
11512 (uri (string-append "mirror://apache/jakarta/oro/"
11513 "jakarta-oro-" version ".tar.gz"))
11514 (sha256
11515 (base32
11516 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
11517 (modules '((guix build utils)))
11518 (snippet
11519 `(begin
11520 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
11521 #t))))
11522 (build-system ant-build-system)
11523 (arguments
11524 `(#:build-target "package"
11525 #:tests? #f; tests are run as part of the build process
11526 #:phases
11527 (modify-phases %standard-phases
11528 (replace 'install
11529 (install-jars ,(string-append "jakarta-oro-" version))))))
11530 (home-page "https://jakarta.apache.org/oro/")
11531 (synopsis "Text-processing for Java")
11532 (description "The Jakarta-ORO Java classes are a set of text-processing
11533 Java classes that provide Perl5 compatible regular expressions, AWK-like
11534 regular expressions, glob expressions, and utility classes for performing
11535 substitutions, splits, filtering filenames, etc. This library is the successor
11536 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
11537 from ORO, Inc.")
11538 (license license:asl1.1)))
11539
11540 (define-public java-native-access
11541 (package
11542 (name "java-native-access")
11543 (version "4.5.1")
11544 (source (origin
11545 (method url-fetch)
11546 (uri (string-append "https://github.com/java-native-access/jna/"
11547 "archive/" version ".tar.gz"))
11548 (file-name (string-append name "-" version ".tar.gz"))
11549 (sha256
11550 (base32
11551 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
11552 (modules '((guix build utils)))
11553 (snippet
11554 `(begin
11555 (for-each delete-file (find-files "." ".*.jar"))
11556 (delete-file-recursively "native/libffi")
11557 (delete-file-recursively "dist")
11558 #t))))
11559 (build-system ant-build-system)
11560 (arguments
11561 `(#:tests? #f; FIXME: tests require reflections.jar
11562 #:test-target "test"
11563 #:make-flags (list "-Ddynlink.native=true")
11564 #:phases
11565 (modify-phases %standard-phases
11566 (add-before 'build 'fix-build.xml
11567 (lambda* (#:key inputs #:allow-other-keys)
11568 (substitute* "build.xml"
11569 ;; Since we removed the bundled ant.jar, give the correct path
11570 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
11571 ;; We removed generated native libraries. We can only rebuild one
11572 ;; so don't fail if we can't find a native library for another architecture.
11573 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
11574 ;; Copy test dependencies
11575 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
11576 "lib/junit.jar")
11577 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
11578 "jar$"))
11579 "lib/hamcrest-core.jar")
11580 ;; FIXME: once reflections.jar is built, copy it to lib/test.
11581 #t))
11582 (add-before 'build 'build-native
11583 (lambda _
11584 (invoke "ant" "-Ddynlink.native=true" "native")
11585 #t))
11586 (replace 'install
11587 (install-jars "build")))))
11588 (inputs
11589 `(("libffi" ,libffi)
11590 ("libx11" ,libx11)
11591 ("libxt" ,libxt)))
11592 (native-inputs
11593 `(("java-junit" ,java-junit)
11594 ("java-hamcrest-core" ,java-hamcrest-core)))
11595 (home-page "https://github.com/java-native-access/jna")
11596 (synopsis "Access to native shared libraries from Java")
11597 (description "JNA provides Java programs easy access to native shared
11598 libraries without writing anything but Java code - no JNI or native code is
11599 required. JNA allows you to call directly into native functions using natural
11600 Java method invocation.")
11601 ;; Java Native Access project (JNA) is dual-licensed under 2
11602 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
11603 (license (list
11604 license:asl2.0
11605 license:lgpl2.1+))))
11606
11607 (define-public java-native-access-platform
11608 (package
11609 (inherit java-native-access)
11610 (name "java-native-access-platform")
11611 (arguments
11612 `(#:test-target "test"
11613 #:tests? #f; require jna-test.jar
11614 #:phases
11615 (modify-phases %standard-phases
11616 (add-before 'build 'chdir
11617 (lambda _
11618 (chdir "contrib/platform")
11619 #t))
11620 (add-after 'chdir 'fix-ant
11621 (lambda* (#:key inputs #:allow-other-keys)
11622 (substitute* "nbproject/project.properties"
11623 (("../../build/jna.jar")
11624 (string-append (assoc-ref inputs "java-native-access")
11625 "/share/java/jna.jar"))
11626 (("../../lib/hamcrest-core-.*.jar")
11627 (car (find-files (assoc-ref inputs "java-hamcrest-core")
11628 "jar$")))
11629 (("../../lib/junit.jar")
11630 (car (find-files (assoc-ref inputs "java-junit")
11631 "jar$"))))
11632 #t))
11633 (replace 'install
11634 (install-jars "dist")))))
11635 (inputs
11636 `(("java-native-access" ,java-native-access)))
11637 (synopsis "Cross-platform mappings for jna")
11638 (description "java-native-access-platfrom has cross-platform mappings
11639 and mappings for a number of commonly used platform functions, including a
11640 large number of Win32 mappings as well as a set of utility classes that
11641 simplify native access.")))
11642
11643 (define-public java-jsch-agentproxy-core
11644 (package
11645 (name "java-jsch-agentproxy-core")
11646 (version "0.0.8")
11647 (source (origin
11648 (method url-fetch)
11649 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
11650 version ".tar.gz"))
11651 (file-name (string-append name "-" version ".tar.gz"))
11652 (sha256
11653 (base32
11654 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
11655 (build-system ant-build-system)
11656 (arguments
11657 `(#:jar-name "jsch-agentproxy-core.jar"
11658 #:source-dir "jsch-agent-proxy-core/src/main/java"
11659 #:tests? #f)); no tests
11660 (home-page "https://github.com/ymnk/jsch-agent-proxy")
11661 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
11662 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11663 and Pageant included Putty. It will be easily integrated into JSch, and users
11664 will be allowed to use these programs for authentication.")
11665 (license license:bsd-3)))
11666
11667 (define-public java-jsch-agentproxy-sshagent
11668 (package
11669 (inherit java-jsch-agentproxy-core)
11670 (name "java-jsch-agentproxy-sshagent")
11671 (arguments
11672 `(#:jar-name "jsch-agentproxy-sshagent.jar"
11673 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
11674 #:tests? #f)); no tests
11675 (inputs
11676 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11677 (synopsis "Proxy to ssh-agent")
11678 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11679 and Pageant included in Putty. This component contains the code for a proxy to
11680 ssh-agent.")))
11681
11682 (define-public java-jsch-agentproxy-usocket-jna
11683 (package
11684 (inherit java-jsch-agentproxy-core)
11685 (name "java-jsch-agentproxy-usocket-jna")
11686 (arguments
11687 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
11688 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
11689 #:tests? #f)); no tests
11690 (inputs
11691 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11692 ("java-native-access" ,java-native-access)))
11693 (synopsis "USocketFactory implementation using JNA")
11694 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11695 and Pageant included in Putty. This component contains an implementation of
11696 USocketFactory using @dfn{JNA} (Java Native Access).")))
11697
11698 (define-public java-jsch-agentproxy-pageant
11699 (package
11700 (inherit java-jsch-agentproxy-core)
11701 (name "java-jsch-agentproxy-pageant")
11702 (arguments
11703 `(#:jar-name "jsch-agentproxy-pageant.jar"
11704 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
11705 #:tests? #f)); no tests
11706 (inputs
11707 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11708 ("java-native-access" ,java-native-access)
11709 ("java-native-access-platform" ,java-native-access-platform)))
11710 (synopsis "Proxy to pageant")
11711 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11712 and Pageant included in Putty. This component contains the code for a proxy to
11713 pageant.")))
11714
11715 (define-public java-jsch-agentproxy-usocket-nc
11716 (package
11717 (inherit java-jsch-agentproxy-core)
11718 (name "java-jsch-agentproxy-usocket-nc")
11719 (arguments
11720 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
11721 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
11722 #:tests? #f)); no tests
11723 (inputs
11724 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11725 (synopsis "USocketFactory implementation using netcat")
11726 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11727 and Pageant included in Putty. This component contains an implementation of
11728 USocketFactory using netcat.")))
11729
11730 (define-public java-jsch-agentproxy-connector-factory
11731 (package
11732 (inherit java-jsch-agentproxy-core)
11733 (name "java-jsch-agentproxy-connector-factory")
11734 (arguments
11735 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11736 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11737 #:tests? #f)); no tests
11738 (inputs
11739 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11740 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11741 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11742 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11743 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11744 (synopsis "Connector factory for jsch agent proxy")
11745 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11746 and Pageant included in Putty. This component contains a connector factory.")))
11747
11748 (define-public java-jsch-agentproxy-jsch
11749 (package
11750 (inherit java-jsch-agentproxy-core)
11751 (name "java-jsch-agentproxy-jsch")
11752 (arguments
11753 `(#:jar-name "jsch-agentproxy-jsch.jar"
11754 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11755 #:tests? #f)); no tests
11756 (inputs
11757 `(("java-jsch" ,java-jsch)
11758 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11759 (synopsis "JSch integration library for agentproxy")
11760 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11761 and Pageant included in Putty. This component contains a library to use
11762 jsch-agent-proxy with JSch.")))
11763
11764 (define-public java-apache-ivy
11765 (package
11766 (name "java-apache-ivy")
11767 (version "2.4.0")
11768 (source (origin
11769 (method url-fetch)
11770 (uri (string-append "mirror://apache//ant/ivy/" version
11771 "/apache-ivy-" version "-src.tar.gz"))
11772 (sha256
11773 (base32
11774 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11775 (patches
11776 (search-patches
11777 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11778 (build-system ant-build-system)
11779 (arguments
11780 `(#:jar-name "ivy.jar"
11781 #:tests? #f
11782 #:phases
11783 (modify-phases %standard-phases
11784 (add-before 'build 'remove-example
11785 (lambda _
11786 (delete-file-recursively "src/example")
11787 #t))
11788 (add-before 'build 'copy-resources
11789 (lambda _
11790 (with-directory-excursion "src/java"
11791 (for-each (lambda (file)
11792 (install-file file (string-append "../../build/classes/" (dirname file))))
11793 (append
11794 (find-files "." ".*.css")
11795 (find-files "." ".*.ent")
11796 (find-files "." ".*.html")
11797 (find-files "." ".*.properties")
11798 (find-files "." ".*.xsd")
11799 (find-files "." ".*.xsl")
11800 (find-files "." ".*.xml"))))
11801 #t))
11802 (add-before 'build 'fix-vfs
11803 (lambda _
11804 (substitute*
11805 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11806 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11807 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11808 #t))
11809 (add-before 'install 'copy-manifest
11810 (lambda _
11811 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11812 #t))
11813 (add-before 'install 'repack
11814 (lambda _
11815 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
11816 "-C" "build/classes" ".")))
11817 (add-after 'install 'install-bin
11818 (lambda* (#:key outputs #:allow-other-keys)
11819 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11820 (ivy (string-append bin "/ivy"))
11821 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11822 (mkdir-p bin)
11823 (with-output-to-file ivy
11824 (lambda _
11825 (display (string-append
11826 "#!" (which "sh") "\n"
11827 "if [[ -z $CLASSPATH ]]; then\n"
11828 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11829 "else\n"
11830 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11831 "fi\n"
11832 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11833 (chmod ivy #o755)
11834 #t))))))
11835 (inputs
11836 `(("java-bouncycastle" ,java-bouncycastle)
11837 ("java-commons-cli" ,java-commons-cli)
11838 ("java-commons-collections" ,java-commons-collections)
11839 ("java-commons-httpclient" ,java-commons-httpclient)
11840 ("java-commons-lang" ,java-commons-lang)
11841 ("java-commons-vfs" ,java-commons-vfs)
11842 ("java-jakarta-oro" ,java-jakarta-oro)
11843 ("java-jsch" ,java-jsch)
11844 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11845 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11846 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11847 ("java-junit" ,java-junit)))
11848 (home-page "https://ant.apache.org/ivy")
11849 (synopsis "Dependency manager for the Java programming language")
11850 (description "Ivy is a tool for managing (recording, tracking, resolving
11851 and reporting) project dependencies. It is characterized by the following:
11852
11853 @itemize
11854 @item flexibility and configurability - Ivy is essentially process agnostic
11855 and is not tied to any methodology or structure. Instead it provides the
11856 necessary flexibility and configurability to be adapted to a broad range
11857 of dependency management and build processes.
11858 @item tight integration with Apache Ant - while available as a standalone tool,
11859 Ivy works particularly well with Apache Ant providing a number of
11860 powerful Ant tasks ranging from dependency resolution to dependency
11861 reporting and publication.
11862 @end itemize")
11863 (license license:asl2.0)))
11864
11865 (define-public java-eclipse-sisu-inject
11866 (package
11867 (name "java-eclipse-sisu-inject")
11868 (version "0.3.4")
11869 (source (origin
11870 (method git-fetch)
11871 (uri (git-reference
11872 (url "https://github.com/eclipse/sisu.inject/")
11873 (commit (string-append "releases/" version))))
11874 (file-name (git-file-name name version))
11875 (sha256
11876 (base32
11877 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
11878 (build-system ant-build-system)
11879 (arguments
11880 `(#:jar-name "eclipse-sisu-inject.jar"
11881 #:source-dir "org.eclipse.sisu.inject/src"
11882 #:tests? #f; no tests
11883 #:phases
11884 (modify-phases %standard-phases
11885 (replace 'install
11886 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
11887 (propagated-inputs
11888 `(("java-guice" ,java-guice)
11889 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
11890 (inputs
11891 `(("java-guice-servlet" ,java-guice-servlet)
11892 ("java-javax-inject" ,java-javax-inject)
11893 ("java-javaee-servletapi" ,java-javaee-servletapi)
11894 ("java-junit" ,java-junit)
11895 ("java-slf4j-api" ,java-slf4j-api)
11896 ("java-jsr305" ,java-jsr305)
11897 ("java-jsr250" ,java-jsr250)
11898 ("java-cdi-api" ,java-cdi-api)
11899 ("java-osgi-framework" ,java-osgi-framework)
11900 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11901 ("java-testng" ,java-testng)))
11902 (home-page "https://www.eclipse.org/sisu/")
11903 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11904 (description "Sisu is a modular JSR330-based container that supports
11905 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11906 Google-Guice to perform dependency injection and provide the core JSR330
11907 support, but removes the need to write explicit bindings in Guice modules.
11908 Integration with other containers via the Eclipse Extension Registry and the
11909 OSGi Service Registry is a goal of this project.")
11910 (license license:epl1.0)))
11911
11912 (define java-sisu-inject-parent-pom
11913 (package
11914 (inherit java-eclipse-sisu-inject)
11915 (name "java-sisu-inject-parent-pom")
11916 (arguments
11917 `(#:tests? #f
11918 #:phases
11919 (modify-phases %standard-phases
11920 (delete 'configure)
11921 (delete 'build)
11922 (replace 'install
11923 (install-pom-file "pom.xml")))))
11924 (propagated-inputs '())))
11925
11926 (define-public java-eclipse-sisu-plexus
11927 (package
11928 (name "java-eclipse-sisu-plexus")
11929 (version "0.3.4")
11930 (source (origin
11931 (method git-fetch)
11932 (uri (git-reference
11933 (url "https://github.com/eclipse/sisu.plexus")
11934 (commit (string-append "releases/" version))))
11935 (file-name (git-file-name name version))
11936 (sha256
11937 (base32
11938 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
11939 (modules '((guix build utils)))
11940 (snippet
11941 '(begin
11942 (for-each delete-file (find-files "." ".*.jar"))
11943 (rename-file "org.eclipse.sisu.plexus.tests/src"
11944 "org.eclipse.sisu.plexus.tests/java")
11945 #t))))
11946 (build-system ant-build-system)
11947 (arguments
11948 `(#:jar-name "eclipse-sisu-plexus.jar"
11949 #:source-dir "org.eclipse.sisu.plexus/src"
11950 #:test-dir "org.eclipse.sisu.plexus.tests"
11951 #:test-exclude
11952 (list
11953 ;; This test fails probably because we can't generate the necessary
11954 ;; meta-inf files.
11955 "**/PlexusLoggingTest.*"
11956 ;; FIXME: This test fails because of some injection error
11957 "**/PlexusRequirementTest.*")
11958 #:jdk ,icedtea-8
11959 #:phases
11960 (modify-phases %standard-phases
11961 (add-before 'build 'copy-resources
11962 (lambda _
11963 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11964 "build/classes/META-INF/plexus")
11965 #t))
11966 (add-before 'check 'build-test-jar
11967 (lambda _
11968 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11969 (mkdir "build")
11970 (with-directory-excursion "java"
11971 (apply invoke "javac" "-cp"
11972 (string-append (getenv "CLASSPATH")
11973 ":../../../../../build/classes")
11974 (find-files "." ".*.java"))
11975 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11976 (find-files "." ".*.jar")))
11977 (mkdir-p "build/META-INF/plexus")
11978 (copy-file "resources/META-INF/plexus/components.xml"
11979 "build/META-INF/plexus/components.xml")
11980 (with-directory-excursion "build"
11981 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11982 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11983 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11984 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11985 (("resources/component-jar")
11986 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11987 #t))
11988 (replace 'install
11989 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
11990 (propagated-inputs
11991 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11992 ("java-plexus-utils" ,java-plexus-utils)
11993 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11994 ("java-cdi-api" ,java-cdi-api)
11995 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11996 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
11997 (inputs
11998 `(("java-osgi-framework" ,java-osgi-framework)
11999 ("java-slf4j-api" ,java-slf4j-api)
12000 ("java-javax-inject" ,java-javax-inject)
12001 ("java-guice" ,java-guice)
12002 ("java-guava" ,java-guava)
12003 ("java-aopalliance" ,java-aopalliance)
12004 ("java-asm" ,java-asm)
12005 ("java-cglib" ,java-cglib)))
12006 (native-inputs
12007 `(("java-junit" ,java-junit)))
12008 (home-page "https://www.eclipse.org/sisu/")
12009 (synopsis "Plexus support for the sisu container")
12010 (description "Sisu is a modular JSR330-based container that supports
12011 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12012 adds Plexus support to the Sisu-Inject container.")
12013 (license license:epl1.0)))
12014
12015 (define java-sisu-plexus-parent-pom
12016 (package
12017 (inherit java-eclipse-sisu-plexus)
12018 (name "java-sisu-plexus-parent-pom")
12019 (arguments
12020 `(#:tests? #f
12021 #:phases
12022 (modify-phases %standard-phases
12023 (delete 'configure)
12024 (delete 'build)
12025 (replace 'install
12026 (install-pom-file "pom.xml")))))
12027 (propagated-inputs
12028 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12029
12030 (define-public java-commons-compiler
12031 (package
12032 (name "java-commons-compiler")
12033 (version "3.0.8")
12034 (source (origin
12035 (method git-fetch)
12036 (uri (git-reference
12037 (url "https://github.com/janino-compiler/janino")
12038 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12039 (file-name (string-append name "-" version))
12040 (sha256
12041 (base32
12042 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12043 (modules '((guix build utils)))
12044 (snippet
12045 '(begin
12046 (for-each delete-file
12047 (find-files "." "\\.jar$"))
12048 #t))))
12049 (build-system ant-build-system)
12050 (arguments
12051 `(#:jar-name "commons-compiler.jar"
12052 #:source-dir "commons-compiler/src/main"
12053 #:tests? #f)); no tests
12054 (home-page "https://github.com/janino-compiler/janino")
12055 (synopsis "Java compiler")
12056 (description "Commons-compiler contains an API for janino, including the
12057 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12058 and @code{ISimpleCompiler} interfaces.")
12059 (license license:bsd-3)))
12060
12061 (define-public java-janino
12062 (package
12063 (inherit java-commons-compiler)
12064 (name "java-janino")
12065 (arguments
12066 `(#:jar-name "janino.jar"
12067 #:source-dir "src/main/java"
12068 #:phases
12069 (modify-phases %standard-phases
12070 (add-before 'configure 'chdir
12071 (lambda _
12072 (chdir "janino")
12073 #t)))))
12074 (inputs
12075 `(("java-commons-compiler" ,java-commons-compiler)))
12076 (native-inputs
12077 `(("java-junit" ,java-junit)
12078 ("java-hamcrest-core" ,java-hamcrest-core)))
12079 (description "Janino is a Java compiler. Janino can compile a set of
12080 source files to a set of class files like @code{javac}, but also compile a
12081 Java expression, block, class body or source file in memory, load the bytecode
12082 and execute it directly in the same JVM. @code{janino} can also be used for
12083 static code analysis or code manipulation.")))
12084
12085 (define-public java-logback-core
12086 (package
12087 (name "java-logback-core")
12088 (version "1.2.3")
12089 (source (origin
12090 (method url-fetch)
12091 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12092 version ".tar.gz"))
12093 (file-name (string-append name "-" version ".tar.gz"))
12094 (sha256
12095 (base32
12096 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12097 (modules '((guix build utils)))
12098 (snippet
12099 '(begin
12100 (delete-file-recursively "logback-access/lib")
12101 #t))))
12102 (build-system ant-build-system)
12103 (arguments
12104 `(#:jar-name "logback.jar"
12105 #:source-dir "src/main/java"
12106 #:test-dir "src/test"
12107 #:test-exclude
12108 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12109 ;; which creates FastClasses
12110 (list "**/AllCoreTest.*"
12111 "**/AutoFlushingObjectWriterTest.*"
12112 "**/PackageTest.*"
12113 "**/ResilientOutputStreamTest.*"
12114 ;; And we still don't want to run abstract classes
12115 "**/Abstract*.*")
12116 #:phases
12117 (modify-phases %standard-phases
12118 (add-before 'configure 'chdir
12119 (lambda _
12120 (chdir "logback-core")
12121 #t)))))
12122 (inputs
12123 `(("java-javax-mail" ,java-javax-mail)
12124 ("servlet" ,java-javaee-servletapi)
12125 ("java-commons-compiler" ,java-commons-compiler)
12126 ("java-janino" ,java-janino)))
12127 (native-inputs
12128 `(("java-junit" ,java-junit)
12129 ("java-hamcrest-core" ,java-hamcrest-core)
12130 ("java-mockito-1" ,java-mockito-1)
12131 ("java-cglib" ,java-cglib)
12132 ("java-asm" ,java-asm)
12133 ("java-objenesis" ,java-objenesis)
12134 ("java-joda-time" ,java-joda-time)))
12135 (home-page "https://logback.qos.ch")
12136 (synopsis "Logging for java")
12137 (description "Logback is intended as a successor to the popular log4j project.
12138 This module lays the groundwork for the other two modules.")
12139 ;; Either epl1.0 or lgpl2.1
12140 (license (list license:epl1.0
12141 license:lgpl2.1))))
12142
12143 (define-public java-logback-classic
12144 (package
12145 (inherit java-logback-core)
12146 (name "java-logback-classic")
12147 (arguments
12148 `(#:jar-name "logback-classic.jar"
12149 #:source-dir "src/main/java"
12150 #:test-dir "src/test"
12151 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
12152 #:jdk ,icedtea-8
12153 #:phases
12154 (modify-phases %standard-phases
12155 (add-before 'configure 'chdir
12156 (lambda _
12157 (chdir "logback-classic")
12158 #t))
12159 (replace 'build
12160 (lambda* (#:key inputs #:allow-other-keys)
12161 (mkdir-p "build/classes")
12162 (setenv "CLASSPATH"
12163 (string-join
12164 (apply append (map (lambda (input)
12165 (find-files (assoc-ref inputs input)
12166 ".*.jar"))
12167 '("java-logback-core" "java-slf4j-api"
12168 "java-commons-compiler" "servlet"
12169 "groovy")))
12170 ":"))
12171 (apply invoke "groovyc" "-d" "build/classes" "-j"
12172 (find-files "src/main/" ".*\\.(groovy|java)$"))
12173 (invoke "ant" "jar")
12174 #t)))))
12175 (inputs
12176 `(("java-logback-core" ,java-logback-core)
12177 ("java-slf4j-api" ,java-slf4j-api)
12178 ,@(package-inputs java-logback-core)))
12179 (native-inputs
12180 `(("groovy" ,groovy)))
12181 (description "Logback is intended as a successor to the popular log4j project.
12182 This module can be assimilated to a significantly improved version of log4j.
12183 Moreover, @code{logback-classic} natively implements the slf4j API so that you
12184 can readily switch back and forth between logback and other logging frameworks
12185 such as log4j or @code{java.util.logging} (JUL).")))
12186
12187 (define-public java-jgit
12188 (package
12189 (name "java-jgit")
12190 (version "4.7.0.201704051617-r")
12191 (source (origin
12192 (method url-fetch)
12193 (uri (string-append "https://repo1.maven.org/maven2/"
12194 "org/eclipse/jgit/org.eclipse.jgit/"
12195 version "/org.eclipse.jgit-"
12196 version "-sources.jar"))
12197 (sha256
12198 (base32
12199 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
12200 (build-system ant-build-system)
12201 (arguments
12202 `(#:tests? #f ; There are no tests to run.
12203 #:jar-name "jgit.jar"
12204 ;; JGit must be built with a JDK supporting Java 8.
12205 #:jdk ,icedtea-8
12206 ;; Target our older default JDK.
12207 #:make-flags (list "-Dtarget=1.7")
12208 #:phases
12209 (modify-phases %standard-phases
12210 ;; The jar file generated by the default build.xml does not include
12211 ;; the text properties files, so we need to add them.
12212 (add-after 'build 'add-properties
12213 (lambda* (#:key jar-name #:allow-other-keys)
12214 (with-directory-excursion "src"
12215 (apply invoke "jar" "-uf"
12216 (string-append "../build/jar/" jar-name)
12217 (find-files "." "\\.properties$")))
12218 #t)))))
12219 (inputs
12220 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
12221 ("java-javaewah" ,java-javaewah)
12222 ("java-jsch" ,java-jsch)
12223 ("java-slf4j-api" ,java-slf4j-api)))
12224 (home-page "https://eclipse.org/jgit/")
12225 (synopsis "Java library implementing the Git version control system")
12226 (description "JGit is a lightweight, pure Java library implementing the
12227 Git version control system, providing repository access routines, support for
12228 network protocols, and core version control algorithms.")
12229 (license license:edl1.0)))
12230
12231 ;; For axoloti. This package can still be built with icedtea-7, which is
12232 ;; currently used as the default JDK.
12233 (define-public java-jgit-4.2
12234 (package (inherit java-jgit)
12235 (version "4.2.0.201601211800-r")
12236 (source (origin
12237 (method url-fetch)
12238 (uri (string-append "https://repo1.maven.org/maven2/"
12239 "org/eclipse/jgit/org.eclipse.jgit/"
12240 version "/org.eclipse.jgit-"
12241 version "-sources.jar"))
12242 (sha256
12243 (base32
12244 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
12245 (build-system ant-build-system)
12246 (arguments
12247 (substitute-keyword-arguments (package-arguments java-jgit)
12248 ;; Build for default JDK.
12249 ((#:jdk _) icedtea-7)
12250 ((#:phases phases)
12251 `(modify-phases ,phases
12252 (add-after 'unpack 'use-latest-javaewah-API
12253 (lambda _
12254 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
12255 (("wordinbits") "WORD_IN_BITS"))
12256 #t))))))
12257 (inputs
12258 `(("java-javaewah" ,java-javaewah)
12259 ("java-jsch" ,java-jsch)
12260 ("java-slf4j-api" ,java-slf4j-api)))))
12261
12262 (define-public abcl
12263 (package
12264 (name "abcl")
12265 (version "1.6.0")
12266 (source
12267 (origin
12268 (method url-fetch)
12269 (uri (string-append "https://abcl.org/releases/"
12270 version "/abcl-src-" version ".tar.gz"))
12271 (sha256
12272 (base32
12273 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
12274 (patches
12275 (search-patches
12276 "abcl-fix-build-xml.patch"))))
12277 (build-system ant-build-system)
12278 (native-inputs
12279 `(("java-junit" ,java-junit)))
12280 (arguments
12281 `(#:build-target "abcl.jar"
12282 #:test-target "abcl.test"
12283 #:phases
12284 (modify-phases %standard-phases
12285 (replace 'install
12286 (lambda* (#:key outputs #:allow-other-keys)
12287 (let ((share (string-append (assoc-ref outputs "out")
12288 "/share/java/"))
12289 (bin (string-append (assoc-ref outputs "out")
12290 "/bin/")))
12291 (mkdir-p share)
12292 (install-file "dist/abcl.jar" share)
12293 (install-file "dist/abcl-contrib.jar" share)
12294 (mkdir-p bin)
12295 (with-output-to-file (string-append bin "abcl")
12296 (lambda _
12297 (let ((classpath (string-append
12298 share "abcl.jar"
12299 ":"
12300 share "abcl-contrib.jar")))
12301 (display (string-append
12302 "#!" (which "sh") "\n"
12303 "if [[ -z $CLASSPATH ]]; then\n"
12304 " cp=\"" classpath "\"\n"
12305 "else\n"
12306 " cp=\"" classpath ":$CLASSPATH\"\n"
12307 "fi\n"
12308 "exec " (which "java")
12309 " -cp $cp org.armedbear.lisp.Main $@\n")))))
12310 (chmod (string-append bin "abcl") #o755)
12311 #t))))))
12312 (home-page "https://abcl.org/")
12313 (synopsis "Common Lisp Implementation on the JVM")
12314 (description
12315 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
12316 Lisp language featuring both an interpreter and a compiler, running in the
12317 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
12318 in any Java application. Additionally, it can be used to implement (parts of)
12319 the application using Java to Lisp integration APIs.")
12320 (license (list license:gpl2+
12321 ;; named-readtables is released under 3 clause BSD
12322 license:bsd-3
12323 ;; jfli is released under CPL 1.0
12324 license:cpl1.0))))
12325
12326 (define-public java-jsonp-api
12327 (package
12328 (name "java-jsonp-api")
12329 (version "1.1.6")
12330 (source (origin
12331 (method git-fetch)
12332 (uri (git-reference
12333 (url "https://github.com/eclipse-ee4j/jsonp")
12334 (commit (string-append "1.1-" version "-RELEASE"))))
12335 (file-name (git-file-name name version))
12336 (sha256
12337 (base32
12338 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
12339 (build-system ant-build-system)
12340 (arguments
12341 `(#:jar-name "jsonp-api.jar"
12342 #:tests? #f
12343 #:source-dir "api/src/main/java"
12344 #:test-dir "api/src/test"))
12345 (home-page "https://eclipse-ee4j.github.io/jsonp/")
12346 (synopsis "JSON Processing in Java")
12347 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
12348 parse, generate, transform and query) JSON messages. It produces and
12349 consumes JSON text in a streaming fashion (similar to StAX API for XML)
12350 and allows building a Java object model for JSON text using API classes
12351 (similar to DOM API for XML).")
12352 ;; either gpl2 only with classpath exception, or epl2.0.
12353 (license (list license:gpl2
12354 license:epl2.0))))
12355
12356 (define-public java-jsonp-impl
12357 (package
12358 (inherit java-jsonp-api)
12359 (name "java-jsonp-impl")
12360 (arguments
12361 `(#:jar-name "jsonp-impl.jar"
12362 #:tests? #f
12363 #:source-dir "impl/src/main/java"
12364 #:test-dir "impl/src/test"
12365 #:phases
12366 (modify-phases %standard-phases
12367 (add-before 'build 'copy-resources
12368 (lambda _
12369 (copy-recursively
12370 "impl/src/main/resources/"
12371 "build/classes")
12372 #t)))))
12373 (propagated-inputs
12374 `(("java-jsonp-api" ,java-jsonp-api)))
12375 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
12376 parse, generate, transform and query) JSON messages. This package contains
12377 a reference implementation of that API.")))
12378
12379 (define-public java-xmp
12380 (package
12381 (name "java-xmp")
12382 (version "5.1.3")
12383 (source (origin
12384 (method url-fetch)
12385 (uri (string-append "http://download.macromedia.com/pub/developer"
12386 "/xmp/sdk/XMPCoreJava-" version ".zip"))
12387 (sha256
12388 (base32
12389 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
12390 (build-system ant-build-system)
12391 (arguments
12392 `(#:build-target "build"
12393 #:tests? #f; no tests
12394 #:phases
12395 (modify-phases %standard-phases
12396 (add-after 'unpack 'chdir
12397 (lambda _
12398 (chdir "XMPCore")
12399 #t))
12400 (add-before 'build 'fix-timestamp
12401 (lambda _
12402 (substitute* "build.xml"
12403 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
12404 #t))
12405 (replace 'install
12406 (install-jars "."))
12407 (add-after 'install 'install-doc
12408 (lambda* (#:key outputs #:allow-other-keys)
12409 (copy-recursively
12410 "docs"
12411 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
12412 #t)))))
12413 (native-inputs
12414 `(("unzip" ,unzip)))
12415 (home-page "https://www.adobe.com/devnet/xmp.html")
12416 (synopsis "Extensible Metadat Platform (XMP) support in Java")
12417 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
12418 technology that allows you to embed data about a file, known as metadata,
12419 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
12420 library and the API is similar.")
12421 (license license:bsd-3)))
12422
12423 (define-public java-metadata-extractor
12424 (package
12425 (name "java-metadata-extractor")
12426 (version "2.11.0")
12427 (source (origin
12428 (method git-fetch)
12429 (uri (git-reference
12430 (url "https://github.com/drewnoakes/metadata-extractor")
12431 (commit version)))
12432 (file-name (git-file-name name version))
12433 (sha256
12434 (base32
12435 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
12436 (build-system ant-build-system)
12437 (arguments
12438 `(#:jar-name "metadata-extractor.jar"
12439 #:source-dir "Source"
12440 #:test-dir "Tests"
12441 #:phases
12442 (modify-phases %standard-phases
12443 (add-before 'check 'fix-test-dir
12444 (lambda _
12445 (substitute* "build.xml"
12446 (("/java\">") "\">"))
12447 #t)))))
12448 (propagated-inputs
12449 `(("java-xmp" ,java-xmp)))
12450 (native-inputs
12451 `(("java-hamcrest-core" ,java-hamcrest-core)
12452 ("java-junit" ,java-junit)))
12453 (home-page "https://github.com/drewnoakes/metadata-extractor")
12454 (synopsis "Extract metadata from image and video files")
12455 (description "Metadata-extractor is a straightforward Java library for
12456 reading metadata from image files. It is able to read metadata in Exif,
12457 IPTC, XMP, ICC and more formats.")
12458 (license license:asl2.0)))
12459
12460 (define-public java-svg-salamander
12461 (package
12462 (name "java-svg-salamander")
12463 (version "1.1.2")
12464 (source (origin
12465 (method git-fetch)
12466 (uri (git-reference
12467 (url "https://github.com/blackears/svgSalamander")
12468 (commit (string-append "v" version))))
12469 (file-name (git-file-name name version))
12470 (sha256
12471 (base32
12472 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
12473 (modules '((guix build utils)))
12474 (snippet
12475 '(begin
12476 (for-each delete-file (find-files "." ".*.jar"))
12477 #t))
12478 (patches
12479 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
12480 (build-system ant-build-system)
12481 (arguments
12482 `(#:tests? #f; no tests
12483 #:phases
12484 (modify-phases %standard-phases
12485 (add-after 'unpack 'chdir
12486 (lambda _
12487 (chdir "svg-core")
12488 #t))
12489 (add-before 'build 'copy-jars
12490 (lambda* (#:key inputs #:allow-other-keys)
12491 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
12492 "../libraries/javacc.jar")
12493 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
12494 "../libraries/ant.jar")
12495 #t))
12496 (replace 'install
12497 (install-jars "dist")))))
12498 (native-inputs
12499 `(("javacc" ,javacc)))
12500 (home-page "https://github.com/blackears/svgSalamander")
12501 (synopsis "SVG engine for Java")
12502 (description "SVG Salamander is an SVG engine for Java that's designed
12503 to be small, fast, and allow programmers to use it with a minimum of fuss.
12504 It's in particular targeted for making it easy to integrate SVG into Java
12505 games and making it much easier for artists to design 2D game content - from
12506 rich interactive menus to charts and graphcs to complex animations.")
12507 (license license:bsd-2)))
12508
12509 (define-public java-jboss-transaction-api-spec
12510 (package
12511 (name "java-jboss-transaction-api-spec")
12512 (version "1.2+1.1.1")
12513 (source (origin
12514 (method git-fetch)
12515 (uri (git-reference
12516 (url "https://github.com/jboss/jboss-transaction-api_spec")
12517 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
12518 (file-name (git-file-name name version))
12519 (sha256
12520 (base32
12521 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
12522 (build-system ant-build-system)
12523 (arguments
12524 `(#:jar-name "java-jboss-transaction-api_spec.jar"
12525 #:source-dir "src/main/java"
12526 #:tests? #f)); no tests
12527 (inputs
12528 `(("java-cdi-api" ,java-cdi-api)
12529 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
12530 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
12531 (synopsis "Generic transaction management API in Java")
12532 (description "Java-jboss-transaction-api-spec implements the Transactions
12533 API. A transaction is a unit of work containing one or more operations
12534 involving one or more shared resources having ACID (Atomicity, Consistency,
12535 Isolation and Durability) properties.")
12536 ;; either gpl2 only with classpath exception or cddl.
12537 (license (list license:gpl2 license:cddl1.0))))
12538
12539 (define-public java-picocli
12540 (package
12541 (name "java-picocli")
12542 (version "4.3.2")
12543 (source (origin
12544 (method git-fetch)
12545 (uri (git-reference
12546 (url "https://github.com/remkop/picocli")
12547 (commit (string-append "v" version))))
12548 (file-name (git-file-name name version))
12549 (sha256
12550 (base32
12551 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
12552 (build-system ant-build-system)
12553 (arguments
12554 `(#:jar-name "picocli.jar"
12555 #:source-dir "src/main/java"
12556 ;; Tests require missing dependencies (junitparams, system-rules)
12557 #:tests? #f))
12558 (home-page "https://picocli.info")
12559 (synopsis "REPL for the JVM")
12560 (description "Picocli is a framework for building command line applications
12561 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
12562 in Java, usable from Groovy, Kotlin, Scala, etc.")
12563 (license license:asl2.0)))
12564
12565 (define-public java-jetbrains-annotations
12566 (package
12567 (name "java-jetbrains-annotations")
12568 (version "19.0.0")
12569 (source (origin
12570 (method git-fetch)
12571 (uri (git-reference
12572 (url "https://github.com/JetBrains/java-annotations")
12573 (commit version)))
12574 (file-name (git-file-name name version))
12575 (sha256
12576 (base32
12577 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
12578 (build-system ant-build-system)
12579 (arguments
12580 `(#:jar-name "jetbrains-annotations.jar"
12581 #:source-dir "common/src/main/java:java8/src/main/java"
12582 #:tests? #f)); no tests
12583 (home-page "https://github.com/JetBrains/java-annotations")
12584 (synopsis "Annotations for Java and other JVM languages")
12585 (description "This package contains a set of Java annotations which can be
12586 used in JVM-based languages. They serve as an additional documentation and
12587 can be interpreted by IDEs and static analysis tools to improve code analysis.")
12588 (license license:expat)))